Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The program closes with an error when opening any file #410

Closed
Sergey-5000 opened this issue May 12, 2023 · 12 comments
Closed

The program closes with an error when opening any file #410

Sergey-5000 opened this issue May 12, 2023 · 12 comments

Comments

@Sergey-5000
Copy link

Please check the GitHub issues system, the forum and/or this website first to see if your problem has not been reported yet.

Describe the bug
When opening any DICOM or jpg file, the program closes

To Reproduce
Steps to reproduce the behavior:

  1. File->Open->Dicom->Local Device->Files and/or folders
  2. Click on '...'
  3. Select folder or file
  4. Import and close (or Import)

Expected behavior
In version 4.0.3, everything was open and you could work. Expectations in the new version are the same...

Desktop (please complete the following information):

  • OS: Kubuntu 20.04
  • Weasis Version [e.g. 4.1.0]

Additional context
deb, snap, flatpak give the same result.
"free(): invalid pointer"

Screenshots
If applicable, add screenshots to help explain your problem.

Traces
If applicable, add log files from Weasis or from the DICOM archive.
report.txt

@aatoma
Copy link

aatoma commented May 12, 2023

Affected by this same issue on fully updated Arch and WEASIS 4.1.0

The only information I can add is that at startup Weasis logs that it is using Java 20.0.1 while on my system java -version returns 17.0.7

@Sergey-5000
Copy link
Author

Installed a new version of Java:
java --version
java 20.0.1 2023-04-18
Java(TM) SE Runtime Environment (build 20.0.1+9-29)
Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)

But it had no effect. The program still closes.

report_2.txt

@konstare
Copy link

I have the same problem. I am using Ubuntu 22.04.2 LTS and installed the deb package from the website -weasis_4.1.0-1_amd64.deb.

@AlexZaka
Copy link

It seems there is a problem with OpenGL in Weasis. I observed the similar crashes while was testing Weasis 4.1.0 in Windows 10 virtual system on Virtualbox. With switched off 3D acceleration everything worked as expected. When I tried to switch on 3D, Weasis crashed on loading study.

@nroduit
Copy link
Owner

nroduit commented May 14, 2023

There is no need to install Java because it is packaged in the application.

The problem is related to a native library compiled in a static way. The problem is quite strange because it does not occur on all systems (works for me on Ubuntu 22.04 but not on version 20.04).

The problem is difficult to identify because it does not trigger a fatal error log and by compiling the library in debug the problem does not occur.

When I deactivate the 3D module, I have no errors although there is no link with the library that triggers the "invalid pointers"! Here is how to disable the module while waiting for a fix:

  • Edit the file in ~/.weasis/data/weasis-core/persistence.properties
  • Modify the 2 properties:
opengl.enable=false
opengl.prev.init=false

@AlexZaka
Copy link

AlexZaka commented May 15, 2023

Besides the possible OpenGL issues, it maybe kind of side effects of using latest Java and therefore latest build tools for building Java. My custom built Weasis for Windows (Java 20.0.1+9, Microsoft VS 2022) works fine on updated Windows 10, but fails to load DICOMDIR on original Windows LTSC 2019 and Windows 7. Just did nothing with nothing in log, even without any 3D support.

@Sergey-5000
Copy link
Author

I confirm, with the 3D module disabled when changing values in the file ~/.weasis/data/weasis-core/persistence.properties:
opengl.enable=false
opengl.prev.init=false
the program itself began to run.

@fabmazz
Copy link

fabmazz commented May 19, 2023

Same problem here, with the latest RPM installed in Fedora 36, when trying to load a DICOMDIR from a CD, the program crashes. Starting from command line only gives the following output (last lines):

