[svn2621] Bus errors on Mac

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

[svn2621] Bus errors on Mac

#1 Post by yufra »

I'll preface this with a big "no clue what is going on." Updated to SVN 2621, compiled, and now every time I go to create a new character within a module I get this:

Code: Select all

... stdout from the main menu and stuff ...
LuaVM:	Lua 5.1
Program received signal:  “EXC_BAD_ACCESS”.
(gdb) bt
#0  0x0025fad1 in SDL_ThreadID ()
#1  0x002516fb in SDL_WaitThread ()
#2  0x0007933e in create_particles_thread () at src/particles.c:833
#3  0x0006c7ab in boot_lua (state=1, rebooting=1 '\001', argc=1, argv=0x4082b0) at src/main.c:690
#4  0x0006d129 in tengine_main (argc=1, argv=0x4082b0) at src/main.c:890
#5  0x00044d65 in -[SDLMain applicationDidFinishLaunching:] (self=0x422ba0, _cmd=0x98982502, note=0x41c4b0) at src/mac/SDLMain.m:213
#6  0x935fc4df in _nsnote_callback ()
#7  0x95648793 in __CFXNotificationPost ()
#8  0x9564819a in _CFXNotificationPostNotification ()
#9  0x935f1384 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#10 0x935fe789 in -[NSNotificationCenter postNotificationName:object:] ()
#11 0x9913f422 in -[NSApplication _postDidFinishNotification] ()
#12 0x9913f332 in -[NSApplication _sendFinishLaunchingNotification] ()
#13 0x992964ed in -[NSApplication(NSAppleEventHandling) _handleAEOpen:] ()
#14 0x9929610d in -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] ()
#15 0x936317a4 in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] ()
#16 0x93631568 in _NSAppleEventManagerGenericHandler ()
#17 0x94406f58 in aeDispatchAppleEvent ()
#18 0x94406e57 in dispatchEventAndSendReply ()
#19 0x94406d61 in aeProcessAppleEvent ()
#20 0x921d3389 in AEProcessAppleEvent ()
#21 0x9910f9ca in _DPSNextEvent ()
#22 0x9910efce in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#23 0x990d1247 in -[NSApplication run] ()
#24 0x00044b4f in CustomApplicationMain (argc=1, argv=0xbffff690) at src/mac/SDLMain.m:150
#25 0x00044e83 in main (argc=1, argv=0xbffff690) at src/mac/SDLMain.m:244
Ok fine, it looks like the particles thread from the main menu isn't clearing. I look up SDL_SemPost, see that it has a return value and I am curious to see what it is so I make the following change and recompile:

Code: Select all

--- src/particles.c	(revision 2621)
+++ src/particles.c	(working copy)
@@ -829,7 +829,8 @@
 		{
 			threads[i].running = FALSE;
 			int status;
-			SDL_SemPost(threads[i].keyframes);
+			int test;
+			test = SDL_SemPost(threads[i].keyframes);
 			SDL_WaitThread(threads[i].thread, &status);
 			printf("Destroyed particle thread %d (%d)\n", i, status);
 		}
And no crash. I revert the change... crash. Add the change... no crash. Do I really believe this can be fixing the problem? No. But... well I don't know. :D
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [svn2621] Bus errors on Mac

#2 Post by darkgod »

Hum I toyed with thread deletion, try current svn now
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: [svn2621] Bus errors on Mac

#3 Post by yufra »

Problem found and squashed, coming to an SVN near you.
<DarkGod> lets say it's intended

Post Reply