Bug 14428 - Assertion at ../../../../../mono/mono/mini/debugger-agent.c:5172, condition `sp' not met
Summary: Assertion at ../../../../../mono/mono/mini/debugger-agent.c:5172, condition `...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2013-09-04 11:23 UTC by Marek Safar
Modified: 2016-01-26 21:08 UTC (History)
5 users (show)

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


Attachments
test case on Android (2.37 MB, application/zip)
2016-01-15 10:52 UTC, 999komi
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 GitHub or Developer Community 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 Marek Safar 2013-09-04 11:23:10 UTC
* Assertion at ../../../../../mono/mono/mini/debugger-agent.c:5172, condition `sp' not met

Unable to find seq points for method '(wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)'.
mono-rt: Stacktrace:


mono-rt: 
Native stacktrace:


mono-rt: 	0   AUSoundTriggeredPlayingSoundMemoryBased 0x000b247a mono_handle_native_sigsegv + 266

mono-rt: 	1   AUSoundTriggeredPlayingSoundMemoryBased 0x000bea7d sigabrt_signal_handler + 109

mono-rt: 	2   libsystem_c.dylib                   0x99f6759b _sigtramp + 43

mono-rt: 	3   ???                                 0xffffffff 0x0 + 4294967295

mono-rt: 	4   libsystem_sim_c.dylib               0x0426057b abort + 140

mono-rt: 	5   AUSoundTriggeredPlayingSoundMemoryBased 0x0020943c monoeg_g_logv + 188

mono-rt: 	6   AUSoundTriggeredPlayingSoundMemoryBased 0x0020946b monoeg_assertion_message + 43

mono-rt: 	7   AUSoundTriggeredPlayingSoundMemoryBased 0x00033881 debugger_thread + 30673

mono-rt: 	8   AUSoundTriggeredPlayingSoundMemoryBased 0x001f34ba thread_start_routine + 154

mono-rt: 	9   AUSoundTriggeredPlayingSoundMemoryBased 0x001fe5c1 inner_start_thread + 65

mono-rt: 	10  AUSoundTriggeredPlayingSoundMemoryBased 0x0022000d GC_start_routine + 93

mono-rt: 	11  libsystem_c.dylib                   0x99f0fed9 _pthread_start + 335

mono-rt: 	12  libsystem_c.dylib                   0x99f136de thread_start + 34

mono-rt: 
=================================================================
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.
=================================================================


Step request failed: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
Comment 1 Zoltan Varga 2013-09-04 11:24:01 UTC
How can I reproduce this ?
Comment 2 Marek Safar 2013-09-04 11:26:45 UTC
Download an app from #14412. Set a breakpoint at

AudioUnit::RenderCallbackImpl (IntPtr clientData, ref AudioUnitRenderActionFlags actionFlags, ref AudioTimeStamp timeStamp, uint busNumber, uint numberFrames, IntPtr data)

or run the app in debugger and try to pause (stop it in debugger) it few times
Comment 3 Zoltan Varga 2013-09-16 13:12:50 UTC
I can't reproduce this. Does it happen on the device or the simulator ? On the simulator, the breakpoint is hit multiple times, but it doesn't assert. On the device, the breakpoint is not hit at all.
Comment 4 Joseph Hanna 2013-09-23 12:32:48 UTC
Try leaving it stopped at an instruction for 30 seconds and then step into the next instruction.  I usually trip it up if I am slow to step through because I am evaluating a lot of variables etc...
Comment 5 Paul 2015-09-14 12:29:41 UTC
I have the same issue with my project.

Repro: pause application in debug mode, you will be on UIApplication.Main (args, null, "AppDelegate"); instruction of Main method. Press Step Into -> Crash
Comment 6 Zoltan Varga 2015-09-14 12:41:13 UTC
Could you open a new bug report in the Xamarin.ios category with a testcase if possible ?
Comment 7 999komi 2016-01-15 10:52:58 UTC
Created attachment 14594 [details]
test case on Android

My production project crashes with exactly the described error when I try to handle an exception. When I pulled out the exception handling part into a simple test project, I still see the crash, but with different error messages. The test project is attached. It may have something to do with Xamarin.Insights, which I am not attempting to use. My exception handler used to work; I wonder if Xamarin.Insights is somehow fighting with it.  

When running on my Samsung SPH-L710 from XS on my Macbook Pro (El Capitan), I see the following:  

[OpenGLRenderer] Enabling debug mode 0
[Mono] DllImport attempting to load: '/system/lib/liblog.so'.
[Mono] DllImport loaded library '/system/lib/liblog.so'.
[Mono] DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
[Mono] Searching for '__android_log_print'.
[Mono] Probing '__android_log_print'.
[Mono] Found as '__android_log_print'.
[MonoDroid] UNHANDLED EXCEPTION:
Thread started: <Thread Pool> #4
Thread started: <Thread Pool> #5
[Mono] [0x6786bf08] worker starting
Thread started: <Thread Pool> #6
[MonoDroid] System.Exception: Handle this . . .
[Mono] [0x66790ec8] worker starting
[MonoDroid]   at ExceptionTestApp.MainActivity+<OnCreate>c__AnonStorey0.<>m__0 (System.Object , System.EventArgs ) [0x00036] in /Users/william/Projects/ExceptionTestApp/MainActivity.cs:24 
[MonoDroid]   at Android.Views.View+IOnClickListenerImplementor.OnClick (Android.Views.View v) [0x0000d] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.View.cs:1780 
[MonoDroid]   at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (IntPtr jnienv, IntPtr native__this, IntPtr native_v) [0x00011] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.View.cs:1745 
[MonoDroid]   at (wrapper dynamic-method) System.Object:f9576762-a0ae-413d-b285-ea28b9b983b4 (intptr,intptr,intptr)
[Mono] [0x66790ec8] hill climbing, change max number of threads 2
[AAA] Exception handled
[Mono] DllImport attempting to load: '/system/lib/libc.so'.
[Mono] DllImport loaded library '/system/lib/libc.so'.
[Mono] DllImport searching in: '/system/lib/libc.so' ('/system/lib/libc.so').
[Mono] Searching for 'gettid'.
[Mono] Probing 'gettid'.
[Mono] Found as 'gettid'.
[Mono] Assembly Loader probing location: '/storage/emulated/0/Android/data/com.companyname.exceptiontestapp/files/.__override__/System.Net.Http.dll'.
[Mono] Image addref System.Net.Http[0x6665e260] -> /storage/emulated/0/Android/data/com.companyname.exceptiontestapp/files/.__override__/System.Net.Http.dll[0x678e3178]: 2
[Mono] Assembly System.Net.Http[0x6665e260] added to domain RootDomain, ref_count=1
[Mono] AOT module '/storage/emulated/0/Android/data/com.companyname.exceptiontestapp/files/.__override__/System.Net.Http.dll.so' not found: dlopen failed: library "/data/app-lib/com.companyname.exceptiontestapp-1/libaot-System.Net.Http.dll.so" not found
[Mono] AOT module '/Users/builder/data/lanes/2098/3efa14c4/source/monodroid/builds/install/mono-armv7/lib/mono/aot-cache/arm/System.Net.Http.dll.so' not found: dlopen failed: library "/data/app-lib/com.companyname.exceptiontestapp-1/libaot-System.Net.Http.dll.so" not found
[Mono] Assembly Loader loaded assembly from location: '/storage/emulated/0/Android/data/com.companyname.exceptiontestapp/files/.__override__/System.Net.Http.dll'.
[Mono] Config attempting to parse: '/storage/emulated/0/Android/data/com.companyname.exceptiontestapp/files/.__override__/System.Net.Http.dll.config'.
[Mono] Config attempting to parse: '/Users/builder/data/lanes/2098/3efa14c4/source/monodroid/builds/install/mono-armv7/etc/mono/assemblies/System.Net.Http/System.Net.Http.config'.
[Mono] Assembly Ref addref Xamarin.Insights[0x62ffbd10] -> System.Net.Http[0x6665e260]: 2
[Mono] Assembly Ref addref System.Net.Http[0x6665e260] -> mscorlib[0x5bc1ae90]: 8
[Mono] Assembly Ref addref System.Net.Http[0x6665e260] -> System[0x660a58f0]: 4
Loaded assembly: /storage/emulated/0/Android/data/com.companyname.exceptiontestapp/files/.__override__/System.Net.Http.dll [External]
[Xamarin.Insights] Warning: Unhandled exception: System.Exception: Handle this . . .
[Xamarin.Insights]   at (wrapper dynamic-method) System.Object:f9576762-a0ae-413d-b285-ea28b9b983b4 (intptr,intptr,intptr)
[Xamarin.Insights]   at (wrapper native-to-managed) System.Object:f9576762-a0ae-413d-b285-ea28b9b983b4 (intptr,intptr,intptr)
[Mono] Assembly Ref addref System.Net.Http[0x6665e260] -> System.Core[0x65d87860]: 4
[Mono] Assembly Ref addref Mono.Android[0x62ffecd0] -> System[0x660a58f0]: 5
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Handle this . . .
[mono-rt]   at (wrapper dynamic-method) System.Object:f9576762-a0ae-413d-b285-ea28b9b983b4 (intptr,intptr,intptr)
[mono-rt]   at (wrapper native-to-managed) System.Object:f9576762-a0ae-413d-b285-ea28b9b983b4 (intptr,intptr,intptr)
Comment 8 Zoltan Varga 2016-01-26 21:08:06 UTC
Should be fixed by mono a3c7b1967934a623a416ef24d526d816dd46e248.