Hello Guest

OPENAL and Linux

  • 15 Replies
  • 13817 Views
OPENAL and Linux
« on: July 28, 2004, 20:42:25 »
Hi everybody,

and once again a silly (?) question...  :D

we are now implementing the first sounds in our slot machine and of course we want to use openal.

on windows it works fine but on linux we always get an error when accesing the native library. i put the liblwjgl.so in the library path and (i suppose) the library gets found but crashes when trying to reproduce sound.

i was wondering if there's missing a library since the windows lwjgl version comes with 2 DLLs and the linux version only has the liblwjgl.so

i suppose we need the openal driver/library for linux but i read in this tutorial
http://www.lwjgl.org/documentation.php?page=tutorials/openal/devmaster/lesson1
that the linux contributor of openal isnt "alive" anymore.

does anybody know how to get the openal library/driver for linux?
or are we just completely wrong??? (also quite possible)  :D

chris

*

Offline Matzon

  • *****
  • 2242
OPENAL and Linux
« Reply #1 on: July 28, 2004, 20:44:10 »
http://openal.org/

Quote
cvs -d:pserver:guest@opensource.creative.com:/usr/local/cvs-repository login
(use password "guest")
cvs -d:pserver:guest@opensource.creative.com:/usr/local/cvs-repository co openal

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
OPENAL and Linux
« Reply #2 on: July 28, 2004, 22:36:50 »
I'd like a stack trace of the crash and OS/LWJGL version, please :-) Oh, and the program you're running (did you try the standard tests?)

 - elias

OPENAL and Linux
« Reply #3 on: July 28, 2004, 22:48:32 »
thanks matzon,

but we are still crashing...
(An unexpected exception has been detected in native code outside the VM) - same error as before.  :cry:

do we need to specify some -Djava.library.path?

chris

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
OPENAL and Linux
« Reply #4 on: July 28, 2004, 23:05:09 »
Could you give a complete crash log? Most of the time a stack trace is included. It helps tremendously.

 - elias

OPENAL and Linux
« Reply #5 on: July 28, 2004, 23:09:36 »
we put the libopenal.so in the same folder (where all our jar files are located). i suppose we dont need to specify -Djava.library.path=. in this case, no?

chris

OPENAL and Linux
« Reply #6 on: July 28, 2004, 23:18:11 »
thanks elias, so here we go...

Code: [Select]

root@localhost Nuevo WinZip File]# export PATH=/usr/java/j2re1.4.2_05/bin/:$PATH
[root@localhost Nuevo WinZip File]# java -Djava.library.path=./ -cp
.:lwjgl.jar:audiotest.jar sound.Test1
 
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xA
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 org.lwjgl.openal.AL10.nalBufferData(Native Method)
        at org.lwjgl.openal.AL10.alBufferData(Unknown Source)
        at sound.Test1.loadALData(Test1.java:112)
        at sound.Test1.execute(Test1.java:168)
        at sound.Test1.main(Test1.java:210)
 
