Hi guys, i've developed an applet that handles displaying medical images, as well as an image converter application, the images handled are DICOM-JPEG2000 images. All is working fine, yet with some images, i am getting a crash in the jvm. In my code, i am relying on an open source library (dcm4che) to decode the image bytes and return for me a BufferedImage instance, and the reason i am doubting a bug in imageio is that the crash is occuring in the imageio dll (clib_jiio.dll). I also tried displaying the images using dcm4che alone(without integration to my code), as well as another imaging tool (apteryx), and both crashed in the dll. I have jre and imageio tools installed (i tried imageio 1.0_01 and the newer imageio 1.1-alpha, and they both crashed) Any suggestions? Thanks a lot guys, Mohammad
Here is a full trace of the crash: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x393FE15 Function=[Unknown.] Library=C:\j2sdk1.4.2_08\jre\bin\clib_jiio.dll
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 com.sun.medialib.codec.jp2k.Decoder.decode(Native Method) at com.sun.medialib.codec.jp2k.Decoder.decode(Decoder.java:107) at com.sun.media.imageioimpl.plugins.jpeg2000.J2KRenderedImageCodecLib.readAsRaster(J2KRenderedImageCodecLib.java:274) - locked <0x10018a70> (a com.sun.media.imageioimpl.plugins.jpeg2000.J2KRenderedImageCodecLib) at com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderCodecLib.read(J2KImageReaderCodecLib.java:322) at org.dcm4cheri.imageio.plugins.DcmImageReader.decompress(DcmImageReader.java:480) at org.dcm4cheri.imageio.plugins.DcmImageReader.read(DcmImageReader.java:366) - locked <0x10886c80> (a org.dcm4cheri.imageio.plugins.DcmImageReader) at javax.imageio.ImageIO.read(ImageIO.java:1384) at javax.imageio.ImageIO.read(ImageIO.java:1348) at dicomviewer.ImageData.setDataAndCreateImage(ImageData.java:553) at dicomviewer.ImageData.setDicomData(ImageData.java:124) at dicomviewer.DicomFile.load(DicomFile.java:312) at dicomviewer.Viewer.postData(Viewer.java:385) - locked <0x1053fa08> (a dicomviewer.Viewer) at dicomviewer.LoaderThread.run(LoaderThread.java:54)
Heap at VM Abort: Heap def new generation total 640K, used 611K [0x10010000, 0x100c0000, 0x104f0000) eden space 576K, 98% used [0x10010000, 0x1009def8, 0x100a0000) from space 64K, 68% used [0x100a0000, 0x100aae38, 0x100b0000) to space 64K, 0% used [0x100b0000, 0x100b0000, 0x100c0000) tenured generation total 8104K, used 5236K [0x104f0000, 0x10cda000, 0x14010000) the space 8104K, 64% used [0x104f0000, 0x10a0d0e8, 0x10a0d200, 0x10cda000) compacting perm gen total 7168K, used 6935K [0x14010000, 0x14710000, 0x18010000) the space 7168K, 96% used [0x14010000, 0x146d5e70, 0x146d6000, 0x14710000)
Local Time = Wed Dec 28 14:51:49 2005 Elapsed Time = 17 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_08-b03 mixed mode) # # An error report file has been saved as hs_err_pid3204.log. # Please refer to the file for further information. #
Have you gotten this code to work in a desktop application? I'm wondering if this isn't more of an applet/Java plugin/browser problem than an ImageIO problem.
Ping & DNS - updated with new look and Ping home screen widget
Joined: Nov 17, 2005
Well, i don't quite understand what you mean by that, but one thing i know is that my applet is signed, besides, most of the images are displaying properly, so why on some images it would crash if it wasn't for some bug in ImageIO? Thanks a lot Ulf for all your replies Best, Mohammad
If I understand well, I am prone to belive that the type of dicom jpeg 2000 images ( allways a little bit tricky) have some kind of problem to process the diferent tasks of compression and decompression.
There are an article complaining exactly about the limitations of this java library vis-a-vis the management of j2k images.
I'm telling this because we are facing the similar problems, with our applet which has the same scope of yours.
We have implemented a solutions in C++ - an activex component -- a dicom web viewer. I can send you the code if you like.
Our project used to be a commercial project, but we derived a brach only to deal with open - source code.
So , I ' ll be glad to see your software ( are there any demos ?) and if you agree your sorce code.
Perhaps we both can accelerate the developement of our solutions ?