THIS is ridiculous! Just today I've been reassuring myself that the compiler isn't evil and doesn't want to play tricks on me when this happens:
I opened a 2 weeks old project, built it (again)... At the very very end, the point where I save my data, the program crashed over and over again. Next, the program started to crash at the very beginning, over and over again! :(
So I added a printf() to see where the program is crashing, to my surprise, it no longer crashed at the beginning, but only at the end. Removed the printf(), the program crashed at the beginning, like a boss, over and over again!
I'm using Code::Blocks... Suggestions may keep me from going insane.
haha..you knw, it kinda funny when this happens. Dude, don't blame the compiler, its does its job very efficiently. Check you input , in my opinion, it may be the root oft the problem.
Good luck, n yea, post your source code, none of us
can tell anything without the source code.
It IS there! And the application was able to read the source file the first couple of times but wasn't able to output into the destination. In the next runs, the application couldn't even read the source file it seems. Sometimes I added a printf() somewhere and it was able to read the source file, but still couldn't output in the destination file...
Yes I'll try that when I get to work, I had the entire folder archived someplace else, when I copied it back to my work directory, it did this weird behavior, and these are two instances that didn't throw in error:
Ah you mean the code snippets. Yes, See I did almost 50 or so versions of the code (don't ask me why), and each time I include the header and the definitions file, which include function1() and function2(). I compiled the code more than 500 times (not kidding), and not once did the compiler raised an error.
One day I wanted to wrap my function, i.e. main() in a DLL, only then, my compiler raised an error.
Reason why application crashed at starting point in realtime mode: no clue (but it stopped)
Reason why application crashed at starting point in Debug mode: the data was in the Release and Debug folders. In debug mode, data should be stored in the project directory o_O
Reason why application crashes at the end: a segmentation fault when attempting to fprintf() a header to the file specified by a filename...
EDIT: Now I'm getting another SIGSEGV at the beginning! To hell with it I'm not gonna waste my time on this... If it I found out why I'm having this I'll tell you guys.