Hi Nicolas,
I've faced the similar problem with the codecs. I tried the example above. I created a simple project in Eclipse. When I run the project in debug mode, there's no error. But if I run it, it fails within few seconds. So I compared in on Linux and Windows and it crashes on both:
Linux: java version "1.8.0_202", ldd (Gentoo 2.27-r6 p3) 2.27,
15:55:45.838 [Thread-4] DEBUG org.dcm4che3.imageio.codec.Transcoder - Compressed frame #1 in 41 ms, ratio 3.1085312:1
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fc1766c1161, pid=18255, tid=0x00007fc153dfd700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_202-b08) (build 1.8.0_202-b08)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.202-b08 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C15:55:45.838 [Thread-1] DEBUG org.dcm4che3.imageio.codec.Transcoder - Compressed frame #1 in 32 ms, ratio 3.1085312:1
15:55:45.839 [Thread-4] DEBUG org.dcm4che3.imageio.codec.Transcoder - Compressor: org.dcm4che3.opencv.NativeJLSImageWriter
15:55:45.839 [Thread-1] DEBUG org.dcm4che3.imageio.codec.Transcoder - Compressor: org.dcm4che3.opencv.NativeJLSImageWriter
[libc.so.6+0x16a161]
Windows 10: java version "11.0.3"
18:04:36.555 [Thread-4] DEBUG org.dcm4che3.imageio.codec.Transcoder - Decompressed frame #1 in 15 ms, ratio 1:3.1085129
java.lang.Exception: unknown exception
18:04:36.567 [Thread-4] DEBUG org.dcm4che3.imageio.codec.Transcoder - Decompressor: org.dcm4che3.opencv.NativeImageReader
at org.opencv.imgcodecs.Imgcodecs.dicomJpgMatRead_0(Native Method)
at org.opencv.imgcodecs.Imgcodecs.dicomJpgMatRead(Imgcodecs.java:195)
at org.dcm4che3.opencv.NativeImageReader.getNativeImage(NativeImageReader.java:278)
at org.dcm4che3.opencv.NativeImageReader.read(NativeImageReader.java:251)
at org.dcm4che3.imageio.codec.Transcoder.decompressFrame(Transcoder.java:588)
at org.dcm4che3.imageio.codec.Transcoder.decompressPixelData(Transcoder.java:447)
at org.dcm4che3.imageio.codec.Transcoder.processPixelData(Transcoder.java:428)
at org.dcm4che3.imageio.codec.Transcoder.access$200(Transcoder.java:70)
at org.dcm4che3.imageio.codec.Transcoder$1.readValue(Transcoder.java:383)
at org.dcm4che3.io.DicomInputStream.readAttributes(DicomInputStream.java:534)
at org.dcm4che3.imageio.codec.Transcoder.transcode(Transcoder.java:362)
at test.transcode.Transcode.run(Transcode.java:41)
at java.base/java.lang.Thread.run(Thread.java:834)
Difference between Windows and Linux is that on Linux the system kills the whole process, on Windows it just throws an Exception and the rest continues without any problem.
Kind regards
Jan
Dne středa 24. dubna 2019 9:19:39 UTC+2 Nicolas Roduit napsal(a):