Joal tutorial crashes

I am just starting to learn OpenAl to use it in my game.
I downloaded the first Tutorial and installed the OpenALwEAX.exe. If I run the first Tutorial, it crashes.
What am I doing wrong?

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x182A86AC
Function=alcOpenDevice+0x473
Library=C:\WINNT\system32\OpenAL32.dll

Current Java thread:
at net.java.games.joal.ALCImpl.openDeviceNative(Native Method)
at net.java.games.joal.ALCImpl.alcOpenDevice(ALCImpl.java:57)
at net.java.games.joal.util.ALut.alutInit(ALut.java:69)
at SingleStaticSource.main(Unknown Source)

Dynamic libraries:
0x00400000 - 0x00406000 C:\WINNT\system32\java.exe
0x77880000 - 0x77901000 C:\WINNT\System32\ntdll.dll
0x77DA0000 - 0x77DFB000 C:\WINNT\system32\ADVAPI32.dll
0x77E70000 - 0x77F32000 C:\WINNT\system32\KERNEL32.DLL
0x77D30000 - 0x77DA0000 C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll
0x08000000 - 0x08136000 C:\Programme\Java\j2re1.4.2\bin\client\jvm.dll
0x77E00000 - 0x77E64000 C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.DLL
0x77540000 - 0x77571000 C:\WINNT\system32\WINMM.dll
0x10000000 - 0x10007000 C:\Programme\Java\j2re1.4.2\bin\hpi.dll
0x007C0000 - 0x007CE000 C:\Programme\Java\j2re1.4.2\bin\verify.dll
0x007D0000 - 0x007E8000 C:\Programme\Java\j2re1.4.2\bin\java.dll
0x007F0000 - 0x007FD000 C:\Programme\Java\j2re1.4.2\bin\zip.dll
0x18270000 - 0x1827F000 G:\upload\JOAL\lesson1\bin\joal.dll
0x182A0000 - 0x18368000 C:\WINNT\system32\OpenAL32.dll
0x77A40000 - 0x77B36000 C:\WINNT\system32\ole32.dll
0x77530000 - 0x77539000 C:\WINNT\system32\wdmaud.drv
0x18400000 - 0x1840E000 C:\WINNT\system32\nvopenal.dll
0x78310000 - 0x783A0000 C:\WINNT\system32\setupapi.dll
0x77C00000 - 0x77C5E000 C:\WINNT\system32\USERENV.DLL
0x71780000 - 0x7180A000 C:\WINNT\system32\COMCTL32.dll
0x18410000 - 0x18422000 C:\WINNT\System32\GRXP4DLL.DLL
0x77810000 - 0x77817000 C:\WINNT\system32\VERSION.dll
0x75940000 - 0x75946000 C:\WINNT\system32\LZ32.DLL
0x77910000 - 0x77933000 C:\WINNT\system32\imagehlp.dll
0x72970000 - 0x7299D000 C:\WINNT\system32\DBGHELP.dll
0x68F30000 - 0x68F3B000 C:\WINNT\system32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 292K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 57% used [0x10010000, 0x10059010, 0x10090000)
from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000)
tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000)
the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000)
compacting perm gen total 4096K, used 1103K [0x14010000, 0x14410000, 0x18010000)
the space 4096K, 26% used [0x14010000, 0x14123c50, 0x14123e00, 0x14410000)

Local Time = Sun Aug 03 16:21:11 2003
Elapsed Time = 0

The exception above was detected in native code outside the VM

Java VM: Java HotSpot™ Client VM (1.4.2-b28 mixed mode)

Can you tell me a little more about your configuration? (WinNT/Win2000/WinXP, Audio card, memory,etc)

Win2k with an NForce (Asus A7N8X Deluxe Board) chipset…Audio and Gfx onboard…1 gig ram Athlon 2500+

I also am crashing outside the VM.

I’m running Windows XP on a Dell system. The sound card is a “SoundMAX Integrated Digital Audio” chip by Analog Devices, Inc. The system has 512 megs of RAM.

I installed OpenAL from ftp://opensource.creative.com/pub/sdk/al_beta_0_6.exe. I tested the install with the demos from ftp://opensource.creative.com/pub/sdk/ALTests.zip and they worked successfully with the Default (NULL) device, but not any of the other devices.

I also noticed that the joal.jar file in the tutorials is different from the main download, incluing a ALut class the main does not. That took a little while to figure out since I don’t use ant to build.

Crash info for Lesson1:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.

Current Java thread:
at net.java.games.joal.ALCImpl.openDeviceNative(Native Method)
at net.java.games.joal.ALCImpl.alcOpenDevice(ALCImpl.java:55)
at net.java.games.joal.util.ALut.alutInit(ALut.java:69)
at SingleStaticSource.main(SingleStaticSource.java:127)

