Scientists are not known to be risk-takers in life and so it might come as a surprise to you, but research is risky - you stand to loose a lot of time and effort when a particular research thread turns out to be a red herring. Consider this (bad) scenario for a research student: many months or even years of work, and no research result or paper to show for it. Judging success or failure is usually black and white in research: simply put, good research or bad research is decided by the prestige of the journal or conference where the research is accepted for publication. The intermediate sweat and hard work that actually goes into the research is of lesser interest to the academic community, or indeed to anyone thinking of hiring you.
At the organizational or societal level research risk is mitigated via hedging, i.e., by investing in several research teams in a multitude of topics. For example, the NSF issues 100s of grants to 100s of research groups across the US every year. A few research grants that yield good results cover up for the other average and under- performing research projects. Can the same technique be applied at the individual level? But can you hedge against say, a Ph.D. topic, that seems promising to start with but may not yield tangible results two years down the line?
The answer to the question is yes. Individual research risk can be managed by putting your eggs in multiple baskets, i.e., by spreading your bets. This can be done, for example, by broadening the scope of the research problem you are investigating, trying to start up research collaborations with other researchers (often by bringing a particular skill or contribution to someone else's work), and most importantly, by being prepared to admit quickly that your research problem as being intractable and adapting.
Broadening the scope of the research problem should be done as and when new information is available. For example, if you discover that the particular algorithm you are developing is unsuitable for its primary use case, try to see if it can be adopted for another use case. You can also contribute by comparing your approach to other competing approaches in solving a research problem. For example, one approach may optimize for fast data transmission at the expense of higher battery usage in a mobile phone. Many times it is impossible to come up with a solution to a research problem that optimizes some parameters but remember that different people are looking to optimize different parameters. Doing a honest through survey of the pros-and-cons of different approaches to solve a research problem is highly relevant research, much more so than a paper describing a failed research attempt.
Perhaps the methodology you used for experimentation had some novel aspects that may be interesting to the research community. For example, in computer engineering there is a whole research community who build and discuss testbeds for doing further research. If you have been creative in your research work, then try to identify the innovative aspect and present this aspect to the relevant community.
More can be done when you start working with others. Look around in your organization or department to find folks who may have similar research interests as you do. The idea is reach outside of your comfort zone (your academic adviser) and collaborate with other people who may be working on related problems. While you may not lead any other research threads you find, working on different problems with different people is a significant value addition to your early research career. If you participate in multiple research threads, chances are that at least a few will yield great results. You have just hedged your research risk. Off course, one must be mindful of not committing ones time on too many research threads, be mindful of keeping ones academic adviser (i.e. stipend source :-) ) informed, and mindful of prioritizing which research thread is more important than the other.