Hi Andreia,
Thanks for the reply. I tried calling Pause() as you suggested, but unfortunately this did not change the behavior. The app still crashes after a few rotates with the same error. From: monodroid-boun...@lists.ximian.com [mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Andreia Gaita Sent: Friday, November 04, 2011 12:17 PM To: Discussions related to Mono for Android Subject: Re: [mono-android] Rotating OpenGL app dies with egl.EglMakeCurrent failed: 0x3009 Hi, Change the Activity class to be like below, and see if that fixes the rotation crash: public class Activity1 : Activity { GLView1 view; protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); // Create our OpenGL view, and display it view = new GLView1 (this); SetContentView (view); } protected override void OnPause () { base.OnPause (); view.Pause (); } } -- andreia On Fri, Nov 4, 2011 at 6:21 PM, Randy Ficker <randyfic...@gmail.com> wrote: > > 1. Make a fresh "Mono for Android OpenGL Application" > > 2. Deploy it to a device > > 3. Rotate the device back and forth between portrait and landscape. > > 4. Within 2-4 rotates, the app dies with this exception: > > > > I( 97:0x70) Setting rotation to 1, animFlags=0 > > I( 97:0x70) Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=1/1/2 nav=3/1 orien=2 layout=34 uiMode=17 seq=155} > > D(25138:0x6232) SurfaceDestroyed > > D(25138:0x6232) SurfaceCreated > > D( 205:0xcd) GC_EXTERNAL_ALLOC freed 123K, 48% free 3277K/6279K, external 6224K/6227K, paused 61ms > > E(25138:0x6251) eglMakeCurrent:1212 error 3009 (EGL_BAD_MATCH) > > I(25138:0x6251) UNHANDLED EXCEPTION: System.InvalidOperationException: egl.EglMakeCurrent failed: 0x3009 > > I(25138:0x6251) at OpenTK.Platform.Android.AndroidGraphicsContext.MakeCurrent (OpenTK.Platform.IWindowInfo) <0x00134> > > I(25138:0x6251) at OpenTK.Platform.Utilities.CreateGraphicsContext (OpenTK.Graphics.GraphicsMode,OpenTK.Platform.IWindowInfo,int,int,OpenTK.Gra phics.GraphicsContextFlags) <0x0006f> > > I(25138:0x6251) at OpenTK.Platform.Android.AndroidGameView.CreateFrameBuffer () <0x000a7> > > I(25138:0x6251) at OpenTK.Platform.Android.AndroidGameView.RunIteration () <0x0016b> > > I(25138:0x6251) at OpenTK.Platform.Android.RepeatTimerTask.Run () <0x00023> > > I(25138:0x6251) at Java.Util.TimerTask.n_Run (intptr,intptr) <0x00033> > > I(25138:0x6251) at (wrapper dynamic-method) object.c83607bc-1f2b-4e22-b808-ffb4096c3a85 (intptr,intptr) <0x0002b> > > E(25138:0x6251) > > E(25138:0x6251) Unhandled Exception: System.InvalidOperationException: egl.EglMakeCurrent failed: 0x3009 > > E(25138:0x6251) at OpenTK.Platform.Android.AndroidGraphicsContext.MakeCurrent (IWindowInfo window) [0x00000] in <filename unknown>:0 > > E(25138:0x6251) at OpenTK.Platform.Utilities.CreateGraphicsContext (OpenTK.Graphics.GraphicsMode mode, IWindowInfo window, Int32 major, Int32 minor, GraphicsContextFlags flags) [0x00000] in <filename unknown>:0 > > E(25138:0x6251) at OpenTK.Platform.Android.AndroidGameView.CreateFrameBuffer () [0x00000] in <filename unknown>:0 > > E(25138:0x6251) at OpenTK.Platform.Android.AndroidGameView.RunIteration () [0x00000] in <filename unknown>:0 > > E(25138:0x6251) at OpenTK.Platform.Android.RepeatTimerTask.Run () [0x00000] in <filename unknown>:0 > > E(25138:0x6251) at Java.Util.TimerTask.n_Run (IntPtr jnienv, IntPtr native__this) [0x00000] in <filename unknown>:0 > > E(25138:0x6251) at (wrapper dynamic-method) object:c83607bc-1f2b-4e22-b808-ffb4096c3a85 (intptr,intptr) > > I( 97:0x61) Process OpenGLApplication6.OpenGLApplication6 (pid 25138) has died. > > I( 97:0x66) WIN DEATH: Window{409685a0 OpenGLApplication6.OpenGLApplication6/openglapplication6.Activity1 paused=false} > > I( 97:0x4492) WIN DEATH: Window{40975010 SurfaceView paused=false} > > D( 67:0x43) Process 25138 exited cleanly (1) > > I( 97:0x61) Setting rotation to 0, animFlags=1 > > I( 97:0x61) Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=1/1/2 nav=3/1 orien=1 layout=34 uiMode=17 seq=156} > > V(20325:0x4f65) surfaceCreated > > V(20325:0x4f65) surfaceChanged > > > > > > This happens 100% of the time for me. I'm running Mono for Android 1.9.2, and my device is a Nexus One running 2.3.6. > > > > Is this a known bug or should I file it? Are there any workarounds? > > > > Thanks! > > _______________________________________________ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid >
_______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid