Forum Xamarin.iOS

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Crash problem on device

tescotttescott USMember ✭✭
edited December 2012 in Xamarin.iOS

In tracking down my blank screen issue, I configured things to allow my app to run in the background. This appears to work fine on the simulator. If I hit the home button and select my app again, it picks up where it left off. However, if I run this on a 4th gen iPod Touch running iOS 6.0.1, it crashes when I hit the home button.

If I read the logs correctly, it's crashing in .PresentRenderBuffer:

Stacktrace:

        at MonoTouch.OpenGLES.EAGLContext.PresentRenderBuffer (uint) [0x00003] in /Developer/MonoTouch/Source/monotouch/src/OpenGLES/EAGLContext.g.cs:138
        at OpenTK.Platform.iPhoneOS.iPhoneOSGraphicsContext.SwapBuffers () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/OpenGLES/OpenTK_1.0/Platform/iPhoneOS/iPhoneOSGraphicsContext.cs:78
        at OpenTK.Graphics.GraphicsContext.SwapBuffers () [0x00000] in /Developer/MonoTouch/Source/opentk/Source/OpenTK/Graphics/GraphicsContext.cs:412
        at OpenTK.Platform.iPhoneOS.iPhoneOSGameView.SwapBuffers () [0x00027] in /Developer/MonoTouch/Source/monotouch/src/OpenGLES/OpenTK_1.0/Platform/iPhoneOS/iPhoneOSGameView.cs:632
        at com.badlogic.gdx.backends.ios.IOSGraphics.OnRenderFrame (OpenTK.FrameEventArgs) [0x00094] in /Users/tescott/Documents/projects/android/toyslots/libgdx/backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSGraphics.java:146
        at OpenTK.Platform.iPhoneOS.iPhoneOSGameView.RunIteration () [0x000c1] in /Developer/MonoTouch/Source/monotouch/src/OpenGLES/OpenTK_1.0/Platform/iPhoneOS/iPhoneOSGameView.cs:756
        at OpenTK.Platform.iPhoneOS.CADisplayLinkTimeSource.RunIteration () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/OpenGLES/OpenTK_1.0/Platform/iPhoneOS/iPhoneOSGameView.cs:146
        at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
        at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
        at toyslotsios.Application.Main (string[]) [0x00000] in /Users/tescott/Documents/projects/android/toyslots/gushiku/toyslots-ios/toyslots-ios/Main.cs:119
        at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

    0   toyslotsios                         0x0273364d mono_handle_native_sigsegv + 244
    1   toyslotsios                         0x026eca59 mono_sigsegv_signal_handler + 172
    2   libsystem_c.dylib                   0x35087e93 _sigtramp + 42
    3   libGPUSupportMercury.dylib          0x32980759 gpusSubmitDataBuffers + 124
    4   IMGSGX535GLDriver                   0x38473e95 <redacted> + 256
    5   GLEngine                            0x35cd7303 gliPresentViewES + 206
    6   OpenGLES                            0x31c9fdd9 <redacted> + 76
    7   toyslotsios                         0x00161e30 wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_bool_objc_msgSend_UInt32_intptr_intptr_uint + 76
    8   toyslotsios                         0x001bb710 OpenTK_Platform_iPhoneOS_iPhoneOSGraphicsContext_SwapBuffers + 48
    9   toyslotsios                         0x001b4e58 OpenTK_Graphics_GraphicsContext_SwapBuffers + 64
    10  toyslotsios                         0x001baa28 OpenTK_Platform_iPhoneOS_iPhoneOSGameView_SwapBuffers + 112
    11  toyslotsios                         0x000f4484 com_badlogic_gdx_backends_ios_IOSGraphics_OnRenderFrame_OpenTK_FrameEventArgs + 1576
    12  toyslotsios                         0x001bb294 OpenTK_Platform_iPhoneOS_iPhoneOSGameView_RunIteration + 616
    13  toyslotsios                         0x001b68b0 OpenTK_Platform_iPhoneOS_CADisplayLinkTimeSource_RunIteration + 40
    14  toyslotsios                         0x00a16288 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
    15  toyslotsios                         0x026ee253 mono_jit_runtime_invoke + 1054
    16  toyslotsios                         0x0275bc2b mono_runtime_invoke + 90
    17  toyslotsios                         0x026e4c9b native_to_managed_trampoline_OpenTK_Platform_iPhoneOS_CADisplayLinkTimeSource_RunIteration + 178
    18  QuartzCore                          0x3978f071 <redacted> + 160
    19  QuartzCore                          0x3978efc9 <redacted> + 64
    20  IOMobileFramebuffer                 0x39607fd7 <redacted> + 154
    21  IOKit                               0x36850449 IODispatchCalloutFromCFMessage + 192
    22  CoreFoundation                      0x35b4e5db <redacted> + 118
    23  CoreFoundation                      0x35b59173 <redacted> + 34
    24  CoreFoundation                      0x35b59117 <redacted> + 138
    25  CoreFoundation                      0x35b57f99 <redacted> + 1384
    26  CoreFoundation                      0x35acaebd CFRunLoopRunSpecific + 356
    27  CoreFoundation                      0x35acad49 CFRunLoopRunInMode + 104
    28  GraphicsServices                    0x318a32eb GSEventRunModal + 74
    29  UIKit                               0x362d22f9 UIApplicationMain + 1120
    30  toyslotsios                         0x00162ad4 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 240
    31  toyslotsios                         0x026707b0 toyslotsios_Application_Main_string__ + 152
    32  toyslotsios                         0x00a16288 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
    33  toyslotsios                         0x026ee253 mono_jit_runtime_invoke + 1054
    34  toyslotsios                         0x0275bc2b mono_runtime_invoke + 90
    35  toyslotsios                         0x0275e957 mono_runtime_exec_main + 306
    36  toyslotsios                         0x0276227b mono_runtime_run_main + 482
    37  toyslotsios                         0x027068e7 mono_jit_exec + 94
    38  toyslotsios                         0x027ae744 main + 2216
    39  toyslotsios                         0x00054888 start + 40

=================================================================
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.
=================================================================

Posts

  • EuanMacinnesEuanMacinnes SGMember

    I have the same issue in my code. I don't see any of the events firing for the ViewWillDisappear or ViewDidUnload, so it seems like the app is continuing to animate in the background as ViewWillDisappear() is not being called, and that's (possibly!) what's causing the crash.

  • EuanMacinnesEuanMacinnes SGMember

    I removed all OpenGL commands from my DrawFrame, and only did a SwapBuffers(), and then the app can close without a crash. As soon as I do even a GL.Clear(0), I get the same SIGSEGV.

    I removed the depth buffer creation, and reverted all EAGLview.cs settings to those of the sample application, and it still crashes at the GL.Clear(0);

  • EuanMacinnesEuanMacinnes SGMember

    Some progress, I found that I was getting this as a result of using OpenAL in the application to play the audio. Removing/Disabling all OpenAL-related functions caused the app to work normally.

  • tescotttescott USMember ✭✭

    I got past this, but to be honest, I don't recall what I did. Sorry!

    --tim

Sign In or Register to comment.