What’s up.
I’ve got a new laptop and I was installing arch linux on it so that it is exactly as my pc. Now I cloned my opengl project where I use bindless textures and when I try to run it it throws a seg fault in the line of this function:
glGetTextureHandleARB()
This one is the first arb function that appears in the program lifetime.
I’ve been trying to solve this problem since yesterday and I made sure that:
My opengl context is set properly,
Glew is initialized properly,
Before calling that function, the pointer to that function is valid,
It seems like I have bindless textures available:
[coolfede97@coolfede97 ~]$ glxinfo | grep -i "GL_ARB_bindless_texture"
GL_ARB_bindless_texture, GL_ARB_blend_func_extended,
GL_ARB_bindless_texture, GL_ARB_blend_func_extended,
The texture I pass as argument to that function is valid
I’ve got a intel gpu:
[coolfede97@coolfede97 ~]$ lspci | grep -i --color 'vga\|3d\|2d'
00:02.0 VGA compatible controller: Intel Corporation Iris Plus Graphics G1 (Ice Lake) (rev 07)
and I use mesa:
[coolfede97@coolfede97 ~]$ pacman -Q mesa
mesa 1:25.3.3-2
I tried debugging with gdb, and it seems like the seg fault occurs when a function with an invalid pointer is called (which is strange since
if (glGexTexutreHandleARB == nullptr)
returns false).
Here is the gdb output:
[New Thread 0x7fffcffff6c0 (LWP 9743)]
[New Thread 0x7fffcf7fe6c0 (LWP 9744)]
Buffer of textures 2D: 1
Texture2D at path: /home/coolfede97/coding/RuamEngine/RuamEngine/assets/sprites/defaultSprite.png was loaded succesfully
About to call glGetTextureHandleARB
Thread 1 "RuamEngine" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007fffe1339ed1 in ?? () from /usr/lib/libgallium-25.3.3-arch1.2.so
#2 0x000055555558b35f in RuamEngine::Renderer::RegisterTexture (
texture=std::shared_ptr<RuamEngine::Texture> (use count 2, weak count 0) = {...})
at /home/coolfede97/coding/RuamEngine/RuamEngine/RuamCore/Rendering/Renderer.cpp:224
#3 0x0000555555593d5e in RuamEngine::ResourceManager::RegisterTextureInRenderer (
texture=std::shared_ptr<RuamEngine::Texture> (use count 2, weak count 0) = {...})
at /home/coolfede97/coding/RuamEngine/RuamEngine/RuamCore/Rendering/ResourceManager.cpp:161
#4 RuamEngine::ResourceManager::LoadTexture<RuamEngine::Texture2D> (relativePath="assets/sprites/defaultSprite.png")
at /home/coolfede97/coding/RuamEngine/RuamEngine/RuamCore/Rendering/ResourceManager.h:35
#5 0x0000555555590dde in RuamEngine::ResourceManager::Init () at /usr/include/c++/15.2.1/bits/basic_string.tcc:248
#6 0x000055555558c6a5 in RuamEngine::Renderer::Init ()
at /home/coolfede97/coding/RuamEngine/RuamEngine/RuamCore/Rendering/Renderer.cpp:72