Dynamic libraries:
0x00400000 - 0x00406000 c:\Development\j2sdk1.4.2_02\bin\java.exe
0x77F50000 - 0x77FF7000 C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F46000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5D000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08138000 c:\Development\j2sdk1.4.2_02\jre\bin\client\jvm.dll
0x77D40000 - 0x77DCC000 C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll
0x10000000 - 0x10007000 c:\Development\j2sdk1.4.2_02\jre\bin\hpi.dll
0x00390000 - 0x0039E000 c:\Development\j2sdk1.4.2_02\jre\bin\verify.dll
0x003A0000 - 0x003B9000 c:\Development\j2sdk1.4.2_02\jre\bin\java.dll
0x003C0000 - 0x003CD000 c:\Development\j2sdk1.4.2_02\jre\bin\zip.dll
0x003F0000 - 0x003FF000 C:\Development\j2sdk1.4.2_02\jre\lib\ext\joal.dll
0x02E80000 - 0x02E94000 C:\WINDOWS\System32\OpenAL32.dll
0x72D20000 - 0x72D29000 C:\WINDOWS\System32\wdmaud.drv
0x72D10000 - 0x72D18000 C:\WINDOWS\System32\msacm32.drv
0x77BE0000 - 0x77BF4000 C:\WINDOWS\System32\MSACM32.dll
0x77BD0000 - 0x77BD7000 C:\WINDOWS\System32\midimap.dll
0x02F40000 - 0x02F4F000 C:\Development\Projects\joal\lesson1\lesson1\joal.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58D000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 295K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 57% used [0x10010000, 0x10059cc8, 0x10090000)
from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000)
tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000)
the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000)
compacting perm gen total 4096K, used 1145K [0x14010000, 0x14410000, 0x18010000)
the space 4096K, 27% used [0x14010000, 0x1412e648, 0x1412e800, 0x14410000)

Local Time = Wed Oct 29 13:49:54 2003
Elapsed Time = 0

The exception above was detected in native code outside the VM

Java VM: Java HotSpot™ Client VM (1.4.2_02-b03 mixed mode)

[quote]I installed OpenAL from ftp://opensource.creative.com/pub/sdk/al_beta_0_6.exe. I tested the install with the demos from ftp://opensource.creative.com/pub/sdk/ALTests.zip and they worked successfully with the Default (NULL) device, but not any of the other devices.
[/quote]
ALut.init() now calls ALC.alcOpenDevice(null) rather than ALC.alcOpenDevice(“DirectSound3D”) on windows. Also, alcOpenDevice(null) was causing the VM to crash. This has also been fixed. Since you were apparently having problems when specifying a non-null device on you machine these issues may be related. So you may want to download the newest version of the demos and try again. Please let me know (or better yet, file a bug with the Issue Tracking Tool) if you are still having problems.

I’ve successfully got Lesson1 running now. By installing the latest joal nightly build and droping them into the ext directory of the JRE I’m using, the application seems to run fine.

Wahoo!!! One down, 775 more platform configurations to go. Let me know if things stop working for you. :slight_smile:

I’ve added a poll to the forum in an attempt to get an assessment of how stable the current version of JOAL is on different windows platform configurations. Please follow the instructions on post #1 of the poll before voting. Your participation in this survey will be greatly appreciated, and go a long way toward getting us to a stable release. Thanks in advance!

Dear All,

I downloaded the tutorials and JoAL yesterday (and the latest OpenAL SDK), recompiled everything, pass the tests (in the SDK and JoAL) but the tutorial are crashing and I have the same error output as listed in previous emails.

But what is odd is that if I run the samples from a DOS box, then they work. If I run them from an IDE, then they crash. I am on WinXP, I don’t use EAX, use Eclipse IDE.

I tried to trace the issue. The problem seems to be in Java_net_java_games_joal_ALCImpl_createContextNative when it calls alcCreateContext(). That’s where the JVM crashes.

In lesson 1, on a DOS box, it crashes when I quit in ALut.aluExit() because in the first call, alc is null! Weird indeed as all other lessons work fine but only from a DOS box.

Thanks for your help,

Mike

That might help:
when I trace the issue on a DOS box, the DLL creates the device in openNativeDevice(), the java object it returns has address: a0c384.
When DLL’s createNativeContext() is called, in the DOS box, the device address is different. On Eclipse IDE, the address is the same.

So strangely enough: when createNativeContext() is given the same Java device object address, it crashes. When the address is different, it works.

Mike

OK I found the problem.
This was not related to JoAL but to an old joal.jar in Eclipse classpath.

Sorry for bothering you.

Mike