Amazing bug with Eclipse CDT - eclipse-cdt

I am a beginner in Eclipse CDT. I recently have an amazing bug that I am not able to figure out. In fact, when I debug my application, it correctly work without any problem. But when I run it, It crashes and I am able to know the origin of this problem since It does not appear in debug mode. Please help me. Thanks you in advance
S.T.

Eclipse can't detect logic errors. Check for the things like NULL pointers, infinite loops, etc.
If you can post your code here, do it. So we can help better.

Related

Setting up the optimal IDE/Toolchain on Linux for D Language

So, I have this on again/off again relationship with D. I'm back at it again, on a new machine. First things first, setting the toolchain.
I think I'll go again with Eclipse + DDT, but last encounter didn't go that well and I may use some guidance before I install stuffs ...
First, for some reasons I'd like to stay on Linux, but I may as well move to Windows. Do you guys have an articulated opinion as to which OS is more suitable for D development ?
Second, I am not (yet) a hard-core coder, so the more integrated the development environment, the better. Is the current version of Eclipse + DDT really usable ? What about Code::Blocks ? Anything else ?
Third, debugging. I'd really appreciate a debugger that enables step-by-step through source code, that sort of niceties ... I understand GDB works nice, but would there be something more user-friendly ?
Thxxxxx
Try monodevelop with mono-d. It works ok for me. Autocompletion is almost perfect, speed is very good and debugging works too. DDT works OK too, but autocompletion is not so perfect.
I would also suggest MonoDevelop with Mono-D plugin installed.
No matter how I love Mono-D, every now and then I have a problem with MonoDevelop (Xamarin Studio). - Not because of Mono-D, but because Xamarin constantly breaks the API it seems...
DDT is a very good alternative.
Before these two, I used Code::Blocks which had pretty nice D integration. I did not check the state of it lately.
Finally, you always have VisualD as a very good option if you are a Windows user. In fact, if you use Windows, this is your best option, in my humble opinion.
+1 for Mono-D. Although the debugger is not that good, and using it with an AMD card with factory drivers may result in missing editor tab captions. Installing unstable versions help, but it may break other things like refactoring with 5.3. But it's mutch better than Eclipse by my opinion, and handles GDC and LDC toolchains flawlessly.

Microsoft Visual Studio Express 2012 will not run a single program

Let me apologize in advance for the new-guy quality of this question. I would much rather be asking a question about something more interesting, like a challenging Project Euler question or evolutionary algorithms, but alas I am stuck with major VSE 2012 problems.
Up until around four hours ago, VSE 2012 worked perfectly fine. Now, I can't even run a simple "Hello, World" program. No compile errors, although I did have an issue with symbols not being found at the beginning of this nightmare, but I managed to resolve that. It compiles, but it does not run. The console window appears, but no output is displayed, no prompt for input is displayed, nothing is processed. All that appears is the "Please press any key to continue..."
I'm starting to think that my configuration of VSE is corrupted, that maybe I need to uninstall, reboot, and reinstall it all, but I'm hoping that's not the case. My version of VSE is up to date, as is my redistributable. My specs are pretty normal, XPS 15z run-of-the-mill laptop running Windows 7, handled VSE perfectly fine for several months until now.
Since VSE started to act up I have been operating through the command line, although I'm really starting to miss an IDE for C++, it just isn't the same. If VSE doesn't start looking up, I'll just have to get a plug-in for Eclipse or actually put in the time to learn how to use Emacs (maybe this is a sign? haha).
I'm sorry for the rant. Has anyone experienced problems like this? The problem isn't that my program is running too quickly (at least I don't think), since prompting for user input doesn't work, nor does the dreaded system("pause").
Any help will be greatly, greatly appreciated. Let me know if you need more information.
Reinstall it. If it's compiling and running correctly through the command line then it's a problem with VS.
Considering the issue with the symbols, it sounds like you have the choice of either reinstalling or spending a potential several hours fixing some super specific configuration corruption case.

Find out where application is hanging

Is there a way to figure out where an application is hanging and not completing its function? I opened the call stack but it is empty. What does this mean. Does anyone have any advice for debugging where an application was the moment it started to hang/become non responsive.
Edit: I am using Visual Studio 2010
When this happens to me, I find attaching the Very Sleepy profiler to the debugee often makes it easy to identify where the hang occurred, even if you attach it after it happened - just look for stackframes that were active for 100% of the profiler sampling session (by sorting the list by the "Inclusive %" column and looking at the top).
Compile your application with all warnings enabled and with the compiler producing debugging information. On Linux, that means g++ -Wall -g. Work on the source code till you got no more warnings. Learn to use a debugger (e.g. gdb on Linux), and use its step by step abilities.
But we can't help you more, because this is system dependent and you did not tell what system you are using and you did not show us the code you are debugging.
Read How To Debug Small Programs
In addition to using the debugger, run a profiler through the code. My VS is rather rusty, so I can't give details on how to do so, but google can help.
It would also help to have many small functions instead of few large ones, as the tightest granularity of the profile is function level.
Put log statements into the code. It is time consuming but some sort of divide and conquer approach should help you solve the problem.

Outlining in VS2008, C++, not working

I'm using VS2008 (version 9.0.30729.1 SP) and have found that outlining regularly stops working. I get outlining options for the start and end of functions, and for comment blocks, but not for other code blocks, such as ifs, while loops, for loops, etc... Using Reset all settings, as recommended in a similar previous question temporarily fixes the problem, but it comes back going in and out of visual studio. It also has the side effect of requiring me to reset all my C++ directories. Any ideas how to resolve this?
Edit: Using Right Click / Outlining / Collapse block works, but is a bit tedious. I'd really like to see the embedded pluss and minus symbols on the graphic outline. I've tried all the other outlining sub-menu options but to no avail.
My suggestion would be to write a script which every couple of hours adds a randomized post to the VS2008 support forums, requesting that this feature be made more robust, until someone at MS promises to improve it. ;-)
More seriously, you might make a copy of the VS configuration settings files, work until the bug reoccurs, then make another copy, and diff the two versions to see what might have changed. That might give a clue, since resetting the settings seems to fix it temporarily.

Programs don't work on Vista and Server 2008

Many, if not all, of my old VC++ 6.0 MFC apps don't work in Vista and Server 2008. I had that migration was a problem, but now it's my problem :(
How do I go about making these things work? Is that possible? I've searched, but is there some repository of knowledge on this subject?
edit:
Compatibility mode seems to work.
There should be specific reasons why they don't work, and of course, what exactly does not work. Maybe you should break each issue into a separate question (maybe here at SO) and tell us exactly what kind of problems you have when you try to run them, and what is the code that makes those errors show up.
Without the details, it's too vague. There is no magic you can apply to make applications simply work just like that.
There's a document available here that explains how to develop UAC compliant applications.
Without recompiling, have you tried setting the compatibility mode on the program to Windows 98 or ME?