Bug 10315 - CADisplayLink crashes Instrument's OpenGL Analysis
Summary: CADisplayLink crashes Instrument's OpenGL Analysis
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 6.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-02-14 18:36 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2013-03-01 17:26 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

app.crash (24.25 KB, application/octet-stream)
2013-02-14 18:36 UTC, Rolf Bjarne Kvinge [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Rolf Bjarne Kvinge [MSFT] 2013-02-14 18:36:04 UTC
Created attachment 3381 [details]

Add this to a sample project:

var l = CADisplayLink.Create (() =>
	Console.WriteLine ("display linked");
l.AddToRunLoop (NSRunLoop.Main, NSRunLoop.NSDefaultRunLoopMode);

and then run with Instrument's OpenGL ES Analyzer.

It crashes with the attached crash report.
Comment 1 Sebastien Pouliot 2013-02-15 08:52:08 UTC
It could be because CADisplayLink.Create creates a local NSActionDispatcher (not a NSAsyncActionDispatcher) that might not be exists later when the runloop calls it.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2013-02-19 04:15:53 UTC
Sebastien: you were right on track, the NSActionDispatcher was getting freed too early.


master: 4546646d3f6bcbe82cfe1d894ea2594d1d2105f4
Comment 3 Miguel de Icaza [MSFT] 2013-02-28 11:01:26 UTC
And with the above change, do we have a way of clearing the display link?
Comment 4 Rolf Bjarne Kvinge [MSFT] 2013-03-01 17:26:38 UTC
Miguel, the same was as always, using Invalidate:

var l = CADisplayLink.Create (action);
l.AddtoRunLoop (...);
l.Invalidate ();