cinder / Cinder

Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.
http://libcinder.org
Other
5.28k stars 939 forks source link

segfault on app creation #2330

Open kjmarshall opened 4 months ago

kjmarshall commented 4 months ago

Hi,

I'm not really sure what is going on, but I have a Cinder based application where I end up crashing. Strangely, I can control the crash by editing a fragment shader and changing how I mix colors with a texture. If I change from the operator* to glsl mix, the issue goes away. However I think the issue is deeper and possibly related to Cinder. The hardware on my computer is relatively new,

Here is the backtrace:

#0  0x00007fffed68abc7 in __pthread_kill_implementation () from /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib/libc.so.6
#1  0x00007fffed63db46 in raise () from /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib/libc.so.6
#2  0x00007fffed6284b5 in abort () from /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib/libc.so.6
#3  0x00007fffe8297766 in _iris_batch_flush.cold () from /nix/store/ak77d5z14ly9g4i9wskcspkd5l3cdl5f-mesa-22.2.4-drivers/lib/dri/iris_dri.so
#4  0x00007fffe8e5588f in iris_fence_flush () from /nix/store/ak77d5z14ly9g4i9wskcspkd5l3cdl5f-mesa-22.2.4-drivers/lib/dri/iris_dri.so
#5  0x00007fffe837f1a5 in st_context_flush () from /nix/store/ak77d5z14ly9g4i9wskcspkd5l3cdl5f-mesa-22.2.4-drivers/lib/dri/iris_dri.so
#6  0x00007fffe82ac2a1 in dri_flush () from /nix/store/ak77d5z14ly9g4i9wskcspkd5l3cdl5f-mesa-22.2.4-drivers/lib/dri/iris_dri.so
#7  0x00007fffe9b53bfd in loader_dri3_swap_buffers_msc () from /nix/store/ak77d5z14ly9g4i9wskcspkd5l3cdl5f-mesa-22.2.4-drivers/lib/libGLX_mesa.so.0
#8  0x00007fffe9b46901 in dri3_swap_buffers () from /nix/store/ak77d5z14ly9g4i9wskcspkd5l3cdl5f-mesa-22.2.4-drivers/lib/libGLX_mesa.so.0
#9  0x00007fffe9b35fdb in glXSwapBuffers () from /nix/store/ak77d5z14ly9g4i9wskcspkd5l3cdl5f-mesa-22.2.4-drivers/lib/libGLX_mesa.so.0
#10 0x0000000000cca2cf in cinder::app::RendererGl::finishDraw() ()
#11 0x00000000010f7a5f in cinder::app::WindowImplLinux::draw() ()
#12 0x00000000010f1ea8 in cinder::app::AppImplLinux::run() ()

I can detect a GL_INVALID_ENUM very early in app creation -- i.e. when I call an override for AppLinux::AppBase::setup. This seems to imply the problem is with how the renderer is setup.

Is this a graphics driver issue?

Here is glxInfo -B:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) Graphics (RPL-P) (0xa7a0)
    Version: 23.2.1
    Accelerated: yes
    Video memory: 63903MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (RPL-P)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20