Crash only occurs on the phone, not desktop. This tends to be the usual backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xb6b6af64 in glGenTextures (this=<optimized out>, textures=0x2815d8, n=1) at opengl/qopengltexturehelper_p.h:508
#2 create (this=0x2815c8) at opengl/qopengltexture.cpp:169
#3 QOpenGLTexture::setFormat (this=this@entry=0x281bb0, format=format@entry=QOpenGLTexture::RGBAFormat)
at opengl/qopengltexture.cpp:1923
#4 0xb6b70b46 in QOpenGLTexture::setData (this=this@entry=0x281bb0, image=..., genMipMaps=QOpenGLTexture::GenerateMipMaps)
at opengl/qopengltexture.cpp:2669
#5 0xb6b70c66 in QOpenGLTexture::QOpenGLTexture (this=0x281bb0, image=..., genMipMaps=<optimized out>)
at opengl/qopengltexture.cpp:1707
#6 0x0000b480 in ?? ()
Crash only occurs on the phone, not desktop. This tends to be the usual backtrace:
Program received signal SIGSEGV, Segmentation fault. qopengltextureh elper_p. h:508 qopengltexture. cpp:169 :setFormat (this=this@ entry=0x281bb0, format= format@ entry=QOpenGLTe xture:: RGBAFormat) qopengltexture. cpp:1923 :setData (this=this@ entry=0x281bb0, image=..., genMipMaps= QOpenGLTexture: :GenerateMipMap s) qopengltexture. cpp:2669 :QOpenGLTexture (this=0x281bb0, image=..., genMipMaps= <optimized out>) qopengltexture. cpp:1707
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xb6b6af64 in glGenTextures (this=<optimized out>, textures=0x2815d8, n=1) at opengl/
#2 create (this=0x2815c8) at opengl/
#3 QOpenGLTexture:
at opengl/
#4 0xb6b70b46 in QOpenGLTexture:
at opengl/
#5 0xb6b70c66 in QOpenGLTexture:
at opengl/
#6 0x0000b480 in ?? ()
Qt has a non-trivial way of wrapping GL calls to abstract away API differences where possible. It starts in QOpenGLTextureH elper, which on creation, resolves symbols for the usual GL calls: code.qt. io/cgit/ qt/qtbase. git/tree/ src/gui/ opengl/ qopengltextureh elper.cpp? id=69196b38c481 610ef30bfe8ce8e 7ba6826729ab8# n182
http://
Here GenTextures is a function pointer:
GenTextures = ::glGenTextures;
which should be set the address of the actual call. It is via this GenTextures that Qt then works.
But when I try to debug this assignment, I get confusing results:
(gdb) p GenTextures function variable, no debug info>} 0xb6536384 <glGenTextures>
$3 = (void (*)(GLsizei, GLuint *)) 0xffffffff
(gdb) p glGenTextures
Cannot take address of method glGenTextures.
(gdb) p ::glGenTextures
$4 = {<text gnu-indirect-
This debug is definitely taken after the variable should be assigned. But this makes no sense.