You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am using dcm4che on a java web application to convert Dicom Files to jpg which is mostly working fine but occasionally I get a JVM crash caused by libclib_jiio.so from the linux-x86-64 lib folder in dcm4che.
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007f8e3dc032d1, pid=17209, tid=13711
JRE version: OpenJDK Runtime Environment Corretto-11.0.16.9.1 (11.0.16.1+9) (build 11.0.16.1+9-LTS)
Java VM: OpenJDK 64-Bit Server VM Corretto-11.0.16.9.1 (11.0.16.1+9-LTS, mixed mode, tiered, compressed oops, parallel gc, linux-amd64)
Problematic frame:
C [libclib_jiio.so+0x742d1] jpeg_read_markers+0x461
After much investigation I discovered that the problem wasn’t actually happening when converting Dicoms but when reading jpegs with Javax imageio. I was able to fix this problem by including OpenCV 4.5.5(doesn’t depend on libclib_jiio.so) in a separate folder but doing this prevents dcm4che from opening image DCM images with jpeg compression because the included OpenCV is missing methods. I also tried building OpenCV myself to include Dicom support but it didn’t change anything.
I can’t seem to find any reference to this method in OpenCV’s documentation, is this a custom method added to OpenCV for dcm4che or is there some way to build OpenCV that includes this method?
I’m not certain if this is a bug in dcm4che or if there is something wrong with how I am using it but I thought it would be good to log it here in case it is something that needs looked at or if anyone has a workaround.
To Reproduce
Difficult to reproduce but I have a specific set of images that when uploaded together cause the crash, I believe 1 or multiple become corrupted in transit but haven’t been able to confirm this or find 1 specific image that always causes the crash.
Expected behavior
I expect reading jpgs with ImageIO and Dicoms with dcm4che to either work or fail without crashing the JVM.
OS: Any desktop OS server is on Amazon Linux 2 and replicated locally using Ubuntu 22.04
Browser any
Version any
The text was updated successfully, but these errors were encountered:
This means that the API is different from that of the native library. The cause is certainly that the version of the native library does not correspond to the version of dcm4chee.
It is necessary to load the library which is in dcm4che-5.29.2/lib/linux-x86-64/libopencv_java.so with the Java Option: -Djava.library.path=/NATIVE_SHARED_LIB_FOLDER
Describe the bug
I am using dcm4che on a java web application to convert Dicom Files to jpg which is mostly working fine but occasionally I get a JVM crash caused by libclib_jiio.so from the linux-x86-64 lib folder in dcm4che.
After much investigation I discovered that the problem wasn’t actually happening when converting Dicoms but when reading jpegs with Javax imageio. I was able to fix this problem by including OpenCV 4.5.5(doesn’t depend on libclib_jiio.so) in a separate folder but doing this prevents dcm4che from opening image DCM images with jpeg compression because the included OpenCV is missing methods. I also tried building OpenCV myself to include Dicom support but it didn’t change anything.
java.lang.UnsatisfiedLinkError: 'long org.opencv.imgcodecs.Imgcodecs.dicomJpgFileRead_0(java.lang.String, long, long, int, int)'
I can’t seem to find any reference to this method in OpenCV’s documentation, is this a custom method added to OpenCV for dcm4che or is there some way to build OpenCV that includes this method?
I’m not certain if this is a bug in dcm4che or if there is something wrong with how I am using it but I thought it would be good to log it here in case it is something that needs looked at or if anyone has a workaround.
To Reproduce
Difficult to reproduce but I have a specific set of images that when uploaded together cause the crash, I believe 1 or multiple become corrupted in transit but haven’t been able to confirm this or find 1 specific image that always causes the crash.
Expected behavior
I expect reading jpgs with ImageIO and Dicoms with dcm4che to either work or fail without crashing the JVM.
The text was updated successfully, but these errors were encountered: