Can Someone Explain What This Means

Archives Forums/MacOS X Discussion/Can Someone Explain What This Means

SebHoll(Posted 2006) [#1]
Hi,

When I'm trying to compile Max'd GUI on a Mac, it seems to be working fine, deleting and creating windows, they appear to work, but then about 5 seconds later, the app terminates and Apple reports the following bug report:



Can anyone help me to understand what it means? It's running on an old G3 and debugging takes about 10 seconds per line of code so it's hard to pinpoint where it is going wrong.

Thanks


Seb


Winni(Posted 2006) [#2]
Hi, Seb,

Can you post the B.itzMax source code that causes that problem?

Greetz,
W.


SebHoll(Posted 2006) [#3]
Hi Winni,

Thanks but I can't really as it's 5000 lines spanning across 5 files and a commerical project. Do I need to post it to find out what the problem is, or can the above error report tell me what area I need to look at...

Seb


Winni(Posted 2006) [#4]
If you can extract the code pattern that causes the problem and put it in a small sample program, that would help to determine whether it is a bug in BlitzMax or something related to a specific system configuration.

I'm still not good at interpreting those OS X error reports, but maybe someone else here can explain the meaning of it.

Maybe you should also post the issue in the bug report thread. But without having some source code, it will be difficult if not impossible to find out what exactly goes wrong.

Grüsse aus Deutschland,
Winni


SebHoll(Posted 2006) [#5]
It seems to be happening when the EVENT handler loop has finished and is waiting at SelectEvent(). Reading this Apple Developer Technical Note, the crash seems to be because of the following...

EXC_BAD_ACCESS/KERN_INVALID_ADDRESS — This is caused by the thread accessing unmapped memory. It may be triggered by either a data access or an instruction fetch; I describe how to tell the difference in a later section.


According to this document the next part of the report backtraces the functions (where function 0 is the one that crashed). It looks like it is the garbage collector that is crashing when it's trying to clear-up a recently free'd window:

1 com.apple.AppKit 0x9373993c -[NSWindow _setWindowNumber:] + 276
2 com.apple.AppKit 0x937aa970 -[NSWindow _termWindowIfOwner] + 144
3 com.apple.AppKit 0x937a99e8 -[NSWindow dealloc] + 860
4 com.apple.Foundation 0x9291c968 NSPopAutoreleasePool + 536
5 Max'dGUI 0x00002fac bbFlushAutoreleasePool + 44 (crt.c:355)
6 Max'dGUI 0x00099c40 bbSystemWait + 48 (crt.c:355)
7 Max'dGUI 0x0009a984 _brl_system_TMacOSSystemDriver_Wait + 28


Winni: Maybe because of this, I should post this in the Bug Reports afterall? Anyone any other ideas/comments?

Update: I've tried adding GCSetMode(2) to prevent automatic garbage collection but it still chokes at WaitEvent().


skidracer(Posted 2006) [#6]
Seb, if you could email me the source will try and reproduce here.