NVIDIA / VisRTX

NVIDIA OptiX based implementation of ANARI
Other
239 stars 25 forks source link

Segmentation fault in WSL #75

Closed nnn911 closed 6 months ago

nnn911 commented 6 months ago

Running the OVITO Pro (v3.10.3) VisRTX renderer inside an Ubuntu WSL we get a Segmentation Fault in the VisRTX module crashing the application. While we don't expect / require VisRTX to work inside WSL it would be nice to catch the error and prevent the crash.

Should we test for VisRTX requirements before rendering thereby preventing VisRTX from starting or should this be handled inside VisRTX?

OVITO Pro Build Info

System Information

jeffamstutz commented 6 months ago

This was definitely a bug in VisRTX -- initialization wasn't actually being stopped if optixInit() failed, which caused all kinds of UB. This is addressed now in aa2181 on the next_release branch. I tested this by removing libnvidia-rtcore from the environment, which causes optixInit() to fail, where it will report a fatal error and then stop initialization. Note that if ANARI_SEVERITY_FATAL_ERROR occurs, then the device should be immediately released and not used further. However, I think it's reasonable just to check this after the device is initialized and doesn't have to be done after every ANARI call in the app.

Please reopen if you continue to have issues, thanks!