More App Resume Issues - Latest MG Build Crashes Device

Hi,

OK, so I updated to the latest version of MonoGame and testing pause/resume on a very simple app that just displays two textures worked OK (most of the time) in the emulator. Now I try on a device (HTC One X running Android 4.2.2) and resuming the app is crashing with the following error…

I really don’t know why I seem to be the only person having problems with this!

Will try later on another device.

cheers

05-12 10:32:03.153 D/CAT     (  889): CatService: Return current sInstance
05-12 10:32:03.158 D/WirelessDisplayService(  513): getMirrorDisplayStatus:falsecurState:1
05-12 10:32:03.198 E/libEGL  (11154): eglMakeCurrent:717 error 3009 (EGL_BAD_MATCH)
05-12 10:32:03.203 E/libEGL  (11154): eglMakeCurrent:717 error 3009 (EGL_BAD_MATCH)
05-12 10:32:03.218 I/MonoDroid(11154): UNHANDLED EXCEPTION: OpenTK.Platform.Android.EglException: MakeCurrent failed with error 12297 (0x3009)
05-12 10:32:03.218 I/MonoDroid(11154): at OpenTK.Platform.Android.AndroidGraphicsContext.MakeCurrent (OpenTK.Platform.IWindowInfo) <0x00214>
05-12 10:32:03.218 I/MonoDroid(11154): at OpenTK.Platform.Android.AndroidGameView.MakeCurrent () <0x0007b>
05-12 10:32:03.218 I/MonoDroid(11154): at Microsoft.Xna.Framework.MonoGameAndroidGameView.OnLoad (System.EventArgs) <0x00023>
05-12 10:32:03.218 I/MonoDroid(11154): at OpenTK.Platform.Android.AndroidGameView.LoadInternal (System.EventArgs) <0x00027>
05-12 10:32:03.218 I/MonoDroid(11154): at OpenTK.Platform.Android.AndroidGameView.SurfaceCreated (Android.Views.ISurfaceHolder) <0x00107>
05-12 10:32:03.218 I/MonoDroid(11154): at Microsoft.Xna.Framework.MonoGameAndroidGameView.Android.Views.ISurfaceHolderCallback.SurfaceCreated (Android.Views.ISurfaceHolder) <0x0001b>
05-12 10:32:03.218 I/MonoDroid(11154): at Android.Views.ISurfaceHolderCallbackInvoker.n_SurfaceCreated_Landroid_view_SurfaceHolder_ (intptr,intptr,intptr) <0x0005f>
05-12 10:32:03.218 I/MonoDroid(11154): at (wrapper dynamic-method) object.c400e294-691a-4ff6-8f3b-ed27e4ef827c (intptr,intptr,intptr) <0x00043>
05-12 10:32:03.238 E/mono    (11154): 
05-12 10:32:03.238 E/mono    (11154): Unhandled Exception:
05-12 10:32:03.238 E/mono    (11154): OpenTK.Platform.Android.EglException: MakeCurrent failed with error 12297 (0x3009)
05-12 10:32:03.238 E/mono    (11154):   at OpenTK.Platform.Android.AndroidGraphicsContext.MakeCurrent (IWindowInfo win) [0x00000] in <filename unknown>:0 
05-12 10:32:03.238 E/mono    (11154):   at OpenTK.Platform.Android.AndroidGameView.MakeCurrent () [0x00000] in <filename unknown>:0 
05-12 10:32:03.238 E/mono    (11154):   at Microsoft.Xna.Framework.MonoGameAndroidGameView.OnLoad (System.EventArgs eventArgs) [0x00000] in <filename unknown>:0 
05-12 10:32:03.238 E/mono    (11154):   at OpenTK.Platform.Android.AndroidGameView.LoadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0 
05-12 10:32:03.238 E/mono    (11154):   at OpenTK.Platform.Android.AndroidGameView.SurfaceCreated (ISurfaceHolder holder) [0x00000] in <filename unknown>:0 
05-12 10:32:03.238 E/mono    (11154):   at Microsoft.Xna.Framework.MonoGameAndroidGameView.Android.Views.ISurfaceHolderCallback.SurfaceCreated (ISurfaceHolder holder) [0x00000] in <filename unknown>:0 
05-12 10:32:03.238 E/mono    (11154):   at Android.Views.ISurfaceHolderCallbackInvoker.n_SurfaceCreated_Landroid_view_SurfaceHolder_ (IntPtr jnienv, IntPtr native__this, IntPtr native_holder) [0x00000] in <filename unknown>
05-12 10:32:03.243 E/mono-rt (11154): [ERROR] FATAL UNHANDLED EXCEPTION: OpenTK.Platform.Android.EglException: MakeCurrent failed with error 12297 (0x3009)
05-12 10:32:03.243 E/mono-rt (11154):   at OpenTK.Platform.Android.AndroidGraphicsContext.MakeCurrent (IWindowInfo win) [0x00000] in <filename unknown>:0 
05-12 10:32:03.243 E/mono-rt (11154):   at OpenTK.Platform.Android.AndroidGameView.MakeCurrent () [0x00000] in <filename unknown>:0 
05-12 10:32:03.243 E/mono-rt (11154):   at Microsoft.Xna.Framework.MonoGameAndroidGameView.OnLoad (System.EventArgs eventArgs) [0x00000] in <filename unknown>:0 
05-12 10:32:03.243 E/mono-rt (11154):   at OpenTK.Platform.Android.AndroidGameView.LoadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0 
05-12 10:32:03.243 E/mono-rt (11154):   at OpenTK.Platform.Android.AndroidGameView.SurfaceCreated (ISurfaceHolder holder) [0x00000] in <filename unknown>:0 
05-12 10:32:03.243 E/mono-rt (11154):   at Microsoft.Xna.Framework.MonoGameAndroidGameView.Android.Views.ISurfaceHolderCallback.SurfaceCreated (ISurfaceHolder holder) [0x00000] in <filename unknown>:0 
05-12 10:32:03.243 E/mono-rt (11154):   at Android.Views.ISurfaceHolderCallbackInvoker.n_SurfaceCreated_Landroid_view_SurfaceHolder_ (IntPtr jnienv, IntPtr native__this, IntPtr native_holder) [0x00000] in <file

This pull request should fix the crash: https://github.com/mono/MonoGame/pull/2627

Great, thanks. I will try that on Monday…

This update crash android app after resume.
https://github.com/mono/MonoGame/commit/3a6741a840e4d7d463c669e6654d75f620fc3737]

Function “ReloadAsset(string originalAssetName, T currentAsset)” cant find file by “key” from “loadedAssets”.