Last modified: 2008-09-12 17:15:16 UTC
I compiled the latest svn-sourcecode of cortado using the Java 6 SDK supplied by the Debian repositories. Compiling works fine but after that it is not possible to play a video. Cortado buffers, starts playing and stops with messages like that: java.lang.ArrayIndexOutOfBoundsException: 64 at com.fluendo.jheora.DCTDecode.ExpandToken(DCTDecode.java:531) at com.fluendo.jheora.Decode.unpackAndExpandToken(Decode.java:455) at com.fluendo.jheora.Decode.unPackVideo(Decode.java:598) at com.fluendo.jheora.Decode.loadAndDecode(Decode.java:650) at com.fluendo.jheora.State.decodePacketin(State.java:74) at com.fluendo.plugin.TheoraDec$2.chainFunc(TheoraDec.java:211) at com.fluendo.jst.Pad.chain(Pad.java:257) at com.fluendo.jst.Pad.push(Pad.java:271) at com.fluendo.plugin.Queue$1.taskFunc(Queue.java:135) at com.fluendo.jst.Pad.run(Pad.java:339) at java.lang.Thread.run(Unknown Source) [INFO] [Message]: Pad: videodec:sink type: ERROR, 64 [INFO] got EOS Pad: videodec:sink [INFO] Pad: videosink:sink got EOS [INFO] Element: [pipeline] got EOS from sink: Element: [videosink] [INFO] ogg: got EOS [INFO] got EOS: Pad: v_queue:sink [INFO] got EOS: Pad: a_queue:sink [INFO] video pad removed Pad: :serial_1118493027 [INFO] audio pad removed Pad: :serial_1145241550 [INFO] cleanup [INFO] Status: Show [INFO] [Message]: Pad: v_queue:src type: STREAM_STATUS, stop, reason: error, flow stopped [INFO] [Message]: Pad: buffer:src type: STREAM_STATUS, stop, reason: error, flow stopped [INFO] [Message]: Pad: a_queue:src type: STREAM_STATUS, stop, reason: wrong-state, stopping [INFO] [Message]: Pad: a_queue:src type: STREAM_STATUS, stop, reason: wrong-state, flow stopped [INFO] [Message]: Pad: v_queue:src type: STREAM_STATUS, stop, reason: wrong-state, stopping [INFO] [Message]: Pad: buffer:src type: STREAM_STATUS, stop, reason: wrong-state, stopping [INFO] [Message]: Pad: httpsrc:src type: STREAM_STATUS, stop, reason: wrong-state, reason: wrong-state [INFO] [Message]: Pad: httpsrc:src type: STREAM_STATUS, stop, reason: wrong-state, stopping Again, with Java 5 (aka 1.5) everything works fine. Im am using a Debian lenny system, amd64 architecture and Java 6 update 6
Oh, I forgot something. Sample files: http://pozimski.eu/itheora/data/bd1_pp.ogg http://pozimski.eu/itheora/data/Parteitag.ogg http://pozimski.eu/itheora/data/RedeDirk.ogg
bd1_pp.ogg works just fine on my 32-bit system. If someone could confirm this on a 64-bit system, that would be handy. Have you tried using the precompiled jar file that we distribute with OggHandler? <http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/OggHandler/cortado-ovt-stripped-wm_r31776.jar>
Yes, I tried it as well and it shows the same messages and doesn't work either on my system.
Confirmed under QEMU.
The problem appears to be the background compilation feature of JVM, not the architecture. I reproduced it in 32-bit mode and found it to be dependent on JVM options: works: appletviewer -J-client test.html broken: appletviewer -J-server test.html works: appletviewer -J-server -J-Xbatch test.html Apparently if you're on a 64-bit architecture, it always uses the server VM. I've submitted this to the Java bug tracker, now waiting for review ID 1284931.
A bug against the compiler has been filed under 6732194. This should be posted to http://bugs.sun.com shortly. Any updates on the bug should be visible there. It's currently in the queue for evaluation.
I've applied the workaround suggested on the Sun bug report, updated the jar in OggHandler SVN, and deployed it on Wikimedia. It works for me with -J-server, I assume it works on 64-bit too. My thanks to Matt for getting this to the right people.
I compiled it myself and I can confirm it works now even on 64-bit. Thank you very much for your great work.
The bug has now been fixed in OpenJDK/JDK 7 development, so once it's mainstream, the workaround should no longer be required. It shouldn't hurt anything to have the workaround in there though.