Open pjsjongsung opened 7 months ago
I would like to work on this issue. @pjsjongsung
is this issue still reproducible? @pjsjongsung ... The given code works perfectly fine for me
Yes, I just reproduce it @IshanKamboj. I am using macOS, maybe it is specific to the OS which would be strange. I tried with different python version and still the issue
Yes, I just reproduce it @IshanKamboj. I am using macOS, maybe it is specific to the OS which would be strange. I tried with different python version and still the issue
Ohh it works perfectly fine on windows. I think the issue is specific to linux/macOS.
Could it be related to python version? I just tested on python 3.8 and 3.10 on windows and still get the fault.
We both tested on different python version / OS and we still get segfault.
only @IshanKamboj do not get a segfault. Maybe he can share its full setup. (OS, python version, all packages versions / environment, etc...)
I am using windows 11 as my OS and python version : 3.10.11
Following are the package versions: fury==0.10.0 vtk==9.3.0 numpy==1.26.2 scipy==1.11.4 Pillow==10.0.1 pygltflib==1.16.1 packaging==23.2 aiohttp==3.9.1
I reproduced the segmentation fault on both Ubuntu(WSL) and Windows 11.
Ubuntu(WSL) mentions segmentation fault
on terminal but windows powershell terminates the code abruptly.
from fury.actor import slicer
import numpy as np
temp = np.ones((20, 20, 20)).astype(np.int64)
slicer(temp, np.eye(4))
print("this won't be printed")
The last line won't be printed on Windows if tried. The code crashes.
Running $?
after the python script on windows powershell will show False
, meaning the code crashes.
PS C:\Users\Robin Roy\Desktop> python testing_bug.py
PS C:\Users\Robin Roy\Desktop> $?
False
People using Windows who run into this will certainly find it super confusing to debug.
@robinroy03 is right ... The code ends abruptly and does not show segmentation fault on the terminal in windows.
@skoudoro so to solve this we can just check if data array is passed as int64 and raise a ValueError
inside the slicer
function in actor.py
Description
If fury.actor.slicer is passed a int64 type image, it throws a segmentation fault. Not a critical bug, but could be confusing to users if they encounter this.
Way to reproduce
Operating system is ubuntu 20.04. Tested with python 3.9 and 3.10