erluk's picture

[Audio] Crash in AudioContext::CreateContext on x64

Project:The Open Toolkit library
Category:bug report

System: Vista 64bit
Soundcard: XFi Xtreme Music
Assembly target platform: both Any CPU and x64

When calling Alc.GetInteger on line 349 in AudioContext.cs, there is an unhandled StackOverflowException. This can be reproduced by running any of the OpenAL examples from the example browser.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
iliak's picture


Maybe in relation with this thread

the Fiddler's picture


Thanks for the bug report.

Are you using OpenTK from trunk? If so, does this error also occur on OpenTK 0.9.9 or 0.9.8? (We have made several changes to OpenAL in trunk and this would help us identify the cause).

Edit: no, the issues do not seem to be related. This seems to be a regression introduced with the latest OpenAL changes (yesterday / today).

erluk's picture


The error was on OpenTK trunk r1978, but I get the same error on OpenTK 0.9.9 at the same call (line 317 in AudioContext.cs). Note that everything works as expected when I set the target platform to x86.

the Fiddler's picture


Thanks. Can you please check if the issue remains with the attached dll?

This is an OpenAL Soft binary compiled for x64, just unzip it to the Binaries/Debug folder and rerun Examples.exe.

OpenAL32.dll.zip46.7 KB
erluk's picture


Yes, it still crashes. Sysinternals' Process Monitor shows that the application can access the local OpenAl32.dll you supplied, but the "Load Image" operation is performed on %WINDIR%\System32\OpenAL32.dll

This happens for both the AnyCPU build and the x64 Build.

Inertia's picture


I'm curious whether you can figure this out. I tried and failed. All Unreal 3 games only ship as x86 builds, which IMO has something to do with both: PhysX having no x64 at all and OpenAL x64 windows drivers are close to catastrophic or non-existant (there is no ct_oal.dll for x64).

Rest assured this is nothing that was introduced due to the openal-next branch (0.9.9 release shows the exact same issue), x86 apps using OpenAL work absolutely fine under windows with either Creative or OpenAL Soft drivers. Even works if you install both drivers. Afaik trunk works fine with x64 drivers under Linux (I'm strongly assuming here that Fiddler did run the 2 new examples before commiting them). No idea about OSX.

the Fiddler's picture


Indeed, everything runs perfectly on Linux x64 and Vista x64 with OpenAL Soft.

Let me reboot into Vista and check with oalinst.exe.

Inertia's picture


Huh? You used a VM? I cannot get any x64 OpenAL app to work under Vista without it throwing up, and I did replace the openal32.dll in \windows\system32\

the Fiddler's picture


No, I don't have a Vista VM, but I've been able to use OpenAL on native Vista and Win7 without any issues. I've only tested with OpenAL Soft, however - I'll check Creative's implementation now.

Inertia's picture


Examples.exe crashes for me with a System.BadImageFormatException no matter if the x64 dll is in application directory or vista's root.

Anyway, I take it this confirms that it's a driver problem and the trunk is fine.