JacobBumgarner / VesselVio

An open-source application for the analysis and visualization of segmented vasculature datasets
https://jacobbumgarner.github.io/VesselVio/
GNU General Public License v3.0
99 stars 21 forks source link

[Bug]: fdopen() failed unexpectedly #53

Closed saskra closed 1 year ago

saskra commented 2 years ago

What happened?

"VesselVio.py" reproducibly crashes on our Windows 10 workstation after 170 files (about 1 hour runtime) with the following error message:

(VesselVio) C:\Users\Vessels-Project\VesselVio>python VesselVio.py
Traceback (most recent call last):
  File "C:\Users\Vessels-Project\VesselVio\library\qt_threading.py", line 263, in run
    GIO.save_cache(filename, gen_options.results_folder)
  File "C:\Users\Vessels-Project\VesselVio\library\graph_io.py", line 303, in save_cache
    g.write(file)
  File "C:\Users\Vessels-Project\anaconda3\envs\VesselVio\lib\site-packages\igraph\__init__.py", line 2988, in write
    return writer(f, *args, **kwds)
RuntimeError: fdopen() failed unexpectedly

This is done both with the downloaded .exe and with the current source code in a separate conda environment. The environment is composed as follows: environment_windows.txt

Operating System

Windows

App Build

Downloaded App

Pseudocode or Screenshots

 Insert code here 

Or drag your screenshot here!

Relevant log output

No response

Code of Conduct

JacobBumgarner commented 2 years ago

Hi @saskra

Sorry to hear about this crash. The error report you provided is on igraph's end. But that doesn't mean that there isn't some issue with the graph that VesselVio is providing to the igraph writer.

My first hunch is that the 170th graph file that's being loaded into the app for analysis is what's causing the problem.

Would you be able to try to identify the file that is being saved when the app is crashing and try to analyze that one by itself?

My second hunch is that there may be some issue with a memory leak in the app.

Maybe we can try to figure which file might be causing the issue before I start digging into memory issues.

JacobBumgarner commented 2 years ago

I will also inform you that the app caches the results from each dataset after it's analyzed, so the analysis results from the first 170 files are present in the result cache. If you analyze a single file, that cache will be emptied and saved into an excel file.

saskra commented 2 years ago

When I analyze the files one by one, this crash does not occur, so it is not due to this specific 170th file.

JacobBumgarner commented 2 years ago

Hmm - ok thanks for that update.

Can you describe more about the files you're analyzing and the exact settings that your using during the analysis?

saskra commented 2 years ago

These are the settings: screenshot The crucial setting here is "Save graph files of datasets", the others do not cause the error.

Unfortunately, I can't give out the images yet, but I was also able to reproduce the error by simply copying the included file "Demo Volume.nii" 256 times - again, it breaks after exactly 170 files, also on another Windows machine. Interestingly enough, it runs on Linux. (There, however, it is much slower.) On Mac it also seems to work, but I do not have access to it by default.