PVRTrace crash when application tracing

Tagged: 

This topic contains 8 replies, has 2 voices, and was last updated by  Joe Davis 3 years, 11 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #31523

    Richard Lu
    Member

    Hi all,

    I am trying to using PVRTrace for our proprietary device which is MTK 8125 platform (Android 4.2.2).
    PVRTrace have installed in my device, and I can connect to my device by PVRTrace GUI 3.1 successfully.
    But when I start to trace applications, I always continue getting this crash stack dump with error code 0x500 .

    What is this error code stand for and is there any additional modification need to be done for PVRTrace?

    Thank you,

    Best Regards,
    Richard

    ============================================================================================================================
    10-18 18:25:29.418: E/IMGSRV(4192): :0: SetError: 0x500
    10-18 18:25:29.418: E/IMGSRV(4192): :0: Stack trace: Error
    10-18 18:25:29.419: D/CallStack(4192): (null)#00 pc 0000c1b0 /system/vendor/lib/libsrv_um.so (MTKDebugDumpStack+72)
    10-18 18:25:29.419: D/CallStack(4192): (null)#01 pc 0001a1c0 /system/vendor/lib/egl/libGLESv2_mtk.so
    10-18 18:25:29.419: D/CallStack(4192): (null)#02 pc 00016db0 /system/vendor/lib/egl/libGLESv2_mtk.so
    10-18 18:25:29.419: D/CallStack(4192): (null)#03 pc 0007aa02 /system/vendor/lib/libPVRTrace.so (CEs2ContextState::TrackData()+201)
    10-18 18:25:29.419: D/CallStack(4192): (null)#04 pc 00068740 /system/vendor/lib/libPVRTrace.so (Es2::_glDrawArrays(unsigned int, int, int)+203)
    10-18 18:25:29.420: D/CallStack(4192): (null)#05 pc 000079de /system/vendor/lib/egl/libGLESv2_PVRTRACE.so (glDrawArrays+1)
    10-18 18:25:29.420: D/CallStack(4192): (null)#06 pc 0001b540 /system/lib/libhwui.so
    10-18 18:25:29.420: D/CallStack(4192): (null)#07 pc 0001c9a4 /system/lib/libhwui.so
    10-18 18:25:29.420: D/CallStack(4192): (null)#08 pc 00012e8c /system/lib/libhwui.so
    10-18 18:25:29.420: D/CallStack(4192): (null)#09 pc 0001e9c2 /system/lib/libhwui.so
    10-18 18:25:29.420: D/CallStack(4192): (null)#10 pc 00062ba4 /system/lib/libandroid_runtime.so
    10-18 18:25:29.420: D/CallStack(4192): (null)#11 pc 0001e590 /system/lib/libdvm.so (dvmPlatformInvoke+112)
    10-18 18:25:29.420: D/CallStack(4192): (null)#12 pc 0004de24 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+499)
    10-18 18:25:29.420: D/CallStack(4192): (null)#13 pc 00027960 /system/lib/libdvm.so
    10-18 18:25:29.420: D/CallStack(4192): (null)#14 pc 0002b8c4 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
    10-18 18:25:29.420: D/CallStack(4192): (null)#15 pc 000613ea /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+373)
    10-18 18:25:29.420: D/CallStack(4192): (null)#16 pc 00069304 /system/lib/libdvm.so
    10-18 18:25:29.420: D/CallStack(4192): (null)#17 pc 00027960 /system/lib/libdvm.so
    10-18 18:25:29.420: D/CallStack(4192): (null)#18 pc 0002b8c4 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
    10-18 18:25:29.420: D/CallStack(4192): (null)#19 pc 000610c4 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+271)
    10-18 18:25:29.420: D/CallStack(4192): (null)#20 pc 0004a0fc /system/lib/libdvm.so
    10-18 18:25:29.420: D/CallStack(4192): (null)#21 pc 0004d2b6 /system/lib/libandroid_runtime.so
    10-18 18:25:29.420: D/CallStack(4192): (null)#22 pc 0004e05c /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+399)
    10-18 18:25:29.420: D/CallStack(4192): (null)#23 pc 00000db6 /system/bin/app_process
    10-18 18:25:29.420: D/CallStack(4192): (null)#24 pc 00020f48 /system/lib/libc.so (__libc_init+64)
    10-18 18:25:29.430: E/IMGSRV(4192): :0: SetError: 0x500
    10-18 18:25:29.430: E/IMGSRV(4192): :0: Stack trace: Error

    #38145

    Joe Davis
    Member

    Hi,

    Looking at the log, the crash seems to be happening in the graphics driver rather than PVRTrace. “IMGSRV” is the services component of the graphics driver.

    Does the crash only occur when PVRTrace recording is enabled, or does it crash all of the time? Can you send an APK that reproduces the issue to devtech@imgtec.com?

    Thanks,
    Joe

    #38146

    Richard Lu
    Member

    Hi Joe,

    Thanks for your replay.

    Yes. This crash only happened only when using PVRTrace start tracing.
    No crash happen if normal launch without PVRTrace.

    And almost all APPs has this crash.
    I have tested such as com.google.android.deskclock, com.android.settings, gmail, chrome, browser all have this issue with error code 0x500.

    Is there any additional requirement to PVRTrace for the graphic driver ? Or what is the meaning of this error code?

    Thank you,
    Richard

    #38147

    Joe Davis
    Member

    Hi Richard,

    Are you using the PVRTraceApp Android application to configure your recording, or are you editing the pvrtrace.cfg manually?

    I tried searching through our reference driver source, but was unable to find the error code or the message that has printed to your log. You should discuss the issue with MediaTek as the error may be specific to their variation of our graphics driver.

    There is no dependency between PVRTrace and the graphics driver, as PVRTrace merely captures GL data before it is passed onto the host.

    Thanks,
    Joe

    #38148

    Richard Lu
    Member

    Hi Joe,

    I am using the PVRTraceApp Android application with root access right to configure.
    And I will ask MediaTek for help.

    Thank you,

    Richard

    #38149

    Richard Lu
    Member

    Hi Joe,

    These stack dump is come from graphic driver.
    When it detect GLError form OpenGL, it will show error code and its callstack.

    So the error code of 0x500 means GL_INVALID_ENUM.
    And I found both glDrawArrays and glDrawElements will cause this 0x500 error.

    Best Regards,
    Richard

    Here is another crash dump form glDrawElements.
    =================================================================================

    E/IMGSRV ( 3372): :0: SetError: 0x500

    E/IMGSRV ( 3372): :0: Stack trace: Error

    D/CallStack( 3372): (null)#00 pc 0000c1b0 /system/vendor/lib/libsrv_um.so (MTKDebugDumpStack+72)

    D/CallStack( 3372): (null)#01 pc 0001a1c0 /system/vendor/lib/egl/libGLESv2_mtk.so

    D/CallStack( 3372): (null)#02 pc 00016db0 /system/vendor/lib/egl/libGLESv2_mtk.so

    D/CallStack( 3372): (null)#03 pc 0007aa02 /system/vendor/lib/libPVRTrace.so (CEs2ContextState::TrackData()+201)

    D/CallStack( 3372): (null)#04 pc 00068af0 /system/vendor/lib/libPVRTrace.so (Es2::_glDrawElements(unsigned int, int, unsigned int, void const*)+211)

    D/CallStack( 3372): (null)#05 pc 000079d6 /system/vendor/lib/egl/libGLESv2_PVRTRACE.so (glDrawElements+1)

    D/CallStack( 3372): (null)#06 pc 0000d53e /system/lib/libhwui.so

    D/CallStack( 3372): (null)#07 pc 0000d558 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#08 pc 0000d628 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#09 pc 0001d43c /system/lib/libhwui.so

    D/CallStack( 3372): (null)#10 pc 00013252 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#11 pc 0001e9c2 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#12 pc 0001318e /system/lib/libhwui.so

    D/CallStack( 3372): (null)#13 pc 0001e9c2 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#14 pc 0001318e /system/lib/libhwui.so

    D/CallStack( 3372): (null)#15 pc 0001e9c2 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#16 pc 0001318e /system/lib/libhwui.so

    D/CallStack( 3372): (null)#17 pc 0001e9c2 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#18 pc 0001318e /system/lib/libhwui.so

    D/CallStack( 3372): (null)#19 pc 0001e9c2 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#20 pc 0001318e /system/lib/libhwui.so

    D/CallStack( 3372): (null)#21 pc 0001e9c2 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#22 pc 0001318e /system/lib/libhwui.so

    D/CallStack( 3372): (null)#23 pc 0001e9c2 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#24 pc 0001318e /system/lib/libhwui.so

    D/CallStack( 3372): (null)#25 pc 0001e9c2 /system/lib/libhwui.so

    D/CallStack( 3372): (null)#26 pc 00062ba4 /system/lib/libandroid_runtime.so

    D/CallStack( 3372): (null)#27 pc 0001e590 /system/lib/libdvm.so (dvmPlatformInvoke+112)

    D/CallStack( 3372): (null)#28 pc 0004de24 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+499)

    D/CallStack( 3372): (null)#29 pc 00027960 /system/lib/libdvm.so

    D/CallStack( 3372): (null)#30 pc 0002b8c4 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)

    D/OpenGLRenderer( 3372): TextureCache::get: create texture(0x51c0c478): name, size, mSize = 490007, 7396, 29256

    E/IMGSRV ( 3372): :0: SetError: 0x500

    E/IMGSRV ( 3372): :0: Stack trace: Error

    #38150

    Joe Davis
    Member

    Hi Richard,

    When a GL error is encountered in a conformant driver, the driver should not crash. It should only return the error code to the application. It’s worth noting that when an error occurs, the GL state will be restored to the point before the call was made (i.e. the call will have no effect).

    Are you running a debug driver on the MediaTek platform? You should discuss the crash with them.

    If you email us, I can give you a pre-release build of the 3.2 SDK PVRTrace. We’ve implemented a lot of bug fixes, so the latest build may not encounter the issue.

    Thanks,
    Joe

    #38151

    Richard Lu
    Member

    Hi Joe,

    It works well with latest released PVRHub with offline tracing.
    Thanks for your support,

    Best Regards,
    Richard

    #38152

    Joe Davis
    Member

    Hi Richard,

    Glad to hear it works now. Thanks for letting me know.

    Regards,
    Joe

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