Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 1188 [details]
Fatal Unhandled exception
Fatal Unhandled exception thrown when clicking the home button in the iPhone simulator to exit the application.
Steps to reproduce:
1. Open the OpenGLESSample-GameView sample application in MonoDevelop
2. Run the application in the iPhone simulator through MD
3. Wait for view to load
- Should see a spinning colorful square
4. Click the iPhone home button to exit the application
Application output indicates FATAL UNHANDLED exception occurs (see attachment)
Should not have a FATAL UNHANDLED exception when exiting program through home button click
Note: This problem did not exist in the previous stable release of MT (5.0.4)
I can't duplicate it - at least no exactly like this*. Can you reliably reproduce it ? or maybe the app was interrupted in a weird place ?
* When I click on the simulator home button the application quits but I don't get the exception shown in MonoDevelop. OTOH MonoDevelop** does not stop (it still believe it's debugging the app) and I have to stop it manually (that seems consistent with other applications, I don't often use the home button with the simulator ;-).
** I'm using MonoDevelop 2.8.5 (on Lion) so this might explain the difference.
I used the wrong sample -> OpenGLESSample-GameView
This null check will avoid the exception - but maybe we should have our own GetContext implementation ?
diff --git a/Source/OpenTK/Graphics/GraphicsContext.cs b/Source/OpenTK/Graphics/GraphicsContext.cs
index f62d29a..501d445 100644
@@ -300,7 +300,7 @@ namespace OpenTK.Graphics
foreach (WeakReference weak_ref in available_contexts.Values)
IGraphicsContext context = (IGraphicsContext)weak_ref.Target;
- if (context.IsCurrent)
+ if (context != null && context.IsCurrent)
return (context as IGraphicsContextInternal).Context;
Adding Rolf to this one, since this is OpenTK related.
Fixed in 8a3c1b2e.
I have checked this issue with following builds:
X.S 4.2.3(build 154)
Now I am not seeing crash, Cube appears on simulator. This is the screencast for the same: http://screencast.com/t/Zicn9VyriGV