19.05.2023 16:40:56.682 *INFO* [AWT-EventQueue-0] org.weasis.dicom.rt.RtDisplayToolFactory: Activate the RT panel
19.05.2023 16:40:56.697 *INFO* [FelixStartLevel] org.weasis.dicom.viewer3d.View3DFactory: 3D Viewer is activated
19.05.2023 16:40:56.725 *INFO* [JOGL-GLWorkerThread-] org.weasis.dicom.viewer3d.View3DFactory: Checking 3D capabilities
19.05.2023 16:40:57.005 *INFO* [JOGL-GLWorkerThread-] org.weasis.dicom.viewer3d.View3DFactory: *PERF* 3D initialization time: 280 ms
19.05.2023 16:40:57.005 *INFO* [JOGL-GLWorkerThread-] org.weasis.dicom.viewer3d.View3DFactory: Video card for OpenGL: AMD, AMD Radeon RX 470 Graphics (polaris10, LLVM 14.0.0, DRM 3.49, 6.2.15-100.fc36.x86_64) 4.6 (Core profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware) - 4.6 (Core Profile) Mesa 22.1.7
19.05.2023 16:40:57.006 *INFO* [AWT-EventQueue-0] org.weasis.core.internal.Activator: Register series viewer plug-in: 3D Viewer
____________________________
Welcome to Apache Felix Gogo

telnetd is running on 127.0.0.1:17179
gosh: stopping shell
19.05.2023 16:41:03.336 *INFO* [AWT-EventQueue-0] org.weasis.dicom.qr.DicomQrFactory: DICOM Q/R is activated
19.05.2023 16:41:07.392 *INFO* [AWT-EventQueue-0] org.weasis.dicom.explorer.DicomExplorer: Add series: 1
19.05.2023 16:41:07.398 *INFO* [AWT-EventQueue-0] org.weasis.dicom.explorer.DicomExplorer: Add series: 2
19.05.2023 16:41:07.399 *INFO* [AWT-EventQueue-0] org.weasis.dicom.explorer.DicomExplorer: Add series: 3
19.05.2023 16:41:07.399 *INFO* [AWT-EventQueue-0] org.weasis.dicom.explorer.DicomExplorer: Add series: 4
19.05.2023 16:41:07.400 *INFO* [AWT-EventQueue-0] org.weasis.dicom.explorer.DicomExplorer: Add series: 5
19.05.2023 16:41:07.400 *INFO* [AWT-EventQueue-0] org.weasis.dicom.explorer.DicomExplorer: Add series: 6
19.05.2023 16:41:07.402 *INFO* [pool-1-thread-1] org.weasis.dicom.explorer.wado.LoadSeries: Downloading series of SURNAME,NAME [1]
19.05.2023 16:41:07.405 *INFO* [Image Downloader-pool-3-thread-1] org.opencv.osgi: Successfully loaded OpenCV native library.
19.05.2023 16:41:07.667 *INFO* [AWT-EventQueue-0] org.weasis.dicom.explorer.DicomModel: Series splitting: Scout
free(): invalid pointer
Annullato (core dump creato)

@nroduit
Copy link
Owner

nroduit commented May 19, 2023

I built a new deb and rpm package with a Snapshot version (is not kept in the cache at boot time).

To reactivate the 3D module, you can remove the 2 properties from the file ~/.weasis/data/weasis-core/persistence.properties:

opengl.enable=false
opengl.prev.init=false

Please tell me if this solves the crash problem. The new package is less portable on all distributions because it has 2 new dependencies.

@Sergey-5000
Copy link
Author

The new update launches and works great! 3D Viewer works too.
The first DICOM study in the 3D Viewer always opens. If you open several more DICOMs in 3D Viewer, then the program will eventually close. As if the video memory is running out.
dicom_log.txt

@konstare
Copy link

I confirm that v4.1.1-SNAPSHOT works without this bug

@nroduit
Copy link
Owner

nroduit commented May 20, 2023

Thank you for your feedback.

@Sergey-5000 This is the first time I've seen a crash in relation to the memory. I think it's more related to a driver problem because the memory management is not limited to the GPU. See this post.

@AlexZaka VirtualBox does not allow to have a functional 3D driver (even if sometimes it seems to be the case, it remains very experimental). However it works very well with VMware and Nvidia GRID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants