Bug 2898 - debugger assertion when debugging monotouch app
Summary: debugger assertion when debugging monotouch app
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Debugger ()
Version: 5.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-01-13 17:24 UTC by Jeffrey Stedfast
Modified: 2012-01-17 19:19 UTC (History)
5 users (show)

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


Attachments
zip file containing MonoTouch solution (5.98 KB, application/zip)
2012-01-13 17:24 UTC, Jeffrey Stedfast
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:
RESOLVED FIXED

Description Jeffrey Stedfast 2012-01-13 17:24:26 UTC
Created attachment 1190 [details]
zip file containing MonoTouch solution

MonoTouch from git master a few days ago (I'll retry with MonoTouch 5.0.4 to make it easier for you to reproduce my exact setup)
MonoDevelop 2.8.5
Mono 2.10.8.1

Set a breakpoint on line 34 of MyView.cs (the Console.WriteLine) and then hit Debug.

When the breakpoint is hit (strangely, it doesn't show the yellow arrow, but execution is suspended and the Step Into/etc buttons are available), hit "Step Over" and the following assertion is hit:


Resolved pending breakpoint at '/Users/fejj/Downloads/BreakpointIssue/BreakpointIssue/MyView.cs:34' to Void BreakpointIssue.MyView:<HandleBtnTouchUpInside>m__0 () [0x00018].
Thread started: 
Thread started: 
* Assertion at ../../../../../mono/mono/mini/debugger-agent.c:4619, condition `tls->frame_count' not met

Stacktrace:

  at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x0009f, 0xffffffff>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29
  at BreakpointIssue.Application.Main (string[]) [0x00000] in /Users/fejj/Downloads/BreakpointIssue/BreakpointIssue/Main.cs:16
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>

Native stacktrace:

	0   BreakpointIssue                     0x0009013c mono_handle_native_sigsegv + 284
	1   BreakpointIssue                     0x000d51fd sigabrt_signal_handler + 109
	2   libSystem.B.dylib                   0x96b9a05b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   CoreFoundation                      0x0119413a __CFRunLoopServiceMachPort + 186
	5   CoreFoundation                      0x010f7580 __CFRunLoopRun + 1312
	6   CoreFoundation                      0x010f6db4 CFRunLoopRunSpecific + 212
	7   CoreFoundation                      0x010f6ccb CFRunLoopRunInMode + 123
	8   GraphicsServices                    0x04788879 GSEventRunModal + 207
	9   GraphicsServices                    0x0478893e GSEventRun + 114
	10  UIKit                               0x0218fa9b UIApplicationMain + 1175
	11  ???                                 0x0d83d7fd 0x0 + 226744317
	12  ???                                 0x0d571ea0 0x0 + 223813280
	13  ???                                 0x0d571b98 0x0 + 223812504
	14  ???                                 0x0d571cee 0x0 + 223812846
	15  BreakpointIssue                     0x00009aa2 mono_jit_runtime_invoke + 722
	16  BreakpointIssue                     0x0016937e mono_runtime_invoke + 126
	17  BreakpointIssue                     0x0016d464 mono_runtime_exec_main + 420
	18  BreakpointIssue                     0x00172875 mono_runtime_run_main + 725
	19  BreakpointIssue                     0x00066c55 mono_jit_exec + 149
	20  BreakpointIssue                     0x002107a2 main + 2434
	21  BreakpointIssue                     0x00002af5 start + 53

=================================================================
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 Jeffrey Stedfast 2012-01-13 17:28:18 UTC
Here's the same stack trace as reported by MonoTouch 5.0.4 (slightly different line numbers):


* Assertion at ../../../../../mono/mono/mini/debugger-agent.c:4331, condition `tls->frame_count' not met

Stacktrace:

  at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x0009f, 0xffffffff>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29
  at BreakpointIssue.Application.Main (string[]) [0x00000] in /Users/fejj/Downloads/BreakpointIssue/BreakpointIssue/Main.cs:16
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>

Native stacktrace:

	0   BreakpointIssue                     0x000e1008 mono_handle_native_sigsegv + 408
	1   BreakpointIssue                     0x00152ecd sigabrt_signal_handler + 141
	2   libSystem.B.dylib                   0x96b9a05b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   CoreFoundation                      0x012ab13a __CFRunLoopServiceMachPort + 186
	5   CoreFoundation                      0x0120e580 __CFRunLoopRun + 1312
	6   CoreFoundation                      0x0120ddb4 CFRunLoopRunSpecific + 212
	7   CoreFoundation                      0x0120dccb CFRunLoopRunInMode + 123
	8   GraphicsServices                    0x0489f879 GSEventRunModal + 207
	9   GraphicsServices                    0x0489f93e GSEventRun + 114
	10  UIKit                               0x022a6a9b UIApplicationMain + 1175
	11  ???                                 0x09ffc95d 0x0 + 167758173
	12  ???                                 0x09ffb140 0x0 + 167752000
	13  ???                                 0x09ffae38 0x0 + 167751224
	14  ???                                 0x09ffaf8e 0x0 + 167751566
	15  BreakpointIssue                     0x000119cf mono_jit_runtime_invoke + 1407
	16  BreakpointIssue                     0x0022014a mono_runtime_invoke + 170
	17  BreakpointIssue                     0x00222e81 mono_runtime_exec_main + 705
	18  BreakpointIssue                     0x00222091 mono_runtime_run_main + 929
	19  BreakpointIssue                     0x000ad5bf mono_jit_exec + 239
	20  BreakpointIssue                     0x002f41aa main + 5194
	21  BreakpointIssue                     0x00003035 start + 53
	22  ???                                 0x00000002 0x0 + 2

=================================================================
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 2 Zoltan Varga 2012-01-14 11:56:44 UTC
Should be fixed by 6c6b35c82223805511f0ad6cc3ffd2621ea5d40b on mobile-master. Could you try it out ?
Comment 3 Jeffrey Stedfast 2012-01-16 13:46:46 UTC
Yes, this seems to have fixed the crash.

Reassigning to MonoTouch so they can pull in this fix for whatever versions they want.