Bug 3051 - Application crashes when single stepping out of a method
Summary: Application crashes when single stepping out of a method
Status: CLOSED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.0
Hardware: PC Mac OS
: Highest blocker
Target Milestone: Untriaged
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2012-01-24 17:02 UTC by Miguel de Icaza [MSFT]
Modified: 2012-01-31 11:52 UTC (History)
3 users (show)

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


Attachments
Trace from crash doing TC on 5.1.3 (1.72 KB, text/plain)
2012-01-25 17:07 UTC, PJ
Details
HangAfterCrashOnClose (2.28 KB, application/octet-stream)
2012-01-25 17:21 UTC, PJ
Details


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:
CLOSED FIXED

Description Miguel de Icaza [MSFT] 2012-01-24 17:02:12 UTC
To reproduce:

1. Load TweetStation
2. Set a breakpoint in Composer.cs in the method CameraTapped
3. Run tweetstation
4. Login, hit "compose" button, then Hit the camera button
5. You will reach the breakpoint
6. Step over six times (until you reach the return statement in the first if)
7. When you exit, you will get this crash:

This is the crash log:

Please ensure your device is connected...
Connected to: Love Machine 4S
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/Mono.Security.dll [External]
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/System.dll [External]
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/monotouch.dll [External]
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/System.ServiceModel.Web.dll [External]
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/System.Json.dll [External]
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/System.Core.dll [External]
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/MonoTouch.Dialog.dll
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/System.Xml.dll [External]
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/System.Xml.Linq.dll [External]
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/System.Web.Services.dll [External]
Loaded assembly: /private/var/mobile/Applications/1D406EF1-C19D-403C-9678-D6324A72792A/TweetStation.app/TweetStation.exe
Thread started: Finalizer
Resolved pending breakpoint at '/Users/miguel/Projects/TweetStation/TweetStation/Main.cs:45' to Boolean TweetStation.AppDelegate:FinishedLaunching (UIApplication, NSDictionary) [0x00010].
[Entering Finished] ticks since last invoke: 634630327087735430
[Before GetDefaultAccount] ticks since last invoke: 35937640
[Database init] ticks since last invoke: 658630
[Database finish] ticks since last invoke: 992380
[After GetDefaultAccount] ticks since last invoke: 136950
[Before UI Creation] ticks since last invoke: 3660
[After UI Creation] ticks since last invoke: 4018840
[Before trigger] ticks since last invoke: 2083980
[After trigger] ticks since last invoke: 605980
[Before trigger] ticks since last invoke: 2148090
[After trigger] ticks since last invoke: 415130
[Before trigger] ticks since last invoke: 260350
[After trigger] ticks since last invoke: 14060
Thread started: 
Thread started: 
Thread started: 
Thread started: 
Thread started: 
Thread started: 
With transactions: Spent 714680 ticks in inserting 2 elements
[Before Loading tweet from DB] ticks since last invoke: 37707390
[Time spent loading tweets] ticks since last invoke: 393520
With transactions: Spent 3568360 ticks in inserting 35 elements
[Before Loading tweet from DB] ticks since last invoke: 10270080
[Time spent loading tweets] ticks since last invoke: 3287280
With transactions: Spent 6344430 ticks in inserting 195 elements
[Before Loading tweet from DB] ticks since last invoke: 10212530
[Time spent loading tweets] ticks since last invoke: 2120780
Unable to find seq points for method 'MonoTouch.UIKit.UIBarButtonItem/Callback:Call (MonoTouch.Foundation.NSObject)'.
* Assertion at ../../../../../mono/mono/mini/debugger-agent.c:2708, condition `seq_points' not met

Stacktrace:


Native stacktrace:

	0   TweetStation                        0x00807ae4 mono_handle_native_sigsegv + 280
	1   TweetStation                        0x0082a624 sigabrt_signal_handler + 180
	2   libsystem_c.dylib                   0x36275539 _sigtramp + 48
	3   libsystem_c.dylib                   0x3626af5b pthread_kill + 54
	4   libsystem_c.dylib                   0x36263feb abort + 94
	5   TweetStation                        0x008e35b8 monoeg_g_logv + 152
	6   TweetStation                        0x008e3604 monoeg_assertion_message + 52
	7   TweetStation                        0x0081dc78 find_seq_points + 320
	8   TweetStation                        0x0081e8ec ss_start + 300
	9   TweetStation                        0x00811358 debugger_thread + 4292
	10  TweetStation                        0x008d77b8 thread_start_routine + 152
	11  TweetStation                        0x008f2088 GC_start_routine + 92
	12  libsystem_c.dylib                   0x3622cc1d _pthread_start + 320
	13  libsystem_c.dylib                   0x3622cad8 thread_start + 8

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-01-24 19:03:25 UTC
This is a regression between 5.1.0 and 5.1.1
Comment 2 Zoltan Varga 2012-01-25 00:36:04 UTC
This probably happens when single stepping out into a method which has no debug info, since its assembly wasn't aot-ed with the 'soft-debug' option.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-01-25 08:22:33 UTC
This is because of: e4f13865a0fec8dbc179c029ea9ad4a47dfdaea1, where we don't aot with 'nodebug' anymore (but we don't pass 'soft-debug' either) for sdk assemblies.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2012-01-25 08:25:20 UTC
The reasoning for the change in e4f1386 is explained in bug #664.
Comment 5 Zoltan Varga 2012-01-25 11:51:07 UTC
Should be fixed by 1e946d2b6ccd3361759c19dd028b4875a160f85b, can somebody test it ?
Comment 6 PJ 2012-01-25 17:07:31 UTC
Created attachment 1269 [details]
Trace from crash doing TC on 5.1.3
Comment 7 PJ 2012-01-25 17:21:32 UTC
Created attachment 1270 [details]
HangAfterCrashOnClose
Comment 8 Rolf Bjarne Kvinge [MSFT] 2012-01-26 08:33:43 UTC
The fix works (I tested MT master).
Comment 10 Zoltan Varga 2012-01-26 13:41:39 UTC
In the current mobile-master sources, ss_start no longer calls find_seq_points ().
Comment 11 PJ 2012-01-26 13:45:22 UTC
This was the crash from 5.20 branch I think. I will grab the trace from the master (5.2.1) too then.
Comment 12 PJ 2012-01-26 14:58:47 UTC
Verified on both branches. Finder was opening the old broken 5.2.0 image when I d/led the 'new' 5.2.0 image.

Sorry for all the red herrings.