![]() |
|
OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - Printable Version +- iDevGames Forums (http://www.idevgames.com/forums) +-- Forum: Development Zone (/forum-3.html) +--- Forum: Graphics & Audio Programming (/forum-9.html) +--- Thread: OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS (/thread-4305.html) |
OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - 0ctane - Apr 30, 2006 02:03 PM There was a post with similar title, but its content was not relevant, so here is my problem. Porting a MMORPG to OS X. 3D part of game has been running fine, and I started playing with the sound/music component. Game uses OpenAL, and I am borrowing 10.4's framework. Sound effects have been working fine, and I moved on to ogg formatted music. I compiled my own Ogg and Vorbis frameworks. Occasionally now, the game will crash. Crashreport let me know that the offending thread was from OpenAL: Code: PID: 330Code: Program received signal EXC_BAD_ACCESS, Could not access memory.This is all on a MacBook Pro. OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - OneSadCookie - Apr 30, 2006 03:09 PM It's a bug in the OpenAL that comes with 10.4. It's fixed in the latest development branch, but you'll need to compile it from source. If you want to avoid the inconvenience, http://onesadcookie.com/svn/repos/Thirdparty knows how to build an OpenAL framework that works on ppc/10.3.9+ and i386/10.4.0+ and includes a source snapshot with this bug fixed, or you can just download Outnumbered from http://onesadcookie.com/Software and pull the precompiled framework out of the application bundle. OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - 0ctane - May 10, 2006 06:05 PM I compiled that snapshot without issue. I replaced the OpenAL.framework from /System/Library/Frameworks since my program wants to link against that one. Is there a way to change the search order so that /Library/Frameworks or ~/Library/Frameworks is searched first? Anyhow, now I just get static from the game rather than music (although I did not notice any crashing). OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - OneSadCookie - May 10, 2006 06:24 PM That framework is set up to live inside your application bundle. You should not ever edit /System under any circumstances. You'll need to make sure your application is linked against the new AL, not the system one. Odd that you're getting static -- It certainly works for me in Outnumbered, and I haven't had any bug reports about it. OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - 0ctane - May 10, 2006 07:12 PM Yeah, I know it is meant to live in the bundle. I changed the order of the Framework Search Paths to avoid the System OpenAL.framework. While a separate OpenAL problem seems to be fixed (relating to buffers), I still get static/snow when trying to play a *.ogg. What audio formats did you use in your game? OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - OneSadCookie - May 10, 2006 07:17 PM It's playing Oggs. OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - 0ctane - May 10, 2006 07:51 PM Hmmm.... I tried to use your framework too (from your game), but I still got static. This begs the question, what is different between your snapshot and the version that comes with 10.4.5? The OS X version will play the music fine, but it eventually crashes with the previously mentioned errors. *.wav files are fine. OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - OneSadCookie - May 10, 2006 08:24 PM Sounds like you have a broken ogg/vorbis library, or you're loading your ogg files with the wrong endianness... The "Thirdparty" link above builds ogg & vorbis too if you're interested
OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - 0ctane - May 10, 2006 09:00 PM Quote:Sounds like you have a broken ogg/vorbis libraryMaybe, since I compiled my own frameworks since i386 versions were not available. However, *.ogg music will play using built-in OS X OpenAL and my ogg/vorbis libraries..it is just that OpenAL will crash after playing looping music for a while. This may be a dumb question, but do your scripts do anything more than the xcode projects included in libogg and libvorbis? Well, other than not actually producing the framework architecture/package? BTW, the OpenAL snapshot did not fix that other problem that I briefly mentioned. Ugg, this is a pain. Thank you for your patience. OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - 0ctane - May 28, 2006 10:59 AM OSC, when is that openal snapshot from? [edit] well, I grabbed the latest subversion from openal.org, compiled it, and ogg sound seems to be playing fine. Now I have to wait to see if it crashes after a while. OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS - OneSadCookie - May 28, 2006 01:43 PM That snapshot was off the 1.1 development branch. I haven't checked out the state of the repository recently, so perhaps the 1.1 branch has been merged onto the trunk, or perhaps the bug was fixed for 1.0... but neither of those were the case when I made the snapshot
|