Bug 5696 - App hangs on resume when calling CLLocationManager.StartMonitoringSignificantLocationChanges
Summary: App hangs on resume when calling CLLocationManager.StartMonitoringSignificant...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: Debugger ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-06-17 21:12 UTC by Simon Cropp
Modified: 2013-11-19 17:51 UTC (History)
3 users (show)

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

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:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Simon Cropp 2012-06-17 21:12:39 UTC
We call CLLocationManager.StartMonitoringSignificantLocationChanges from within our UIApplicationDelegate.UIApplicationDidBecomeActiveNotification.

Breaking scenario
1. Build, deploy and debug to iphone
2. Suspend the app by hitting the power button on the phone (only suspend not full shut down)
3. Turn back on and unlock
3. The App hangs

Working scenario 1
Do the above but comment out CLLocationManager.StartMonitoringSignificantLocationChanges and it does not hang

Working scenario 2
1. Build, deploy and debug to iphone
2. Unplug the iphone cable
3. Suspend the app by hitting the power button on the phone (only suspend not full shut down)
4. Turn back on and unlock
5. The App does not hang

Working scenario 3
1. Build, deploy and debug to iphone
2. Shut down monodevelop
3. Suspend the app by hitting the power button on the phone (only suspend not full shut down)
4. Turn back on and unlock
5. The App does not hang
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-06-20 07:30:58 UTC
I have not been able to reproduce this hang, here is the code I tried with:

public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
	window = new UIWindow (UIScreen.MainScreen.Bounds);
	
	viewController = new svmtViewController ();
	window.RootViewController = viewController;
	window.MakeKeyAndVisible ();

	NSNotificationCenter.DefaultCenter.AddObserver (UIApplication.DidBecomeActiveNotification, notification => OnBecameActive ());

	return true;
}

CLLocationManager clm = new CLLocationManager ();
public void OnBecameActive ()
{
	Console.WriteLine ("OnBecameActive");
	clm.StartMonitoringSignificantLocationChanges ();
	clm.UpdatedLocation += (sender, e2) => 
	{
		Console.WriteLine ("Location changed");
	};
}

Could you attach a complete test case where it hangs for you?
Comment 2 PJ 2013-11-19 17:04:10 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 3 Simon Cropp 2013-11-19 17:47:23 UTC
Guys

I am no longer working on that project and hence cant repro anymore. 

Suggest this is closed
Comment 4 Rolf Bjarne Kvinge [MSFT] 2013-11-19 17:51:16 UTC
Thanks for getting back to us.