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

Weasis 4.0.1 cannot open any images, throws NPE #303

Closed
villasenor opened this issue Jun 29, 2022 · 11 comments
Closed

Weasis 4.0.1 cannot open any images, throws NPE #303

villasenor opened this issue Jun 29, 2022 · 11 comments

Comments

@villasenor
Copy link

Describe the bug
Cannot open any images. This worked previously on Pop_OS! 20.04. On this fresh install of Zorin 16.1 (see details below), Weasis installs properly and opens, and even imports the DICOMs, but it will not actually load the image. The thumbnails appear in the DICOM Explorer, but they cannot be opened (by right-clicking and open or double-clicking). I get a stack trace with a Null Pointer Exception when opening the DICOM files. These DICOM files previously worked in Weasis. Using previous versions of Weasis back to 3.6.0 does not fix this. Is there something on the OS or Kernel level that is missing in Zorin 16? Is there a library needed? I couldn't find a lot of info about this aside from glibc which is present at version 2.31.

To Reproduce
Steps to reproduce the behavior:

  1. Open Weasis
  2. Click on File -> Open -> DICOM
  3. In Local Device, navigate to the directory of DICOMs, search recursively
  4. Click Import and Close
  5. Observe the images in the DICOM Explorer on the left
  6. Try to open any of the images by double-clicking or right-click -> 2D-DICOM Viewer -> Open
  7. Nothing happens. See stack trace that is visible when running from terminal that prints out when trying to open the file.

Expected behavior
The image opens when opened.

Desktop (please complete the following information):

  • OS: Zorin OS 16.1 (Kernel 5.13.0-51-generic, based on Ubuntu 20.04, ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31)
  • Weasis Version 4.0.1

Traces

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot read field "x" because "<parameter1>" is null
	at java.desktop/java.awt.Rectangle.contains(Unknown Source)
	at org.weasis.base.ui.gui.WeasisWin.setExternalPosition(WeasisWin.java:510)
	at org.weasis.base.ui.gui.WeasisWin.openSeriesInViewerPlugin(WeasisWin.java:429)
	at org.weasis.base.ui.gui.WeasisWinListener.propertyChange(WeasisWinListener.java:133)
	at java.desktop/java.beans.PropertyChangeSupport.fire(Unknown Source)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
	at org.weasis.dicom.explorer.DicomModel.firePropertyChange(DicomModel.java:351)
	at org.weasis.core.ui.editor.ViewerPluginBuilder.openSequenceInPlugin(ViewerPluginBuilder.java:138)
	at org.weasis.dicom.explorer.ThumbnailMouseAndKeyAdapter.mouseClicked(ThumbnailMouseAndKeyAdapter.java:83)
	at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

@nroduit
Copy link
Owner

nroduit commented Jun 29, 2022

Thank you for reporting this problem. It is surprising that this value is null because it seems to come from the default screen position. It could be a driver graphic problem. According to the stacktrace, I don't understand why it tries to open on an external window.

What is the screen configuration in preferences ?
image

@villasenor
Copy link
Author

monitors

Thanks for taking a look @nroduit! I have 4 QHD monitors, all running on an RTX 3060 running NVIDIA driver 510.73.05. I did switch from an AMD RX 480 to this RTX 3060 when I changed my OS, so maybe that's why it was working before? Maybe this is an NVIDIA compatibility problem?

@nroduit
Copy link
Owner

nroduit commented Jun 30, 2022

Can you share the whole stacktrace in debug mode? I want to see the cause of the exception.

What type of installer do you use for Weasis (deb, snap, flatpack)?

@villasenor
Copy link
Author

I'm using deb. What's the best way to run debug mode? Changing the logging to debug, unlimited stack trace and rolling log doesn't output the stack trace in the logs. Is there a command-line argument I can give to Weisis to start it in debug mode?

@nroduit
Copy link
Owner

nroduit commented Jul 6, 2022

To configure and access the logs please visit this page.

If you can transmit the complete error (usually there is a stack of errors).

@nroduit
Copy link
Owner

nroduit commented May 27, 2023

Please reopen this issue if it has not been resolved in the current version.

@nroduit nroduit closed this as completed May 27, 2023
@BenjaminKampfradler
Copy link

BenjaminKampfradler commented Aug 23, 2023

@nroduit I'm experiencing the exact same problem -- v. 4.2.0 (Flatpak), Arch Linux, Sway.

If you can transmit the complete error (usually there is a stack of errors).

Nope, I'm afraid, this is the output from an entire Weasis "session" exhibiting the problem:

