I'm using Excelsior JET to
create a .exe out of my java app (not my idea, but I have to run
with it). I'm using Xuggle 5.4 (win7, 64-bit, but 32-bit Xuggle
version) to decode a network video stream (h264). When my app
runs as a normal java app (using jdk6), things work well. When
I run in the JET .exe (it uses its own jvm) it crashes when I
close my video player window.
More details
* I'm using the MediaTool API (ToolFactory.makeReader(URL), then
I create a separate thread to tell the reader to read more
packets
* Crash occurs right after I close the MediaReader, and exit
from the player thread
* The error has to do with not being able to suspend the native
thread
JET's answer is that this is
"misuse in code
of Xuggle native methods. Specifically,
a native thread attaches itself to the JVM using the
AttachCurrentThread()
function but when it terminates it does not call
DetachCurrentThread()."
I'm not sure I agree, since this only happens using their JVM -
but let's say they are correct -- is there a way to force the
native thread to detach itself?
When does the native thread get created and how do I tell it to
go away?
The error looks like this (for the sake of
completeness).
AJ-runtime trap: kind = 1, source =
Z:\users\giguz\buildsystem\build\aj-runtime\rt-normal\core\runtime\windows\java\com\excelsior\jet\runtime\os\OSThread.java,
line
= 181
Unexpected OS failure: SuspendThread() failed (error code 5)
JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR #44 (runtime trap).
Please, contact the vendor of the application.
Extra information about error is saved in the "jet_err_5768.txt"
file.
Any clues would be appreciated - thanks.
-Mike