scenerygraphics / sciview

sciview is a tool for visualization and interaction with ND image and mesh data
BSD 2-Clause "Simplified" License
68 stars 17 forks source link

Flybrain Out-of-Core demo triggers segmentation fault #602

Open elevans opened 4 months ago

elevans commented 4 months ago

Running the advanced Flybrain Out-of-Core demo leads to a reproducible seg fault. Interestingly, no interaction is need to trigger this fault. I discovered this bug when I let sciview download the flybrain dataset and I got distracted long enough to capture the crash. Playing with the demo doesn't increase or decrease the time to seg fault. I timed it to about ~35 seconds to upwards of a minute before the seg fault occurs.

I have the hs_err_pid log files as well if they are helpful in debugging this (they're 22,000 lines long so I didn't want to post them).

My system: sciview version: 0.4.1-SNAPSHOT OS: Ubuntu 24.04 LTS Java: 21.0.2 CPU: i7-1185G7 GPU: Intel Iris Xe Graphics

Here's the stack trace:

[INFO] Downloading flybrain stack ...
[INFO] Done.
[INFO] Running extension SwingVolumeProperties
[INFO] Running extension SwingVolumeProperties
[INFO] Running extension SwingVolumeProperties
[INFO] Running extension SwingVolumeProperties
Recreating Swapchain at frame 1 (SwingSwapchain)
Present queue is 0, graphics queue is 0
Selected present mode: VK_PRESENT_MODE_FIFO_KHR with 3 images
Creating render framebuffer GeometryBuffer for pass Scene (1886x1019)
 + attachment NormalsMaterial, RGBA_Float16
 + attachment DiffuseAlbedo, RGBA_UInt8
 + attachment Emission, RGBA_Float16
 + attachment ZBuffer, Depth32
Creating render framebuffer AOTemp1 for pass AO (1886x1019)
 + attachment Occlusion, RGBA_UInt8
Creating render framebuffer AOTemp2 for pass AOBlurV (1886x1019)
 + attachment Occlusion, RGBA_UInt8
Creating render framebuffer AOBuffer for pass AOBlurH (943x509)
 + attachment Occlusion, RGBA_UInt8
Creating render framebuffer ForwardBuffer for pass DeferredLighting (1886x1019)
 + attachment Color, RGBA_Float16
Creating render framebuffer HDRBuffer for pass ForwardShading (1886x1019)
 + attachment Color, RGBA_Float16
 + attachment Depth, Depth32
Creating render framebuffer FXAABuffer for pass HDR (1886x1019)
 + attachment Color, RGBA_UInt8
Recreating Swapchain at frame 15 (SwingSwapchain)
Present queue is 0, graphics queue is 0
Selected present mode: VK_PRESENT_MODE_FIFO_KHR with 3 images
Creating render framebuffer GeometryBuffer for pass Scene (1281x1019)
 + attachment NormalsMaterial, RGBA_Float16
 + attachment DiffuseAlbedo, RGBA_UInt8
 + attachment Emission, RGBA_Float16
 + attachment ZBuffer, Depth32
Creating render framebuffer AOTemp1 for pass AO (1281x1019)
 + attachment Occlusion, RGBA_UInt8
Creating render framebuffer AOTemp2 for pass AOBlurV (1281x1019)
 + attachment Occlusion, RGBA_UInt8
Creating render framebuffer AOBuffer for pass AOBlurH (640x509)
 + attachment Occlusion, RGBA_UInt8
Creating render framebuffer ForwardBuffer for pass DeferredLighting (1281x1019)
 + attachment Color, RGBA_Float16
Creating render framebuffer HDRBuffer for pass ForwardShading (1281x1019)
 + attachment Color, RGBA_Float16
 + attachment Depth, Depth32
Creating render framebuffer FXAABuffer for pass HDR (1281x1019)
 + attachment Color, RGBA_UInt8
[INFO] Running extension SwingVolumeProperties
[INFO] Running extension SwingVolumeProperties
[INFO] Running extension SwingVolumeProperties
[INFO] Running extension SwingVolumeProperties
[INFO] Running extension SwingVolumeProperties
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000079ce76f8dc4b, pid=21941, tid=22135
#
# JRE version: OpenJDK Runtime Environment Zulu21.32+17-CA (21.0.2+13) (build 21.0.2+13-LTS)
# Java VM: OpenJDK 64-Bit Server VM Zulu21.32+17-CA (21.0.2+13-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libvulkan_intel.so+0x18dc4b]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/edward/Documents/software/fiji_dev/core.21941)
#
# An error report file with more information is saved as:
# /home/edward/Documents/software/fiji_dev/hs_err_pid21941.log
[156.490s][warning][os] Loading hsdis library failed
#
# If you would like to submit a bug report, please visit:
#   http://www.azul.com/support/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
kephale commented 3 months ago

Hm, I don't get this on my macos machine. @elevans if you get a chance, then could you try running the corresponding scenery example (https://github.com/scenerygraphics/scenery/blob/main/src/test/kotlin/graphics/scenery/tests/examples/volumes/FlybrainOutOfCoreExample.kt)?

@skalarproduktraum the delayed effect makes me wonder if it happens as blocks are loaded in the Volume.