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

Program hangs indefinitely after importing NIFTI file with 'Import medical images' #174

Closed
juusokorhonen opened this issue Mar 21, 2019 · 11 comments

Comments

@juusokorhonen
Copy link

System: Ubuntu LTS 16.04
InVesalius 3.1.1

Steps to reproduce:

  • Open InVesalius
  • Select 'Import medical images...' from left-side panel
  • Select a folder with .nii file that was used in NexStim navigation ssytem
    --> Error message appears: "There are no DICOM files in the selected folder."
    --> InVesalius hangs with window "Loading DICOM files"

This message cannot be dismissed, although pressing Cancel seems to refresh the sceen. Pressing 'X' on top left of window disables the Cancel button. Attempting to close InVesalius by right clicking the task bar icon and selecting 'Close' displays a confirmation dialog, but nothing happens after that. Attempting to kill the program with '$ kill ' gets rid of the process when viewed with '$ ps', but does nothing to the program window.

The only way to close the window is to use 'ps' to find the line 'python app.py' and kill that.

@rmatsuda
Copy link
Collaborator

Dear @juusokorhonen ,
Thanks for the bug report. But for nifti import, you should use "Import other files..." menu (image below). Let me know if the crashs persists.
image

@juusokorhonen
Copy link
Author

You are right in that the NIfTI import through the menu works. It is not an issue with the NIfTI import.

The issue here, is that trying to open a folder without DICOM files results in a unresponsive program that has to be forcefully quit through command line (in linux).

Furthermore, the tooltip message for the Import medical images suggests that you can open also NIfTI files. See attached screenshot.
invesalius_screenshot

@rmatsuda
Copy link
Collaborator

Looks like is something related to linux. In windows it is working properly. @tfmoraes could you help with this issue?

@tfmoraes
Copy link
Member

tfmoraes commented Mar 21, 2019

@juusokorhonen thanks for the report. In the last commit I updated the tooltip to say it only opens dicom files. About InVesalius being unresponsive I think the folder you selected has a lot of files and/or a very deep hierarchy of subfolders. We use GDCM lib to check every file in the folder you selected and in the subfolder for DICOM files, it may take a lot of time.

@juusokorhonen
Copy link
Author

Thanks for the suggestion. In this case, however, there is only the one nifti file in the folder and no subfolders. If you are interested, I could try to extract more information about the situation. Would there be something specific to check?

@tfmoraes
Copy link
Member

@juusokorhonen you are running InVesalius from the source code, Ubuntu package, AppImage or Flatpak? What version? Could you share this file?

@juusokorhonen
Copy link
Author

I am using the version from the InVesalius download page, GNU/Linux Ubuntu 16.04 64 bits, InVesalius-3.1.1-Ubuntu-16.04-amd64.tar.gz.

$ dpkg -l |grep ^i |grep invesalius
ii  invesalius                                                  3.1.1-1~xenial                                                              all          3D medical imaging reconstruction software
ii  invesalius-bin                                              3.1.1-1~xenial                                                              amd64        Implementation of MIDA and contour based visualizations
ii  invesalius-examples                                         3.1.1-1~xenial                                                              all          examples for 3D medical imaging reconstruction software

I tried running from the command line with invesalius3 -d, and I get some warnings during the startup, but nothing while the DICOM modal is running.

$ invesalius3  -d
/usr/share/invesalius/invesalius/data/transformations.py:1899: UserWarning: failed to import module _transformations
  warnings.warn("failed to import module %s" % name)
session mode:  0

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed

(app.py:25260): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed

(app.py:25260): Gdk-WARNING **: /build/gtk+2.0-jJZIsQ/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window
Checking updates...
^C

@juusokorhonen
Copy link
Author

juusokorhonen commented Mar 26, 2019

I tested this a bit further.

  • The hanging/crash does not occur, if the folder is empty.
  • The hanging/crash does not occur, if I browse to one folder higher in the hierarchy
  • The hanging/crash does not occur, if there are other files (other that .nii) in the folder
  • The handing/crash occurs, when I am in the highest folder in the hierarchy with only a single .nii file

If I create an empty file in the same folder, the hanging/crash goes away.

@tfmoraes
Copy link
Member

@juusokorhonen , please, could you try with version 3.1.999992? You could try the flatpak version https://flathub.org/apps/details/br.gov.cti.invesalius

@juusokorhonen
Copy link
Author

It took me some time to install flatpak, but here are the results.

$ flatpak list
Description                                              Application                    Version   Branch Arch   Origin  Installation
InVesalius - 3D medical imaging reconstruction software  br.gov.cti.invesalius          3.1.99992 stable x86_64 flathub system

I can confirm that this version has the issue fixed.

However, I had to give extra permissions to invesalius by running from command line:
$ flatpak --filesystem=host run br.gov.cti.invesalius

This is because my data resides outside my home directory.

@tfmoraes
Copy link
Member

Ok. Thanks for testing. I'll close this issue and I'll take a look at this issue with flatpak. Thanks!

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

No branches or pull requests

3 participants