Bug 24198 - The thread access exception deadlocks the app when using MKOverlayPathRenderer
Summary: The thread access exception deadlocks the app when using MKOverlayPathRenderer
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.4.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-10-31 13:52 UTC by Prashant Cholachagudda
Modified: 2016-05-26 01:24 UTC (History)
5 users (show)

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

Testcase (10.07 KB, application/zip)
2014-10-31 13:52 UTC, Prashant Cholachagudda

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 Prashant Cholachagudda 2014-10-31 13:52:22 UTC
Created attachment 8574 [details]

The app deadlock due to UIKitThreadAccessException when we try to add annotations in MKOverlayPathRenderer

MonoTouch.UIKit.UIKitThreadAccessException: UIKit Consistency error: you are calling a UIKit method that can only be invoked from the UI thread.
  at MonoTouch.UIKit.UIApplication.EnsureUIThread () [0x00023] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:70
  at MonoTouch.MapKit.MKOverlayPathRenderer.ApplyStrokePropertiesToContext (MonoTouch.CoreGraphics.CGContext context, Single zoomScale) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/build/compat/MapKit/MKOverlayPathRenderer.g.cs:157
  at RendererTest.TestPolylineRenderer.DrawMapRect (MKMapRect mapRect, Single zoomScale, MonoTouch.CoreGraphics.CGContext context) [0x00004] in /Users/prashantvc/Desktop items/Xamarin/95828/RendererTest/RendererTest/RendererTestViewController.cs:34
Comment 2 Udham Singh 2014-10-31 14:13:04 UTC
I have checked this issue with the Testcase attached in bug description and
getting the same error. To reproduce this issue I have downloaded the testcase,
run the app and got the error. Please refer the screencast :

Application Output : https://gist.github.com/Udham1/3a0fab05f16306b6c117

Environment Info :

=== Xamarin Studio ===

Version 5.5.3 (build 6)
Installation UUID: ce927b2a-2c07-44c5-b186-09cfdafba6dc
    Mono 3.10.0 ((detached/e204655)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 310000023

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 08968c4
Build date: 2014-10-20 21:48:06-0400

=== Build Information ===

Release ID: 505030006
Git revision: fbe3e9453daf6a3bb9a9709ed22bec35f7c9056b
Build date: 2014-10-23 13:08:38-04
Xamarin addins: e44add2b39de4dd57c0742bb2e620dfad84c64c6

=== Operating System ===

Mac OS X 10.9.4
Darwin Xamarin76s-Mac-mini.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 3 Rolf Bjarne Kvinge [MSFT] 2014-11-03 03:28:18 UTC
I can reproduce the exception, but not the deadlock.

Can you force a crash report when the app deadlocks? You can do this by holding down the On/Off button until "slide to power off" appears, then hold down the Home button until the app disappears. Finally get the crash report using Xcode's Organizer.
Comment 4 Sebastien Pouliot 2016-05-26 01:24:52 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!