Dynamic libraries:
08048000-08056000 r-xp 00000000 03:02 82677    
/usr/java/j2re1.4.2_05/bin/java08056000-08059000 rw-p 0000d000 03:02 82677    
/usr/java/j2re1.4.2_05/bin/java40000000-40015000 r-xp 00000000 03:02 516168    
/lib/ld-2.3.2.so
40015000-40016000 rw-p 00014000 03:02 516168     /lib/ld-2.3.2.so
40017000-4001f000 r-xp 00000000 03:02 566233    
/usr/java/j2re1.4.2_05/lib/i386/native_threads/libhpi.so
4001f000-40020000 rw-p 00007000 03:02 566233    
/usr/java/j2re1.4.2_05/lib/i386/native_threads/libhpi.so
40020000-40024000 rw-s 00000000 03:02 82739      /tmp/hsperfdata_root/3227
40025000-4002f000 r-xp 00000000 03:02 758101     /lib/tls/libpthread-0.29.so
4002f000-40030000 rw-p 0000a000 03:02 758101     /lib/tls/libpthread-0.29.so
40032000-40034000 r-xp 00000000 03:02 516179     /lib/libdl-2.3.2.so
40034000-40035000 rw-p 00002000 03:02 516179     /lib/libdl-2.3.2.so
40036000-40432000 r-xp 00000000 03:02 807649    
/usr/java/j2re1.4.2_05/lib/i386/client/libjvm.so
40432000-4044d000 rw-p 003fb000 03:02 807649    
/usr/java/j2re1.4.2_05/lib/i386/client/libjvm.so
4045f000-40471000 r-xp 00000000 03:02 516183     /lib/libnsl-2.3.2.so
40471000-40472000 rw-p 00011000 03:02 516183     /lib/libnsl-2.3.2.so
40474000-40495000 r-xp 00000000 03:02 758099     /lib/tls/libm-2.3.2.so
40495000-40496000 rw-p 00020000 03:02 758099     /lib/tls/libm-2.3.2.so
40496000-40499000 r--s 00000000 03:02 16621    
/usr/java/j2re1.4.2_05/lib/ext/dnsns.jar
40499000-404a0000 r-xp 00000000 03:02 516415     /lib/libgcc_s-3.2.2-20030225.so.1
404a0000-404a1000 rw-p 00007000 03:02 516415     /lib/libgcc_s-3.2.2-20030225.so.1
404a4000-404af000 r-xp 00000000 03:02 516189     /lib/libnss_files-2.3.2.so
404af000-404b0000 rw-p 0000a000 03:02 516189     /lib/libnss_files-2.3.2.so
404b0000-404c0000 r-xp 00000000 03:02 679439    
/usr/java/j2re1.4.2_05/lib/i386/libverify.so
404c0000-404c2000 rw-p 0000f000 03:02 679439    
/usr/java/j2re1.4.2_05/lib/i386/libverify.so
404c2000-404e2000 r-xp 00000000 03:02 679425    
/usr/java/j2re1.4.2_05/lib/i386/libjava.so
404e2000-404e4000 rw-p 0001f000 03:02 679425    
/usr/java/j2re1.4.2_05/lib/i386/libjava.so
404e4000-404f8000 r-xp 00000000 03:02 679440    
/usr/java/j2re1.4.2_05/lib/i386/libzip.so
404f8000-404fb000 rw-p 00013000 03:02 679440    
/usr/java/j2re1.4.2_05/lib/i386/libzip.so
404fb000-41be4000 r--s 00000000 03:02 421411     /usr/java/j2re1.4.2_05/lib/rt.jar
41c2e000-41c44000 r--s 00000000 03:02 421409    
/usr/java/j2re1.4.2_05/lib/sunrsasign.jar
41c44000-41d1d000 r--s 00000000 03:02 421408     /usr/java/j2re1.4.2_05/lib/jsse.jar
41d1d000-41d2e000 r--s 00000000 03:02 421400     /usr/java/j2re1.4.2_05/lib/jce.jar
41fd6000-41fe3000 r--s 00000000 03:02 16622    
/usr/java/j2re1.4.2_05/lib/ext/ldapsec.jar
41fe3000-41fff000 r--s 00000000 03:02 16624    
/usr/java/j2re1.4.2_05/lib/ext/sunjce_provider.jar
42000000-4212e000 r-xp 00000000 03:02 758097     /lib/tls/libc-2.3.2.so
4212e000-42131000 rw-p 0012e000 03:02 758097     /lib/tls/libc-2.3.2.so
42133000-4267c000 r--s 00000000 03:02 421401    
/usr/java/j2re1.4.2_05/lib/charsets.jar
4c680000-4c880000 r--p 00000000 03:02 467775     /usr/lib/locale/locale-archive
4ca80000-4cb3b000 r--s 00000000 03:02 16625    
/usr/java/j2re1.4.2_05/lib/ext/localedata.jar
4cb3b000-4cb62000 r--s 00000000 03:02 130721     /root/download/testsound2/Nuevo
WinZip File/lwjgl.jar
4cb62000-4cb6f000 r--s 00000000 03:02 130728     /root/download/testsound2/Nuevo
WinZip File/audiotest.jar
4cb6f000-4cb9c000 r-xp 00000000 03:02 679442    
/usr/java/j2re1.4.2_05/lib/i386/liblwjgl.so
4cb9c000-4cba8000 rw-p 0002d000 03:02 679442    
/usr/java/j2re1.4.2_05/lib/i386/liblwjgl.so
4cbb7000-4cbc4000 r-xp 00000000 03:02 742260     /usr/X11R6/lib/libXext.so.6.4
4cbc4000-4cbc5000 rw-p 0000c000 03:02 742260     /usr/X11R6/lib/libXext.so.6.4
4cbc5000-4cca1000 r-xp 00000000 03:02 742250     /usr/X11R6/lib/libX11.so.6.2
4cca1000-4cca4000 rw-p 000db000 03:02 742250     /usr/X11R6/lib/libX11.so.6.2
4cca4000-4cd4d000 r-xp 00000000 03:02 354958     /usr/lib/libstdc++.so.5.0.3
4cd4d000-4cd52000 rw-p 000a9000 03:02 354958     /usr/lib/libstdc++.so.5.0.3
4cd57000-4cd8e000 r-xp 00000000 03:02 130730     /root/download/testsound2/Nuevo
WinZip File/libopenal.so
4cd8e000-4cd90000 rw-p 00036000 03:02 130730     /root/download/testsound2/Nuevo
WinZip File/libopenal.so
 
