Bug 3247 - App terminates with ThreadInterruptedException from WebClient.CancelAsync
Summary: App terminates with ThreadInterruptedException from WebClient.CancelAsync
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-02-07 07:28 UTC by info
Modified: 2013-05-13 21:29 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 NOT_REPRODUCIBLE

Description info 2012-02-07 07:28:52 UTC
On some devices, and only if no debugger is connected: If there is an outstanding asynchronous WebClient activity, e.g. WebClient.DownloadStringAsync(), and this is cancelled via WebClient.CancelAsync() then the App terminates. The following logging output can be found as the probable reason for the app termination:

02-07 13:25:56.969: E/mono(12646): Unhandled Exception: System.Threading.ThreadInterruptedException: Thread interrupted
02-07 13:25:56.969: E/mono(12646):   at (wrapper managed-to-native) System.Threading.WaitHandle:WaitOne_internal (System.Threading.WaitHandle,intptr,int,bool)

Using Mono for Android 4.0.3. The bug is reproducible on a LG Optimius One, but probably also occurs on other hardware.
Comment 1 Peter Collins 2013-05-13 21:29:26 UTC
Unable to reproduce on our current stable build of Xamarin Android, resolving. Please re-open and provide some sample code or attach a small sample project if you are still seeing this issue.