visionaray icon indicating copy to clipboard operation
visionaray copied to clipboard

Exception: bad color resource mapped

Open tay10r opened this issue 2 years ago • 4 comments

I try running the viewer program, using the path tracing algorithm, and an exception is thrown:

Screenshot from 2021-11-01 08-15-11

I made a very simple model in Blender to reproduce this with.

simple model.zip

I'm using GCC 9 and Nvidia's compiler, on Ubuntu and in release mode.

tay10r avatar Nov 01 '21 12:11 tay10r

Huh, interesting. Thanks for reporting. I'll try to repro (I'll have access to an Ubuntu system later this week and cannot reproduce the issue on my Mac).

The error message points to some issue with cuda/gl interop. You could try to deactivate direct rendering here as a workaround?

(note that if you're using some sort of remote rendering and PBO-interop isn't available, the viewer currently doesn't detect that and then just fails.)

szellmann avatar Nov 01 '21 18:11 szellmann

So I haven't yet tried deactivating direct rendering, but I did just disable CUDA and it seemed to fix the issue.

tay10r avatar Nov 05 '21 23:11 tay10r

Yeah, that makes sense. The error message above is from the constructor of pixel_unpack_buffer_rt, which implements interop between a CUDA buffer and a GL pbo. So that only affects the CUDA code path (but it also happens with the dflt. -device=cpu, as the CUDA render target is just always constructed). When CUDA is deactivated at compile time, this render target isn't never even built though.

When I tried on Ubuntu yesterday, the viewer actually froze on startup (the other CUDA examples didn't), which is even stranger than what you're describing. Although I believe the issues are related. I unfortunately only have limited access to a PC with Linux atm, but I'm at it and will post here when the issue is fixed.

szellmann avatar Nov 06 '21 00:11 szellmann

@szellmann Thanks for the update! No rush on the patch, the rest of the library works just fine.

tay10r avatar Nov 06 '21 00:11 tay10r