App crashes with no Error

Archives Forums/BlitzMax Bug Reports/App crashes with no Error

shinkiro1(Posted 2012) [#1]
Hello,

My app seems to crash randomly and also in the debug mode no error is shown. It's a MaxGui app but I don't think it has to do with MaxGUI. The thing is it's a very hard to reproduce error.

The error only occurs when i load a map into my editor. I tested it and it has nothing to do with loading either, it's about the TMap Enumerator. At one point in the loading process I iterate through all Values of a TMap. And that seems to be the problem.

The strange thing is that this error happens only around 10% of the time. It doesn't matter if I just recompile or restart it. When it crashes, i just restart the app, do the exact same thing as before (load the same map) and then in magically works.

I'm using OSX 10.7.3 and this the crash report which also indicates some problem with the enumerator of TMap.



EDIT: I did a ram test but everything seems fine.

Last edited 2012


Danny(Posted 2012) [#2]
Check if you're using any recursive routines.
I've only had this type of behavior happening when recursively calling a the same function - that didn't end. And some internal calling stack or whatever would crash instantly without spit or warning.


Floyd(Posted 2012) [#3]
Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000038
That looks like the important part.

Nothing in your program should try to access such a low address. In the old days of assembly language or C this would probably mean you were accessing some kind of table with a pointer of the form "base + offset". But base was set to zero instead of the correct address.

I don't know how to go about tracking this down in your BlitzMax code. When it crashes do you always get that same address, or at least some other very low address?


shinkiro1(Posted 2012) [#4]
Thanks for your replies.
I've narrowed it down to some piece of code of mine which would be too complex to post here.
If if find the bug i'll post it here.