Hi,
I'm getting a crash in the Scrubber GL in Adreno Profiler 4.0.5511.28036 running on Mac OS X. When I click "Capture Frame" it seems to get quite far, including capturing lots of textures, but then crashes. Running the profiler from the command line shows this when it crashes:
Stacktrace: at (wrapper managed-to-native) GLESWrapper.gl2.BufferData (uint,int,byte[],uint) <0xffffffff> at QXProfiler.Tokens.TokenGLDataPerBufferObject.ExecuteGLES20 () <0x00043> at QXProfilerControls.ScrubberViewES20.PrivateRender (QXProfiler.Containers.IContainerDataPlaybackGLES20) <0x0161d> at QXProfilerControls.ScrubberViewES20.CalculateUselessClear () <0x002fb> at QXProfilerControls.ScrubberViewES20.ScrubberViewES20_Paint (object,System.Windows.Forms.PaintEventArgs) <0x004c7> at System.Windows.Forms.Control.OnPaint (System.Windows.Forms.PaintEventArgs) <0x00052> at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message&) <0x0019e> at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&) <0x0019f> at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message&) <0x00013> at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message&) <0x00057> at System.Windows.Forms.UserControl.WndProc (System.Windows.Forms.Message&) <0x00063> at System.Windows.Forms.Control/ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x0001a> at System.Windows.Forms.Control/ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x0002b> at System.Windows.Forms.NativeWindow.WndProc (intptr,System.Windows.Forms.Msg,intptr,intptr) <0x0028c> at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG&) <0x00023> at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&) <0x0001a> at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) <0x00a1f> at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) <0x0005b> at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00037> at QXProfilerFrontEnd.Program.Main (string[]) <0x00377> at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff> Native stacktrace: 0 mono 0x000b98e6 mono_handle_native_sigsegv + 422 1 mono 0x000048fe mono_sigsegv_signal_handler + 334 2 libsystem_platform.dylib 0x9603003b _sigtramp + 43 3 ??? 0xffffffff 0x0 + 4294967295 4 libGPUSupportMercury.dylib 0x900123cb gpusCheckResource + 31 5 libGPUSupportMercury.dylib 0x9000b540 gldTestMemoryPlugin + 31 6 GLEngine 0x9c237872 gleGetFreeOrphanNode + 305 7 GLEngine 0x9c16e342 gleAcquireBufferData + 136 8 GLEngine 0x9c16e0cf glBufferData_Exec + 402 9 libGL.dylib 0x961acaa9 glBufferData + 55 10 libGLESv2.dylib 0x0ee2a95b _Z13mglBufferDatajlPKvj + 491 11 ??? 0x36b9a4c0 0x0 + 918136000 12 ??? 0x36b9a464 0x0 + 918135908 13 ??? 0x36b99d9e 0x0 + 918134174 14 ??? 0x36bd0fcc 0x0 + 918360012 15 ??? 0x0fe5ac50 0x0 + 266710096 16 ??? 0x0572c40b 0x0 + 91407371 17 ??? 0x05729d47 0x0 + 91397447 18 ??? 0x053096e0 0x0 + 87070432 19 ??? 0x05718bec 0x0 + 91327468 20 ??? 0x05718bb0 0x0 + 91327408 21 ??? 0x05e78604 0x0 + 99059204 22 ??? 0x0530953b 0x0 + 87070011 23 ??? 0x05309514 0x0 + 87069972 24 ??? 0x0530835d 0x0 + 87065437 25 ??? 0x05728f7c 0x0 + 91393916 26 ??? 0x05de3f9b 0x0 + 98451355 27 ??? 0x05dda5f8 0x0 + 98412024 28 ??? 0x05dd9b84 0x0 + 98409348 29 ??? 0x05dd9828 0x0 + 98408488 30 ??? 0x004ad2b8 0x0 + 4903608 31 ??? 0x004ad4df 0x0 + 4904159 32 mono 0x00010624 mono_jit_runtime_invoke + 164 33 mono 0x001c1032 mono_runtime_invoke + 137 34 mono 0x001c3940 mono_runtime_exec_main + 669 35 mono 0x001c2c7a mono_runtime_run_main + 843 36 mono 0x0008943d mono_main + 7773 37 mono 0x00002db5 start + 53 Debug info from gdb: ================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= Abort trap: 6
I've had the profiler work fine on simpler scenes, but something in the main scene for the game I'm working on is triggering a bug somewhere.
Is this a known issue? Is there a newer version of the profiler or Mono or the OpenGL libraries I should try instead?
Thanks,
Mark
What device are you trying to profile on and what OS version does it have?
Here are some instructions for profiling on Mac devices....
This is happeng for both an LG Nexus 5 running Android 5.0.1 and an Asus Nexus 7 (2013) running Android 5.1. My computer is an iMac Retina 5K running OS X Yosemite 10.10.3. I've installed the exact version of Mono mentioned in the instructions and XQuartz.
We would like to do some testing with the apk, if that's possible and you can share the apk and simple instructions to get to the point where you are profiling.
Also have you tried profiling from a Windows PC?
Hi,
I've been busy with a milestone recently, but have some time today to look at this again. I've been trying to put together a minimal APK to demonstrate the problem, but have thus far failed to reproduce the exact problem as described above :-(. The app is built using Unity 5.0 and the problem only seemed to occur if the "Dynamic Batching" option was enabled in in Unity's "Player Settings" pane. What I have encountered though is a crash on device in the graphics library, and a backtrace from the system logs is below. Again, this happened when Unity's dynamic batching was enabled, but didn't occur when that was disabled.
I'll keep trying to recreate the state where it runs on device, but a capture crashes the profiler. However if I don't manage to in a couple of hours then I'll have to move on to other things.
Mark
OK, I've managed to produce an APK which causes the Adreno profiler to crash when capturing a frame. Unfortunately it's an intermittent crash, however it will usually will crash on the second frame capture if it doesn't on the first. Also I think Unity "Dynamic Batching" setting is a red herring as the crashes now happen both with and without it.
Furthermore there seem to be multiple places in the code within the profiler where crashes can occur. Most crashes have a callstack like the one at the top of this thread, but I've also seen crashes with the following two callstacks:
Anyway, please can you message me with details of where to upload the APK for you to test?
Thanks,
Mark