# flatpak run io.github.nroduit.Weasis
WARNING: package com.sun.awt not in java.desktop
23.08.2023 13:27:37.582 *INFO* [main] org.weasis.launcher.ConfigData: Starting Weasis...
23.08.2023 13:27:37.631 *INFO* [main] org.weasis.launcher.ConfigData: Initialization of the launch configuration...
23.08.2023 13:27:37.643 *INFO* [main] org.weasis.launcher.ConfigData: Properties: {weasis.user=rkv, weasis.name=Weasis, weasis.version=4.2.0, weasis.config.hash=174372, weasis.path=/home/rkv/.weasis, weasis.launch.type=NATIVE, weasis.codebase.url=file:/app/lib/app, weasis.pref.local.session=true, weasis.codebase.local=/app/lib/app, felix.config.properties=file:/app/lib/app/conf/base.json, weasis.source.id=630703E9, weasis.profile=default, http.agent=Weasis/4.2.0 (Linux; 6.4.9-arch1-1; amd64; pf:default; rv:4.2.0) Java/21-beta}
23.08.2023 13:27:37.662 *INFO* [main] org.weasis.launcher.Singleton: Local port of the Singleton server: 44,307
23.08.2023 13:27:37.666 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of locale.lang.code = en
23.08.2023 13:27:37.666 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of locale.format.code = en_DK
23.08.2023 13:27:37.666 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of org.apache.sling.commons.log.level = DEBUG
23.08.2023 13:27:37.666 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of org.apache.sling.commons.log.file.activate = true
23.08.2023 13:27:37.667 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of org.apache.sling.commons.log.file.number = 5
23.08.2023 13:27:37.667 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of org.apache.sling.commons.log.file.size = 10MB
23.08.2023 13:27:37.667 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of org.apache.sling.commons.log.stack.limit = -1
23.08.2023 13:27:37.667 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of org.apache.sling.commons.log.pattern = {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* [{2}] {3}: {5}
23.08.2023 13:27:37.673 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of weasis.linux.windows.decoration = false
23.08.2023 13:27:37.702 *CONFIG* [main] sun.awt.X11.backingStore.XToolkit: The system property sun.awt.backingStore is not set, by default backingStore=NotUseful
23.08.2023 13:27:37.723 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of flatlaf.uiScale = -1
23.08.2023 13:27:37.981 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of weasis.show.disclaimer = true
23.08.2023 13:27:37.981 *INFO* [main] org.weasis.launcher.WeasisLauncher: Config of weasis.show.release = true
23.08.2023 13:27:37.984 *INFO* [main] org.weasis.launcher.WeasisLauncher:
***** Configuration *****
  Last running version = 4.2.0
  Current version = 4.2.0
  Application name = Weasis
  Application Source ID = 630703E9
  Application Profile = default
  Application local codebase = /app/lib/app
  Application codebase URL = file:/app/lib/app
  Application configuration file = file:/app/lib/app/conf/base.json
  User = rkv
  User home directory = /home/rkv/.weasis
  Resources path = /app/lib/app/resources
  Preferences directory = /home/rkv/.weasis/preferences/rkv/default
  Look and Feel = com.formdev.flatlaf.FlatIntelliJLaf
  Languages path = file:/app/lib/app/bundle-i18n/
  Languages available = en,ar,bg_BG,bqi,bs_BA,cs,de,el,es,fa,fr,hr_HR,hu_HU,it,ja,ko,ms_MY,pl_PL,pt,pt_BR,ro,ru_RU,si,sk_SK,sr_RS,sv,ta_IN,tr,uk,vi,vi_VN,zh_CN,zh-Hans,zh_TW
  OSGI native specs = linux-x86-64
  HTTP user agent = Weasis/4.2.0 (Linux; 6.4.9-arch1-1; amd64; pf:default; rv:4.2.0) Java/21-beta
  Operating system = Linux 6.4.9-arch1-1 amd64
  Java vendor = Eclipse Adoptium
  Java version = 21-beta
  Java Path = /app/lib/runtime
  Java max memory (less survivor space) = 7.8 GiB
***** End of Configuration *****
23.08.2023 13:27:37.985 *INFO* [main] org.weasis.launcher.WeasisLauncher:
Starting OSGI Bundles...

         | | /| / /__ ___ ____ (_)__
         | |/ |/ / -_) _ `(_-</ (_-<
         |__/|__/\__/\_,_/___/_/___/

23.08.2023 13:27:38.333 *INFO* [FelixStartLevel] org.opencv.osgi: Successfully loaded OpenCV native library.
23.08.2023 13:27:39.187 *INFO* [main] org.weasis.launcher.WeasisLauncher: Logs has been delegated to the OSGI service and can be read in /home/rkv/.weasis/log/default.log
____________________________
Welcome to Apache Felix Gogo

telnetd is running on 127.0.0.1:17179
gosh: stopping shell
23.08.2023 13:27:58.807 *INFO* [Dicom Model-pool-7-thread-1] org.opencv.osgi: Successfully loaded OpenCV native library.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot read field "x" because "<parameter1>" is null
	at java.desktop/java.awt.Rectangle.contains(Unknown Source)
	at org.weasis.base.ui.gui.WeasisWin.setExternalPosition(WeasisWin.java:490)
	at org.weasis.base.ui.gui.WeasisWin.openSeriesInViewerPlugin(WeasisWin.java:410)
	at org.weasis.base.ui.gui.WeasisWinListener.propertyChange(WeasisWinListener.java:128)
	at java.desktop/java.beans.PropertyChangeSupport.fire(Unknown Source)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
	at org.weasis.dicom.explorer.DicomModel.lambda$firePropertyChange$0(DicomModel.java:358)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:0, 0x7fa9a00954f0, refCount 1, unCloseable false]

Reviving the issue as suggested! :)

Thanks!

@nroduit
Copy link
Owner

nroduit commented Aug 23, 2023

Installations with Flatpak or Snap are in sandbox mode with an intermediate Runtime which can lead to various types of problems, see also #449.

My recommendation is to use deb or rpm packages instead.

@BenjaminKampfradler
Copy link

@nroduit Roger that, thanks. FWIW, I can inform that the Weasis extracted from the .deb file is non-functioning as well -- however, starting a Fluxbox session, suddenly both the Flatpak version as well as the .deb version works. I'm guessing it has to do with Xwayland somehow.

Just in case that rings a bell on your end. I'm good here!

@nroduit
Copy link
Owner

nroduit commented Aug 24, 2023

I opened a new issue and will provide a fix to better handle the consequence of this problem.

@nroduit
Copy link
Owner

nroduit commented Oct 1, 2023

Issue of using the latest nvidia driver 535 and wayland:
https://www.reddit.com/r/Ubuntu/comments/14pgni5/after_upgrade_to_properietary_nvidia_535_driver/

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

3 participants