[Openal-devel] Bug in openal/win/Router/alc.cpp
Kenneth B. Russell
kbrussel at alum.mit.edu
Fri Dec 23 21:22:10 PST 2005
I've been doing some work recently on the Java bindings for OpenAL
project (http://joal.dev.java.net/) and have found a bug in the
OpenAL32.dll "router" DLL. The bug is at line 484 of
openal/win/Router/alc.cpp. Code earlier than that searches through the
current working directory and other places for the pattern "*oal.dll"
intending to find OpenAL implementations like (the misnamed)
wrap_oal.dll. This inadvertently picks up JOAL's "joal.dll" in certain
situations like when joal.dll is in the cwd and tries to dynamically
look up entry points in it. Failing to find them, it executes line 484
with a NULL alcOpenDeviceFxn and crashes jumping to PC 0x0. Here is the
stack trace from Visual Studio:
OpenAL32.dll!FindDllWithMatchingSpecifier(char
*dllSearchPattern=0x02c9656c, char * specifier=0x0007f7b4, bool
partialName=false, char * actualName=0x0007f780) Line 1025 C++
OpenAL32.dll!alcGetString(ALCdevice_struct * device=0x00000000, int
param=4100) Line 1865 + 0x19 C++
OpenAL32.dll!alcOpenDevice(const char * deviceName=0x00000000) Line
1630 + 0x11 C++
I don't know what the correct fix is but at least there should be a test
against alcOpenDeviceFxn being null at this point. Is this sufficient to
pinpoint the bug and what the fix should be?
As a workaround we've renamed joal.dll to joal_native.dll but this could
happen with any other DLL ending in "oal.dll" so it should definitely be
fixed.
Thanks,
-Ken
More information about the Openal-devel
mailing list