szellmann / visionaray

A C++-based, cross platform ray tracing library

Home Page:https://vis.uni-koeln.de/visionaray.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exception: bad color resource mapped

tay10r opened this issue · 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.

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.)

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

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 Thanks for the update! No rush on the patch, the rest of the library works just fine.