|
GDB says: Program received signal SIGTRAP in ntdll.dll |
Niunio
Member #1,975
March 2002
|
Folowing with this: I've learned how to use gdb and I think I've found where the error is. There is the code line:
And this is what gdb says:
What's happening? ----------------- |
CGamesPlay
Member #2,559
July 2002
|
I think this is a delayed error. I think you free something and then modify it later, and the system catches it next time it does a malloc. In conclusion, make sure you set variables to NULL after you delete them, and try it out. -- Ryan Patterson - <http://cgamesplay.com/> |
Niunio
Member #1,975
March 2002
|
I don't think so. Anyway I've checked all "free" calls I do in all modules and I set all variables to NULL after delete them and also before create them (malloc) and I have same the error. ----------------- |
ReyBrujo
Moderator
January 2001
|
Unluckily CGP is right. You have a buffer overrun somewhere in your code. Your best chance is beginning to comment code until you have your program running, and then adding code until it breaks again. -- |
Niunio
Member #1,975
March 2002
|
Find it. Oh, man! That was the most stupid error I've done ever: I just put "Cnt<=basNumLabels" instead of "Cnt<basNumLabels" in a for loop . Now it runs. But I can't understand why it fails in Windows but run perfect in GNU/Linux. Anyway, thanks: you make me think and check each bit of the program. I thought I never find it. Can't send cookies, sorry but I'll thank you in the "readme" file of the final release ----------------- |
CGamesPlay
Member #2,559
July 2002
|
The reason is that MSVCRT's debugging library does heap checking, and GNU/Linux's glibc doesn't (well, maybe the debugging version does, but I doubt you were using it). Valgrind would have found this error, though. -- Ryan Patterson - <http://cgamesplay.com/> |
ReyBrujo
Moderator
January 2001
|
It is not on by default, there must be a switch to turn it on. -- |
|