Crash with GLES emulator under Windows

This topic contains 16 replies, has 3 voices, and was last updated by  Edgar 1 year, 9 months ago.

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #50576

    Edgar
    Member

    Greetings,

    I have just switched from Mali 2.2.1 to PowerVR SDK 3.5 gles libraries and suddenly my application crashes inside the draw functions (glDrawArrays, glDrawElements). A typical callstack looks like this:

    atioglxx.dll!309dfa99() Unbekannt
    [Unten angegebene Rahmen sind möglicherweise nicht korrekt und/oder fehlen, keine Symbole geladen für atioglxx.dll]
    atioglxx.dll!30928934() Unbekannt
    atioglxx.dll!3198dc1a() Unbekannt
    atioglxx.dll!31064272() Unbekannt
    atioglxx.dll!31021aac() Unbekannt
    libGLESv2.dll!02ba20bd() Unbekannt
    atioglxx.dll!30b895e3() Unbekannt
    atioglxx.dll!308ab4de() Unbekannt
    libGLESv2.dll!02c0def7() Unbekannt
    libGLESv2.dll!02bf867f() Unbekannt
    libGLESv2.dll!02bc40b1() Unbekannt
    libGLESv2.dll!02baa636() Unbekannt
    libGLESv2.dll!02bc62d9() Unbekannt
    libGLESv2.dll!02bc68b8() Unbekannt
    libGLESv2.dll!02bda9bc() Unbekannt
    < I had to cut off the rest for privacy reasons, it’s a glDrawElements call>

    The arrays I try to draw have up to 50000 vertices.

    The system is Window 7. The Visual Studio Version is 2012 with Update 4 and RelWithDebugInfo build mode. The graphics driver is Catalyst-Version 14.12 AMD Catalyst Omega Software.

    Do you have any idea?

    Regards

    #50577

    Joe Davis
    Member

    Hi Edgar,

    From the information you have provided, I can’t see what the cause of the problem is. If you attach a binary that reproduces the issue to a confidential support ticket, we can investigate the issue for you: https://pvrsupport.imgtec.com/new-ticket

    #50593

    Edgar
    Member

    Well that will take some time.

    By the way: Often the callstack includes a HeapFree.

    Regards

    #50639

    Edgar, are you using client arrays? If so, watch your process’s CPU memory consumption in the resource monitor. What do you see when it crashes?

    (The theory I’m exploring: The PVRVFrame emulation of client arrays triggers unbounded memory growth on ATI GL drivers. We see that here on our ATI GPUs. This may or may not explain what you’re seeing.)

    #50713

    Edgar
    Member

    You mean GL_VERTEX_ARRAY? No, Only VBOs.

    And memory consumption of the application is < 400 mb.

    #50714

    No, I mean rendering with no buffer bound to GL_ARRAY_BUFFER (and/or GL_ELEMENT_ARRAY_BUFFER if using glDrawElements*) and providing a CPU memory buffer pointer for one or more vertex attribute arrays via glVertexAttrib*Pointer (and/or the pointer argument of glDrawElements*).

    #50725

    Edgar
    Member

    I used glGetIntegerv with GL_ARRAY_BUFFER and GL_ELEMENT_ARRAY_BUFFER to verify that both are set. The pointer argument of glDrawElements is supposed to be an index in this case right? Anything else I should look out for?

    #50728

    Edgar
    Member

    Oh, and the VertexAttribPointer is set too.

    #50764

    Edgar, it sounds like you are not using client arrays, so we can scratch that as a possible cause of your draw call crashes.

    Besides getting the ImgTech folks a trace with your crash, you might make very sure that you don’t have some “rogue” vertex attributes you’ve inadvertently left enabled and/or have indices in your DrawElements calls which access outside the bounds of any of the vertex attribute array buffers (either of which would cause bogus reads in the driver and a possible crash). You also might check for GL errors in your code.

    #50812

    Edgar
    Member

    For a test I replaced all the glDrawElements calls by glDrawArrays calls with otherwise exactly the same input. Looks funny but it doesn’t crash.

    #50845

    Edgar
    Member

    I might have successfully reproduced the problem with the ChameleonMan example from the SDK:

    C:\Imagination\PowerVR_Graphics\PowerVR_SDK\SDK_3.4\Examples\Advanced\ChameleonMan\OGLES2\

    atioglxx.dll!68b709d9() Unbekannt
    [Unten angegebene Rahmen sind möglicherweise nicht korrekt und/oder fehlen, keine Symbole geladen für atioglxx.dll]
    atioglxx.dll!68ab7844() Unbekannt
    atioglxx.dll!69c0e086() Unbekannt
    atioglxx.dll!69c0e00b() Unbekannt
    atioglxx.dll!6935342c() Unbekannt
    atioglxx.dll!69c0e086() Unbekannt
    atioglxx.dll!6928f78e() Unbekannt
    atioglxx.dll!6929034d() Unbekannt
    atioglxx.dll!692906ac() Unbekannt
    atioglxx.dll!69207f83() Unbekannt
    atioglxx.dll!693c7953() Unbekannt
    atioglxx.dll!693c2904() Unbekannt
    atioglxx.dll!68d1de03() Unbekannt
    atioglxx.dll!68a3f0ce() Unbekannt
    libGLESv2.dll!0f6fdef7() Unbekannt
    libGLESv2.dll!0f6e867f() Unbekannt
    libGLESv2.dll!0f6b40b1() Unbekannt
    libGLESv2.dll!0f69a636() Unbekannt
    libGLESv2.dll!0f6b62d9() Unbekannt
    libGLESv2.dll!0f6b68b8() Unbekannt
    libGLESv2.dll!0f6ca9bc() Unbekannt
    > OGLES2ChameleonMan.exe!OGLES2ChameleonMan::DrawSkinnedMesh(int i32NodeIndex) Zeile 837 C++
    OGLES2ChameleonMan.exe!OGLES2ChameleonMan::RenderScene() Zeile 675 C++
    OGLES2ChameleonMan.exe!PVRShellInit::Run() Zeile 1617 C++
    OGLES2ChameleonMan.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Zeile 804 C++
    OGLES2ChameleonMan.exe!__tmainCRTStartup() Zeile 238 C
    OGLES2ChameleonMan.exe!WinMainCRTStartup() Zeile 164 C
    kernel32.dll!@BaseThreadInitThunk@12() Unbekannt
    ntdll.dll!___RtlUserThreadStart@8() Unbekannt
    ntdll.dll!__RtlUserThreadStart@8() Unbekannt

    #50996

    Edgar
    Member

    Any more ideas?

    #51009

    Any more ideas?

    The pointer argument of glDrawElements is supposed to be an index in this case right?

    1. No, it’s a byte offset.

    Other suggestions:
    2. Update ATI GL driver
    3. Check for GL errors
    4. Capture a PVRTrace of your call, and look for clues in the trace with PVRTraceGUI
    5. Run a memory debugger (e.g. Dr. Memory)

    If DrawArrays works and DrawElements, and you “think” you are accessing the same vertex range, suspect a problem with your index list.

    6. Check all of the indices and verify that they are in the same range of vertices as you’re telling glDrawArrays about
    7. If you’re using the primitive restart index, ensure that primitive restart is enabled
    8. Verify the buffer you have bound to GL_ELEMENT_ARRAY is the one containing your indices
    9. Read the indices back from the buffer and verify that that all of them match what you think you uploaded

    #51011

    Edgar
    Member

    I issued a ticket now regarding the crash in the sdk example. Hopefully someone will look at it soon.

    #51081

    Joe Davis
    Member

    Hi Edgar,

    I’ve reproduced the issue on a Windows 7 x86-64 machine with a Radeon HD 6670 (Catalyst driver version 15.7.1) using the 3.5 SDK’s OGLES2 ChameleonMan demo. The PVRVFrame lead is investigating the issue now to isolate the source of the problem and figure out if we can workaround the issue in our emulator.

Viewing 15 posts - 1 through 15 (of 17 total)
You must be logged in to reply to this topic.