Bug 10941 - Code works in Simulator, Hangs on Device
Summary: Code works in Simulator, Hangs on Device
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-03-06 11:50 UTC by Will
Modified: 2013-12-05 18:34 UTC (History)
2 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 NORESPONSE

Description Will 2013-03-06 11:50:56 UTC
I'm using the Reactive Extensions (modified for MonoTouch) found here:
https://github.com/stampsy/rx-monotouch


When attempting to create a progress indicator for a text file download using this code:

testButton.TouchUpInside += delegate {

	var client = new WebClient();
	
	var progress = Observable
		.FromEventPattern<DownloadProgressChangedEventHandler, DownloadProgressChangedEventArgs>(
			h => client.DownloadProgressChanged += h,
			h => client.DownloadProgressChanged -= h)
			.Throttle(TimeSpan.FromMilliseconds(50))
			.Select(x => x.EventArgs)
			;
	
	progress.Subscribe(e => 
	                   BeginInvokeOnMainThread(() => 
	                   	testLabel.Text = e.ProgressPercentage + "% Done"
	                   )
    );
	
	client.DownloadStringAsync(new Uri("http://my-local-server/800kb-text-file.txt"));
};

On the first tap, it seems to run fine.  Trying to tap the button a second time hangs the app.  After writing all of this I figured out that if I remove the Throttle() call, it seems to function reliably.

Thanks again for your support!
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-03-06 17:52:31 UTC
Can you create a complete test case and/or create a crash report when it hangs.

You can force a crash report by doing this:

* Hold down the On/Off button until "slide to power off" appears.
* Release the On/Off button.
* Hold down the Home button.
* After a few seconds the app will be terminated, and a crash report will be generated (the app's exception code will be 0xdeadfa11).
Comment 2 PJ 2013-11-19 17:04:36 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 PJ 2013-12-05 18:34:44 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.