Heap at VM Abort:
Heap
 def new generation   total 576K, used 448K [0x44680000, 0x44720000, 0x44b60000)
 eden space 512K,  87% used [0x44680000, 0x446f0338, 0x44700000)
  from space 64K,   0% used [0x44700000, 0x44700000, 0x44710000)
  to   space 64K,   0% used [0x44710000, 0x44710000, 0x44720000)
 tenured generation   total 1408K, used 0K [0x44b60000, 0x44cc0000, 0x48680000)
   the space 1408K,   0% used [0x44b60000, 0x44b60000, 0x44b60200, 0x44cc0000)
 compacting perm gen  total 4096K, used 1271K [0x48680000, 0x48a80000, 0x4c680000)
   the space 4096K,  31% used [0x48680000, 0x487bdf38, 0x487be000, 0x48a80000)
 
Local Time = Thu Jul 29 01:27:48 2004
Elapsed Time = 1
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_05-b04 mixed mode)
#


chris

OPENAL and Linux
« Reply #7 on: July 28, 2004, 23:35:20 »
ah, i almost forgot:
the program that is crashing is the first openal tutorial from lwjgl.org:
http://www.lwjgl.org/documentation.php?page=tutorials/openal/devmaster/lesson1

...so i think that should work fine ...  :roll:

chris

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
OPENAL and Linux
« Reply #8 on: July 29, 2004, 11:17:43 »
Hm, that's weird, the alBufferData is not the first OpenAL call, so some AL is working. Could you check if the buffer given to alBufferData (waveData.data) is non-null and isDirect() is true? I've added checks for that in CVS but that won't help you now. What version of LWJGL are you using?

 - elias

OPENAL and Linux
« Reply #9 on: July 29, 2004, 12:19:32 »
hi elias,

I'll check this in a few hours (i cant use the linux pc right now). thanks a lot so far.  :D

i am using lwjgl 0.9 (which is declared to be stable)

chris

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
OPENAL and Linux
« Reply #10 on: July 29, 2004, 12:35:04 »
Quote from: "chriddel"

i am using lwjgl 0.9 (which is declared to be stable)

chris


No worries, I just wanted to know which version you are using to help me narrow down the problem.

 - elias

OPENAL and Linux
« Reply #11 on: July 29, 2004, 17:50:41 »
sorry elias,

but where is this isDirect() function?? I can't find it  :oops:

chris

OPENAL and Linux
« Reply #12 on: July 29, 2004, 19:34:06 »
java.nio.ByteBuffer.isDirect()

OPENAL and Linux
« Reply #13 on: July 30, 2004, 15:24:25 »
finally...

ok i just tested the new version and it crashes exactly the same way.
the bytebuffer IS direct and wavedata IS NOT null.

so it should have worked ...  :cry:  ... but it has NOT.

maybe creative changed something in the openal library?
- dont think so but i dont know what to do now...

would be nice if anyone could send me a precompiled libopenal.so file.
or i could prepare a webstart - maybe i did something VERY silly and i dont see the stupid error. but then again: it wouldnt work in windows - wouldnt it?

so most probably its a configuration problem on the linux pc. we use red hat 9, sis motherboard, ati radeon 9200.

somebody has any advice??? help!!  :D

chris

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
OPENAL and Linux
« Reply #14 on: July 30, 2004, 15:44:05 »
You could always try Alien Flux or Super Elvis if you want to test openal.
Do you have an email address I can send the build to?

 - elias