OpenGL 3 geometry buffer crash when resizing window

Create issue
Issue #1051 resolved
Former user created an issue

Automatic migration. Original reporter: "msiedlarek"

After resizing a OpenGL 3 viewport and using System::notifyDisplaySizeChanged() the application crashes in OpenGL3GeometryBuffer::updateOpenGLBuffers() on bad memory access (see traceback in Additional Information).

I peeked into that function and there seems to be a bug, which I fixed replacing this line:

GLsizei dataSize = d_bufferSize * sizeof(GLVertex);


GLsizei dataSize = vertexCount * sizeof(GLVertex);

And obviously it works now but there is something wrong with the textures after viewport resize (screenshot.png).

As debugging someone else's OpenGL code is incredibly hard I present to you this bug report.

Reproducibility: always

Additional information: Process 3513 stopped

  • thread #1: tid = 0x5682, 0x00007fff86ccd050 libsystem_platform.dylib_platform_memmove$VARIANT$Nehalem + 112, queue = '', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x00007fff86ccd050 libsystem_platform.dylib_platform_memmove$VARIANT$Nehalem + 112

libsystem_platform.dylib`_platform_memmove$VARIANT$Nehalem + 112: -> 0x7fff86ccd050: movups (%rsi), %xmm0 0x7fff86ccd053: addq $0x10, %rdi 0x7fff86ccd057: andq $-0x10, %rdi 0x7fff86ccd05b: movq %rdi, %rcx

frame #1: 0x000012344024ee63 GeForceGLDriver___lldb_unnamed_function7228$$GeForceGLDriver + 269 GeForceGLDriverlldb_unnamed_function7228$$GeForceGLDriver + 269: -> 0x12344024ee63: movq 0x42d28(%rbx), %rax 0x12344024ee6a: testb $-0x80, 0x50(%rax) 0x12344024ee6e: je 0x12344024ee7b ; lldb_unnamed_function7228$$GeForceGLDriver + 293 0x12344024ee70: movq %r12, %rdi

frame #2: 0x00001234402e3cbf GeForceGLDriver___lldb_unnamed_function10705$$GeForceGLDriver + 2314 GeForceGLDriverlldb_unnamed_function10705$$GeForceGLDriver + 2314: -> 0x1234402e3cbf: movl $0xf0, %r15d 0x1234402e3cc5: jmpq 0x1234402e3906 ; lldb_unnamed_function10705$$GeForceGLDriver + 1361

GeForceGLDriver`___lldb_unnamed_function10706$$GeForceGLDriver: 0x1234402e3cca: pushq %rbp 0x1234402e3ccb: movq %rsp, %rbp

frame #3: 0x00007fff81fc9fd0 GLEngineglBufferSubData_Exec + 492 GLEngineglBufferSubData_Exec + 492: -> 0x7fff81fc9fd0: testl %eax, %eax 0x7fff81fc9fd2: je 0x7fff81fca022 ; glBufferSubData_Exec + 574 0x7fff81fc9fd4: movq 0xd448(%rbx), %rax 0x7fff81fc9fdb: movb $0x0, 0x87(%r15)

frame #4: 0x0000000001af395d libCEGUIOpenGLRenderer-0.dylib`CEGUI::OpenGL3GeometryBuffer::updateOpenGLBuffers(this=0x0000000003138640) + 333 at GL3GeometryBuffer.cpp:211 208 } 209 else 210 { -> 211 glBufferSubData(GL_ARRAY_BUFFER, 0, dataSize, data); 212 } 213 } 214

(lldb) print dataSize (GLsizei) $0 = 216 (lldb) print data (CEGUI::OpenGLGeometryBufferBase::GLVertex *) $1 = 0x0000000000000000

OS: Mac OS X, OS build: 10.9.4, Platform: AMD64

Comments (4)

  1. Lukas Meindl

    Thanks for your bug report. The C++ issue you mentioned has been tested by me and fixed. See:

    Regarding issue 2: "And obviously it works now but there is something wrong with the textures after viewport resize" I cant reproduce this issue on Windows and I do not own any device that runs an Apple operating system). Could you open up a thread in the forum so we can discuss this? Also : Do you have the same issue in regular OpenGLRenderer or only OpenGL3? What OpenGL version does your driver (fully!) support?

  2. Log in to comment