Bug 6562 - Crash handling caught exception on device
Summary: Crash handling caught exception on device
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.2
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-08-16 13:44 UTC by jesse.attas
Modified: 2012-09-11 18:17 UTC (History)
2 users (show)

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:

Description jesse.attas 2012-08-16 13:44:49 UTC
We have a crash in a block of code that throws an exception in a try...catch where the catch should be catching the exception. This only happens in release builds on the device, not in debug or in the simulator.

The block of code looks like this:

                string str = "Hello";
                    return int.Parse(str);
                    return str;

It also fails if I change the catch to "catch (Exception)".

I tried to make a simple test app that reproduces the issue, but couldn't get it to crash. Not sure why, but one guess is that the real app has some nested anonymous methods and BeginInvokes that I didn't try to reproduce in the test app.

Call stacks to follow in private posts...
Comment 3 jesse.attas 2012-08-16 13:46:26 UTC
And here's my version info:
Installation UUID: 1480f558-ce01-4cc9-8f58-058dda76f061
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (
	Package version: 210090011
Apple Developer Tools:
	 Xcode 4.4.1 (1488)
	 Build 4F1003
Monotouch: 5.2.13
Comment 5 jesse.attas 2012-08-17 15:11:30 UTC
This appears to be fixed in the latest beta (Monotouch 5.3.5). Any chance the fix could be migrated to the stable branch?
Comment 6 Rolf Bjarne Kvinge [MSFT] 2012-09-11 18:17:04 UTC
MonoTouch 5.4 (stable) has been released, so I'm closing this for now.

If you can still reproduce this bug, please reopen it.