Crash on exit [Mac OS X]

Found a bug? Report it here.

Moderator: PPS-Leaders

Post Reply
Teddy
Noxonian Grollknom
Posts: 7
Joined: Thu Sep 29, 2011 6:59 am

Crash on exit [Mac OS X]

Post by Teddy » Thu Oct 20, 2011 8:21 pm

Hi everybody

I think it's an already well known bug, but I just wanted to ask, whether my workaround I found for this is legal or not.
So, the problem is, that Orxonox crashes on Mac OS X every time you want to end it the normal way (via menu) and not with Command-Q.
As I run through this with the debugger I found out, that it somehow hangs up, while performing the alutExit() command.
So I asked my friend google what the problem could be and I found out that alutInit and alutExit aren't really necessary, if you handle the initialization yourself (what's being done in Orxonox).
After removing alutInitWithoutContext(NULL, NULL) and alutExit() in the SoundManager.cc file, it didn't crash anymore and I could exit the game with the menu.

So, is it legal to remove these functions or is there anything else that could make alutExit crash?

Thx for your reply
Teddy
Ignore my spelling mistakes and pardon my grammar...

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Crash on exit [Mac OS X]

Post by x3n » Thu Oct 20, 2011 10:12 pm

I cannot answer your question directly, but I remember that we had some trouble with sound on mac anyway, so it might well be possible that this is a known problem. Since this is probably not a new issue, you could try to see if it also happens in the (old) mac_osx2 branch.

After all you could just commit it and we test it on our systems (linux, windows) and see if it works.
Fabian 'x3n' Landau, Orxonox developer

Teddy
Noxonian Grollknom
Posts: 7
Joined: Thu Sep 29, 2011 6:59 am

Re: Crash on exit [Mac OS X]

Post by Teddy » Fri Oct 21, 2011 3:09 pm

The mac_osx2 branch does crash at the same line of code.
I commited my change and I hope it won't crash on the other systems.
Ignore my spelling mistakes and pardon my grammar...

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Crash on exit [Mac OS X]

Post by x3n » Sat Oct 22, 2011 9:27 am

I tested it on Windows: It seems to work (at least I hear sound and it doesn't crash), but I get a warning during startup of Orxonox:
Status: Loading sound
Warning (internal): [sound] MIME Type retrieval failed: The operation was invalid in the current ALUT state
I have yet to test it on Linux... actually I compiled it yesterday, but then I forgot to run it :D
Fabian 'x3n' Landau, Orxonox developer

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Crash on exit [Mac OS X]

Post by x3n » Sat Oct 22, 2011 1:26 pm

Update: The same behavior on Linux (some Tardis-like box at ETH)
Fabian 'x3n' Landau, Orxonox developer

Teddy
Noxonian Grollknom
Posts: 7
Joined: Thu Sep 29, 2011 6:59 am

Re: Crash on exit [Mac OS X]

Post by Teddy » Sat Oct 22, 2011 1:31 pm

Well, I get this warning too, but at least it doesn't crash anymore.
I also got an email from Reto Grieder telling me to use

Code: Select all

#if !defined(ORXONOX_PLATFORM_APPLE)
#endif
instead of just normally outcommenting the whole thing and I just did so.

Anyway, thx for testing :)
Ignore my spelling mistakes and pardon my grammar...

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Crash on exit [Mac OS X]

Post by x3n » Sat Oct 22, 2011 1:34 pm

Yeah I just noticed your last commit, works fine. Thanks!
Fabian 'x3n' Landau, Orxonox developer

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: Crash on exit [Mac OS X]

Post by 1337 » Mon Oct 24, 2011 4:07 am

Just to add my mustard:
thx Teddy

(proverbs are so funny when translated literally...)
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Crash on exit [Mac OS X]

Post by x3n » Tue Oct 25, 2011 8:10 am

Actually we should have a look into this warning because simply ignoring it might be wrong. And if we can fix it, we could also remove the #if again. Since you changed the initialization of alut, we may have to call another function to allow the MIME type retrieval.
Fabian 'x3n' Landau, Orxonox developer

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: Crash on exit [Mac OS X]

Post by 1337 » Tue Oct 25, 2011 1:15 pm

I totally agree.
However last time I tried to fix this (or something very similar, it's been a while) with Kevin, we never got on a green twig after hours.
There was more to it though, I just don't remember anymore. And of course, we didn't write it down either...
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests