We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1205

Summary: Crash on 10.4.11
Product: SDL Reporter: Vern Jensen <vern>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: critical    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Mac OS X 10.6   

Description Vern Jensen 2011-05-09 14:05:46 UTC
I'm not exactly sure how this happened, and have yet to duplicate it. I was running my game on my PPC iBook G4 (1.4 GHz) and was in fullscreen mode, when the Finder sent me some sort of notification -- some kind of dialog box notifying me of something. Sorry, I forget what! It might've been a message that my trusted network couldn't be joined (Airport wireless). Or something of that nature, I'm not sure. I also don't remember if it caused a crash instantly, and that's why I saw the dialog box, or if it automatically hid my game, so the dialog could be visible, and then my game crashed when I tried to go back to it.

But in any case, the notification did cause my app to crash, and it seems to be an issue in SDL's handling of the event. See crash report here. FYI, my ProcessSDLEvents function is simply this:

void ProcessSDLEvents(void)
{
	SDL_Event event;

	while (SDL_PollEvent(&event)) 
		MyHandleSDLEvent(&event);
}



Host Name:      vern-jensens-ibook-g4
Date/Time:      2011-05-05 12:51:13.116 -0700
OS Version:     10.4.11 (Build 8S165)
Report Version: 3

Command: Midnight Mansion
Path:    /Users/vern/Desktop/Midnight Mansion HD alpha 4/Midnight Mansion.app/Contents/MacOS/Midnight Mansion
Parent:  WindowServer [62]

Version: Simple version 1.0 (1.0)

PID:    413
Thread: 0

Exception:  EXC_BREAKPOINT (0x0006)
Code[0]:    0x00000001
Code[1]:    0x90a49cc0


Thread 0 Crashed:
0   libobjc.A.dylib                	0x90a49cc0 _objc_trap + 0
1   libobjc.A.dylib                	0x90a49c34 _objc_error + 76
2   libobjc.A.dylib                	0x90a49bc4 __objc_error + 64
3   com.apple.AppKit               	0x9382dea0 -[NSWindow resignKeyWindow] + 408
4   com.apple.AppKit               	0x939d6604 -[NSWindow _resignKeyFocus] + 60
5   com.apple.AppKit               	0x937904f4 -[NSApplication sendEvent:] + 4124
6   SDL                            	0x00491810 SDL_Delay + 2688
7   SDL                            	0x0047d3c0 SDL_WaitEventTimeout + 100
8   ...ourcompany.Midnight Mansion 	0x00059870 ProcessSDLEvents + 60
9   ...ourcompany.Midnight Mansion 	0x0003bd94 RunMainLoop + 80
10  ...ourcompany.Midnight Mansion 	0x0003bd04 StartUpGameCarbon + 396
11  ...ourcompany.Midnight Mansion 	0x00038020 main + 180
12  ...ourcompany.Midnight Mansion 	0x00003874 _start + 760
13  ...ourcompany.Midnight Mansion 	0x00003578 start + 48

Thread 1:
0   libSystem.B.dylib              	0x90053f88 semaphore_timedwait_signal_trap + 8
1   libSystem.B.dylib              	0x90053de4 pthread_cond_timedwait + 676
2   SDL                            	0x0048fa5c SDL_CondWaitTimeout + 184
3   SDL                            	0x0048ffa0 SDL_SemWaitTimeout + 156
4   SDL                            	0x00490a8c SDL_RemoveTimer + 692
5   SDL                            	0x00490258 SDL_ThreadID + 292
6   SDL                            	0x0049000c SDL_SemWait + 24
7   libSystem.B.dylib              	0x9002b908 _pthread_body + 96

Thread 2:
0   libSystem.B.dylib              	0x9000af48 mach_msg_trap + 8
1   libSystem.B.dylib              	0x9000ae9c mach_msg + 60
2   com.apple.CoreFoundation       	0x907dd9ac __CFRunLoopRun + 832
3   com.apple.CoreFoundation       	0x907dd2b0 CFRunLoopRunSpecific + 268
4   com.apple.audio.CoreAudio      	0x91454524 HALRunLoop::OwnThread(void*) + 264
5   com.apple.audio.CoreAudio      	0x914542c4 CAPThread::Entry(CAPThread*) + 96
6   libSystem.B.dylib              	0x9002b908 _pthread_body + 96

Thread 3:
0   libSystem.B.dylib              	0x90053f88 semaphore_timedwait_signal_trap + 8
1   libSystem.B.dylib              	0x900707e8 pthread_cond_timedwait_relative_np + 556
2   com.apple.audio.CoreAudio      	0x914656ac CAGuard::WaitFor(unsigned long long) + 204
3   com.apple.audio.CoreAudio      	0x914655bc CAGuard::WaitUntil(unsigned long long) + 304
4   com.apple.audio.CoreAudio      	0x91463800 HP_IOThread::WorkLoop() + 852
5   com.apple.audio.CoreAudio      	0x91463498 HP_IOThread::ThreadEntry(HP_IOThread*) + 16
6   com.apple.audio.CoreAudio      	0x914542c4 CAPThread::Entry(CAPThread*) + 96
7   libSystem.B.dylib              	0x9002b908 _pthread_body + 96

Thread 0 crashed with PPC Thread State:
  srr0: 0x90a49cc0 srr1: 0x0202f930                vrsave: 0x00000000
    cr: 0x24002444  xer: 0x20000002   lr: 0x90a49c38  ctr: 0x90020194
    r0: 0x90a49c34   r1: 0xbfffe320   r2: 0xa00012fc   r3: 0x000000c3
    r4: 0x00000000   r5: 0x000000c3   r6: 0x00000000   r7: 0x00000000
    r8: 0x00000000   r9: 0xa000cfca  r10: 0x6b6e65ff  r11: 0xa0006914
   r12: 0x90020194  r13: 0x00000000  r14: 0x00000000  r15: 0x00000000
   r16: 0x00000000  r17: 0x00000000  r18: 0x00000000  r19: 0x00000000
   r20: 0x00000000  r21: 0x01c10ec0  r22: 0x005016b8  r23: 0x005116b8
   r24: 0x005116b8  r25: 0x005116b8  r26: 0x005016b8  r27: 0x90a50838
   r28: 0x01c1eb90  r29: 0x01c1eb90  r30: 0x01c1eb90  r31: 0x90a49bf8
Comment 1 Vern Jensen 2011-05-09 14:06:15 UTC
Oh, and I believe this is using SDL-1.3.0-5445.
Comment 2 Sam Lantinga 2012-01-06 22:33:50 UTC
If you can reproduce it, please let me know!  (Maybe unplug your wireless router?)
There's not much I can get from the stack trace, unfortunately.
Comment 3 Sam Lantinga 2013-05-21 02:39:28 UTC
No response in 2 years, closing bug.

Please feel free to reopen this bug if it's still active in the current snapshot:
http://www.libsdl.org/tmp/SDL-2.0.zip

Thanks!