No imgui menu on Linux
raedwulf opened this issue · comments
I cannot seem to get the IMGUI to show up in the examples - although the rendering seems to mostly work here.
I've tested it both on Intel and AMD gpu hardware with mesa-21.0.3.
Ah, drawsprite seems to fail completely:
./rizz --run ./lib03-drawsprite.so <
version: 0.5-39-gc8d0ba8
(init) vfs
(init) temp memory: 8x10240 kb
(init) jobs: threads=7, max_fibers=64, stack_size=1024kb
(init) asset system: hot-loading=1
(init) profiler (cpu): port=17815
(init) graphics: OpenGL 3.3
(init) coroutines: stack_size=2048kb
(init) http client
vfs: mounted '/cache' on '/home/raedwulf/src/watch/rizz/bin/.cache'
(init) plugin: imgui (libimgui.so) - dear-imgui plugin - v1.79.0
(init) plugin: 2dtools (lib2dtools.so) - 2dtools plugin - v1.0.0
vfs: mounted '/assets' on '/home/raedwulf/src/watch/rizz/examples/assets'
(init) plugin: drawsprite (lib03-drawsprite.so) - - v0.0.0
ERROR: sg_image_desc.width must be > 0
ERROR: sg_image_desc.height must be > 0
ERROR: ^^^^ VALIDATION FAILED, TERMINATING ^^^^
ERROR: Stage = '[unset]'
/home/raedwulf/src/watch/rizz/src/rizz/graphics.c(332): ASSERT FAILURE - 0
./rizz --run ./lib04-animsprite.so <
version: 0.5-39-gc8d0ba8
(init) vfs
(init) temp memory: 8x10240 kb
(init) jobs: threads=7, max_fibers=64, stack_size=1024kb
(init) asset system: hot-loading=1
(init) profiler (cpu): port=17815
(init) graphics: OpenGL 3.3
(init) coroutines: stack_size=2048kb
(init) http client
vfs: mounted '/cache' on '/home/raedwulf/src/watch/rizz/bin/.cache'
(init) plugin: imgui (libimgui.so) - dear-imgui plugin - v1.79.0
(init) plugin: 2dtools (lib2dtools.so) - 2dtools plugin - v1.0.0
vfs: mounted '/assets' on '/home/raedwulf/src/watch/rizz/examples/assets'
(init) plugin: animsprite (lib04-animsprite.so) - - v0.0.0
rizz: /home/raedwulf/src/watch/rizz/3rdparty/remotery/lib/Remotery.c:4657: SampleTree_Pop: Assertion `sample != tree->root' failed.
Segmentation fault
Occasionally animsprite fails...
damn, this is weird. and I don't have anything remotely similar to your distro/driver setup to test it out myself.
you can try out debugging it yourself, for the profiler assert, try disabling it with cmake flag ENABLE_PROFILER=0
As for the error in drawsprite, it comes from not initializing/loading textures properly, most likely in rizz__texture_on_load
or rizz__texture_on_finalize
functions.
First you should pull the latest, I added new assert to catch texture loading assert checks. Then you can run it through the debugger and capture the callstack and more details on the error.
I'm sorry that I can't help more than this
Okay, I'll see if I can debug more when I have some time. As far as I know, normal imgui examples do seem to work fine on my system - I wonder if it might be something to do with Mesa GL differences, since I guess you've only tested it on Nvidia drivers?
yup. I can probably test with nouveau drivers some time, but don't have the time now
I'll get back to you if I can reproduce with llvmpipe.
It also has problems with the mesa software renderer:
$ LIBGL_ALWAYS_SOFTWARE=1 ./rizz --run ./lib01-hello.so
version: 0.5-39-gc8d0ba8
(init) vfs
(init) temp memory: 8x10240 kb
(init) jobs: threads=7, max_fibers=64, stack_size=1024kb
(init) asset system: hot-loading=1
(init) profiler (cpu): port=17815
(init) graphics: OpenGL 3.3
(init) coroutines: stack_size=2048kb
(init) http client
vfs: mounted '/cache' on '/home/raedwulf/src/watch/rizz/bin/.cache'
(init) plugin: imgui (libimgui.so) - dear-imgui plugin - v1.79.0
(init) plugin: hello (lib01-hello.so) - - v0.0.0
rizz: /home/raedwulf/src/watch/rizz/3rdparty/remotery/lib/Remotery.c:4657: SampleTree_Pop: Assertion `sample != tree->root' failed.
*** stack smashing detected ***: terminated
Segmentation fault
that should be another issue. for now, use -DENABLE_PROFILER=0
to disable the profiler completely
Sorry for the delay, I disabled the profiler and I have the same the exact same errors with the software renderer too.
Edit: I mean the above errors with no UI + image size error and not the Segmentation Fault / stack smashing.
what do you mean by "software renderer" ?
btw, the profiler crash should be fixed by now, it was a regression bug from remotery which I reverted it back to previous version
what do you mean by "software renderer" ?
Sorry, I meant the mesa software GL rasterizer, llvmpipe. It has similar behaviour as the other Mesa-based gpu drivers so it might be possible to reproduce it on your system more easily (or even in a VM).
https://docs.mesa3d.org/drivers/llvmpipe.html
It is normally enabled with
export LIBGL_ALWAYS_SOFTWARE=1
But this doesn't work with nvidia proprietary drivers. You'll need to have Mesa enabled (perhaps with nouveau). I suspect a VM might be just as easy through QEMU but I don't know the steps off the top of my head. VirtualBox is a bit more finnicky because they have their own GL driver/wrapper thing.
btw, the profiler crash should be fixed by now, it was a regression bug from remotery which I reverted it back to previous version
Great! 👍
since I can't reproduce the issue and the author didn't investigate the problem furthor more, I will close this for now.