OpenAl crash

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • OpenAl crash

      Hi,

      Has anyone been using OpenAL and have thier program crash on "alGetError()"? I have a program that compiled and worked just fine under Window 2000 and when I upgraded a couple of weeks ago to XP, it stated crashing when I run it! I can't get any information as to why. The only thing that happens is the Dissasembly comes up empty (no assembly langauge code.. nothing.) The only information I get is "access violation" (DUH!)

      Any thoughts???

      Sabrina.
    • I've never used OpenAL, but if you're jmp'ing to a pile of invalid assembly code, the problem is probably with a function pointer of some sort being invalid (either a C-style function pointer or a virtual function).

      Since it worked on 2000 and not on XP, my first reaction is a driver incompatibility. Did you do a fresh install of XP (reformat), or did you do an upgrade? I've seen cases where doing the upgrade caused funky problems like this. You may want to try updating your audio drivers and making sure you have the latest OpenAL library.

      -Rez
    • Hi,

      When I changed to XP, I did a full upgrade (format). I did take note of the drivers and did notice that I did not install them. I had to install them when using 2k, but did not install them when going to XP (the sound was working, so I did'nt think I would need them - opps!). I did the driver install and upgraded the drivers now. Once I installed them, I did a reboot and tryed to run the program again... no change. It still crashes at "alGetError()", I did comment this liine out, but will crash at another line "alGenBuffers(...)"

      I do have the latest updates to OpenAL (OpenAL 1.1).

      I'm still stumped! I've been googling for a solution or even a hint, but no luck.

      Sabrina
    • Hmmm. What does the program do? Is this a full game demo, or are you just playing a few sounds? Try writing a quick program that does nothing but load a single sound and play it in OpenAL. Maybe try two or three different sounds as well.

      The point is to narrow it down a bit. You'll discover if the problem is with this demo code you have, or if it's a deeper issue either in OpenAL itself, your sound drivers, your implementation of it (maybe you're not setting the DONT_CRASH_IN_XP flag?) or something similar.

      -Rez
    • Hi,

      First, thanks for taking the time to help :)

      The program is just a simple demo that demostrates how to play a wave file using OpenAL -"tutorial code". I downloaded it from "http://www.devmaster.net/articles/openal-tutorials/lesson1.php" several months ago and like I stated above, it was working great until I moved over to XP.

      Heres the weird part, prior to moving to XP I was able to compile and run the code. Now that I have moved to XP, the executable will work, but when I compile and make an new execurtable it crashes (both in Debug and Release). I don't understand why the old executable will work, but when compiling and running a new version... KABOOM!

      I made a dmp file and opening it in Dumpchk, but I don't see anything that makes sence or even a hint of what the problem might be. The " _CrtSetDbgFlag(...)" code is no help at all to me. So yes, I have been trying to narrow the problem down.

      Frustrating..

      Sabrina
    • Wait, the old executable works? That's a little odd. Did you change your compiler at all? Which comiler are you using?

      This is starting to sound like something to do with compiler settings. Are you using the exact same project, solution, and/or make files? Have you changed even one line of code?

      -Rez
    • LOL.... yes. The old executable that I compiled months ago works. It is the very same project and exact files, nothing was changed or altered. Also, nothing was changed or altered in the compiler settings. Since I'm using VC7 it will keep the compiler setting unique for each project, there should'nt be anything in there I need to change. (?) The only thing I changed, is to tell the compiler I want a map file created. I was hoping that it could tell me something... (?)
    • Have you pinpointed when exactly it crashes? is it initialization, when it tries to play the sound... when?

      Let's try this. First, send me both executables along with whatever DLL's I need to run them (I doubt I have OpenAL installed here). I'll try running them both. If I can get the second one to work, it's definately a driver or system-specific problem.

      -Rez
    • Okay, here's what I get:

      main.exe -> Opens and closes immediately. No sound.
      Old- Lesson1.exe -> Gives me a menu to play, stop, etc. I choose play and still hear no sound.

      Since main.exe closed immediately, it looks like it's dieing in the call to ALinit() since that's the only interesting line before you start printing stuff. I can't build this since I don't have the SDK. Can you send me the call stack? That will at least show me where to start looking.

      -Rez
    • I have had the same results with that demo. I used the executable that came with the demo and it played just fine. I used the exact same source code and compiled it myself with the OpenAL libs and it run (I get the menu) but it doesnt play the sound. I am on XP64 Pro.

      I tried all sorts of stuff to get it to play. I think I have a sound driver issue. If you are still having this problem later I can check it out when I get home. I have OpenAL 1.1 installed on a 32bit and 64bit machine. I'll try both.

      Good luck.

      The post was edited 1 time, last by DragonCode ().

    • RE: OpenAl crash

      Hi guys,

      When I first started to learn about OpenAL, I had the same problem. It would start up and play no sound. After searching awhile, I go it to work. I'm trying to remember how I fixed it.

      Did you place the "OpenAL32.dll" into the "....Windows/System32" directory? Make sure the program is reading from wavdata/Fancypants.wave.

      At least the Old-Lession.exe is not crashing on you :) the ALinit() is ok with me just crashes at another place. (Click a button that says, "Dont't send", and the other says, Send Error Report to Microsoft's Black hole where you'll never get help from them".) I think I'm more confused now as to why yours is not crashing.

      I'm not sure how to send you a Stack Call list, are you asking me whats in the Stack Call windows pane when I am in debug mode? If not, where I get the Stack Call list?

      Sabrina
    • Im finally home from the embedded linux nightmare...

      I am fooling around with the OpenAL stuff right now... Im at the point where the original Lesson1.exe works just fine, but when I build the code it executes fine and the quit command works but there is no sound when I try to play it.

      Hows it coming along for you?

      *Edit -
      I grabbed the stuff from your webserver and built it with VS 6.0 and .NET 2003 (debug version). Each version compiled and ran (played sound too) unlike my other peice of code) I had to set a few directory paths, but that was it. Which IDE are you using to build it?

      Are you doing a clean build each time?

      There isnt much to the call stack on this one

      main.exe!main.exe(int argc=1, argv= "some address"
      main.exe!mainCRTSTartup()
      Kernell.dll

      I would suggest putting a break point on the first line in main and checking to see that argv has a valid address in the call stack (Im not sure you would even get that far but its worth a shot) I think if you do get that far then it *will* be valid.

      Hope this helps.

      The post was edited 1 time, last by DragonCode ().

    • RE: OpenAl crash

      Here is the Call Stack windows pane:

      This is just before the alGetError().

      Source Code

      1. > main.exe!main(int argc=1, char * * argv=0x00901458) Line 237 C++
      2. main.exe!mainCRTStartup() Line 259 + 0x19 C

      This is when alGetError() is called.

      Source Code

      1. > 00000000()


      I know this is not helpful, which is why I was hoping Dumpchk would help.

      When I first downloaded this code, it did not play any sound for me, I found a posting talking about this. Some "postee" made a fix for it.
      devmaster.net/forums/showthread.php?t=313
      (took me a while to remember) This is the same code that I am using now.

      For several hours today I was googling, and googling for any postings to any a similar problem. I was also looking at the OpenAL docs for some clue, but no luck. I checked out Barns and Noble for a book(s) on it, no luck.

      I did put break points at the beginning of the program, which is how I know it crashes at glGetError().

      I did notice something about the "Old-Lesson.exe", and the "main.exe" the Old-lession.exe has 101 KB as where the main.exe only has 44.0 KB. Would a lib not be linking to my code somewhere? Does this even mean anything?

      Yes, I am a Harvard brat. I am just about done with grad school. All I have left is my thesis paper. I'm on a little vacation right now. :) I think I should point out that my GPA is from my undergraduate years, but my graduate GPA is 3.93.

      BMP? Whats wrong with BMP files? Slow to download? (hehe)

      Did you run my little (dumb) demo program? Thoughts? Comments? Suggestion? (other than the lighter fluid :) )

      Sabrina
    • You have a reference to a function that doesn't exist. My guess would be that it's loading Alut.dll, but something's failing when it exports whatever function it's trying to call. If it couldn't find the DLL at all, it should have given you an error right off the bat.

      Maybe your DLL versions are off, or perhaps you're using a version of OpenAL that's not the same as the runtime DLL's?

      -Rez
    • Actually a .dll isn't necessarily needed for compilation or building the .exe. The .dll is needed at runtime to supply the "meat" of the functionality that may or may not be prototyped in the .lib file.
      The alutInit function call may be corrupting things. Try putting a call to alutGetError before the init call and see what happens.

      The post was edited 1 time, last by DragonCode ().

    • Yes I know, but you usually get a runtime error when trying to run the application without the DLL. I got one when I tried to run it until I put the DLL in the same directory.

      If the DLL is loaded by the alutInit() function and alutGetError() is defined in the DLL, this won't work.

      Since it worked for DragonCode, I would suggest comparing DLL versions.

      -Rez