Opened 10 years ago

Closed 10 years ago

#2317 closed defect (fixed)

Random CTD (segfaults) at startup on OSX

Reported by: wraitii Owned by:
Priority: Should Have Milestone: Alpha 17
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by historic_bruno)

I get random crashes to desktop at fairly regular intervals on OSX. Stacktrace:

0   pyrogenesis                   	0x0000000105185cd1 CParser::InputTaskType(std::string const&, std::string const&) + 1 (Parser.cpp:817)
1   pyrogenesis                   	0x0000000105153647 CConfigDB::Reload(EConfigNamespace) + 215 (basic_string.h:279)
2   pyrogenesis                   	0x0000000105163b02 CONFIG_Init(CmdLineArgs const&) + 306 (Singleton.h:53)
3   pyrogenesis                   	0x0000000105168d3c Init(CmdLineArgs const&, int) + 380 (GameSetup.cpp:920)
4   pyrogenesis                   	0x0000000104ad3f3b SDL_main + 1659 (main.cpp:470)
5   pyrogenesis                   	0x0000000104dcc9e1 -[SDLMain applicationDidFinishLaunching:] + 97
6   com.apple.CoreFoundation      	0x00007fff8ea56eda _CFXNotificationPost + 2554
7   com.apple.Foundation          	0x00007fff92f087b6 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
8   com.apple.AppKit              	0x00007fff93c0152d -[NSApplication _postDidFinishNotification] + 292
9   com.apple.AppKit              	0x00007fff93c01266 -[NSApplication _sendFinishLaunchingNotification] + 216
10  com.apple.AppKit              	0x00007fff93bfe452 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 566
11  com.apple.AppKit              	0x00007fff93bfe04c -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 351
12  com.apple.Foundation          	0x00007fff92f2207b -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 308
13  com.apple.Foundation          	0x00007fff92f21edd _NSAppleEventManagerGenericHandler + 106
14  com.apple.AE                  	0x00007fff97ec8078 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 307
15  com.apple.AE                  	0x00007fff97ec7ed9 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 37
16  com.apple.AE                  	0x00007fff97ec7d99 aeProcessAppleEvent + 318
17  com.apple.HIToolbox           	0x00007fff91bc3709 AEProcessAppleEvent + 100
18  com.apple.AppKit              	0x00007fff93bfa836 _DPSNextEvent + 1456
19  com.apple.AppKit              	0x00007fff93bf9df2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
20  com.apple.AppKit              	0x00007fff93bf11a3 -[NSApplication run] + 517
21  pyrogenesis                   	0x0000000104dcc7c4 CustomApplicationMain + 548
22  pyrogenesis                   	0x0000000104dccda0 main + 272
23  libdyld.dylib                 	0x00007fff8f5ae7e1 start + 1

Attachments (1)

soundmanagerfix.patch (563 bytes ) - added by wraitii 10 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by wraitii, 10 years ago

Milestone: Alpha 16Alpha 15
Priority: Should HaveRelease Blocker

comment:2 by historic_bruno, 10 years ago

Description: modified (diff)

Need more info. Which version of the game are you using? Which version of OS X? Is the stacktrace typically the same or different every time? From reading IRC it seems this crash isn't highly reproducible, so unless I see otherwise, I wouldn't consider it a release blocker, but there's not much to go on yet.

comment:3 by wraitii, 10 years ago

Milestone: Alpha 15Alpha 16
Priority: Release BlockerShould Have

Happens rarely enough.

by wraitii, 10 years ago

Attachment: soundmanagerfix.patch added

comment:4 by wraitii, 10 years ago

This looks fixed by the above patch (and the error I get when it happens seems like it could be mutex-lock related).

edit: nevermind, it just happened twice in a row.

Last edited 10 years ago by wraitii (previous) (diff)

comment:5 by historic_bruno, 10 years ago

Hmm, I thought it might be a config thread-safety issue, which leper has been fixing recently. Same problem is occurring on SVN?

comment:6 by wraitii, 10 years ago

Happens on SVN too, yes. Definitely seems thread-safety related.

(for the record on OSX I can't actually start the game in debug mode as it's stuck in a mutex lock).

Last edited 10 years ago by wraitii (previous) (diff)

comment:7 by sanderd17, 10 years ago

Milestone: Alpha 16Alpha 17

comment:8 by ben, 10 years ago

In 15269:

Fixes rare crash in sound manager, due to worker thread dereferencing global pointer before it had been assigned. Fixes #2333, refs #2387, #2317.
Fixes potential infinite loop if worker thread was running but not enabled.
Fixes apparent bug in fading sound smoothness.
Cleans up worker class slightly.
Cleans up weird and inconsistent whitespace.

comment:9 by historic_bruno, 10 years ago

I don't know if r15269 fixes this bug or not, it doesn't mention SoundManager in the call stack (it only shows the main thread), so I have left it open for now.

comment:10 by wraitii, 10 years ago

Resolution: fixed
Status: newclosed

I haven't had this in any game I've started so far, so I'll assume it's fixed and re-open if I end up finding otherwise.

Note: See TracTickets for help on using tickets.