Hi guys, so I’ve ported my game to android and it all works fine except for one weird crash. The game is locked to landscape orientation but if I hold the device in portrait and launch the game it crashes immediately with the following error:
NoSuitableGraphicsDeviceException
MakeCurrent failed with error 12297
If I hold the device in landscape and launch the game it all works perfectly.
Anyone have any ideas?
this is the call stack:
System.Diagnostics.Debugger.Mono_UnhandledException_internal () in
System.Diagnostics.Debugger.Mono_UnhandledException (ex={Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: MakeCurrent failed with error 12297 (0x3009) —> OpenTK.Platform.Android.EglException: MakeCurrent failed with error 12297 (0x3009)
at OpenTK.Platform.Android.AndroidGraphicsContext.MakeCurrent (IWindowInfo win) [0x000bc] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/OpenGLES/Android/AndroidGraphicsContext.cs:178
at OpenTK.Platform.Android.AndroidGameView.MakeCurrent () [0x0002b] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:203
at Microsoft.Xna.Framework.MonoGameAndroidGameView.OnLoad (System.EventArgs eventArgs) [0x0000a] in /Users/Hammy/Projects/Drawtopia Android/References/MonoGame-develop/MonoGame.Framework/Android/MonoGameAndroidGameView.cs:123
— End of inner exception stack trace —
at Microsoft.Xna.Framework.MonoGameAndroidGameView.OnLoad (System.EventArgs) [0x0001e] in /Users/Hammy/Projects/Drawtopia Android/References/MonoGame-develop/MonoGame.Framework/Android/MonoGameAndroidGameView.cs:127
at OpenTK.Platform.Android.AndroidGameView.LoadInternal (System.EventArgs) [0x00003] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:282
at OpenTK.Platform.Android.AndroidGameView.SurfaceCreated (Android.Views.ISurfaceHolder) [0x00052] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:113
at Microsoft.Xna.Framework.MonoGameAndroidGameView.Android.Views.ISurfaceHolderCallback.SurfaceChanged (Android.Views.ISurfaceHolder,Android.Graphics.Format,int,int) [0x00087] in /Users/Hammy/Projects/Drawtopia Android/References/MonoGame-develop/MonoGame.Framework/Android/MonoGameAndroidGameView.cs:89
at Android.Views.ISurfaceHolderCallbackInvoker.n_SurfaceChanged_Landroid_view_SurfaceHolder_III (intptr,intptr,intptr,int,int,int) [0x00013] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.ISurfaceHolder.cs:155
at (wrapper dynamic-method) object.2b10cd71-c106-4aa5-85ee-e797824f7467 (intptr,intptr,intptr,int,int,int) <IL 0x00029, 0x0007b>
}) in
object.2b10cd71-c106-4aa5-85ee-e797824f7467 (arg0=0x4020d1b0, arg1=0xa900019, arg2=0x5ce0001d, arg3=4, arg4=1280, arg5=800) in
Microsoft.Xna.Framework.MonoGameAndroidGameView.OnLoad (eventArgs=) in /Users/Hammy/Projects/Drawtopia Android/References/MonoGame-develop/MonoGame.Framework/Android/MonoGameAndroidGameView.cs:127
OpenTK.Platform.Android.AndroidGameView.LoadInternal (e={System.EventArgs}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:282
OpenTK.Platform.Android.AndroidGameView.SurfaceCreated (holder={android.view.SurfaceView$4@41f808f0}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:113
Microsoft.Xna.Framework.MonoGameAndroidGameView.Android.Views.ISurfaceHolderCallback.SurfaceChanged (holder={android.view.SurfaceView$4@41f808f0}, format=Android.Graphics.Format.Rgb565, width=1280, height=800) in /Users/Hammy/Projects/Drawtopia Android/References/MonoGame-develop/MonoGame.Framework/Android/MonoGameAndroidGameView.cs:89
Android.Views.ISurfaceHolderCallbackInvoker.n_SurfaceChanged_Landroid_view_SurfaceHolder_III (jnienv=0x4020d1b0, native__this=0xa900019, native_holder=0x5ce0001d, native_format=4, width=1280, height=800) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.ISurfaceHolder.cs:155
object.2b10cd71-c106-4aa5-85ee-e797824f7467 (arg0=0x4020d1b0, arg1=0xa900019, arg2=0x5ce0001d, arg3=4, arg4=1280, arg5=800) in