Bug 42267 - Random crash in introspection tests
Summary: Random crash in introspection tests
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Other ()
Version: Master
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2016-06-30 08:04 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2016-08-09 21:47 UTC (History)
2 users (show)

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


Attachments
crash report (90.16 KB, text/plain)
2016-06-30 08:04 UTC, Rolf Bjarne Kvinge [MSFT]
Details
crash report in NSScrollView ctor (89.87 KB, text/plain)
2016-08-03 07:07 UTC, Rolf Bjarne Kvinge [MSFT]
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 Rolf Bjarne Kvinge [MSFT] 2016-06-30 08:04:48 UTC
Created attachment 16527 [details]
crash report

I've seen this a few times now, but I've not had much luck reproducing locally (I ran the introspection tests ~500 times and it crashed once due to this).

I've also tried varies malloc debugging tools (MallocGuardEdges, MallocScribble), and none trigger.

It always seems to be the DefaultCtorAllowed test that crashes, but the managed type varies.

***** ApiCtorInitTest.DefaultCtorAllowed
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSend (intptr,intptr) <IL 0x0000a, 0x00065>
  at AppKit.NSTableHeaderView..ctor () [0x00024] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/src/build/mac/full/AppKit/NSTableHeaderView.g.cs:71
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0004f, 0x000e0>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) <IL 0x00016, 0x00073>
  at System.Reflection.MonoCMethod.InternalInvoke (object,object[]) [0x00002] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:667
  at System.Reflection.MonoCMethod.DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00089] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:658
  at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:686
  at System.Reflection.ConstructorInfo.Invoke (object[]) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:62
  at Introspection.ApiCtorInitTest.DefaultCtorAllowed () [0x000dc] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/introspection/ApiCtorInitTest.cs:205
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0004f, 0x000e0>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <IL 0x00016, 0x00073>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00038] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:309
  at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:231
  at NUnit.Framework.Internal.Reflect/<InvokeMethod>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/Internal/Reflect.cs:226
  at GuiUnit.InvokerHelper.Invoke () [0x00014] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/InvokerHelper.cs:18
  at Foundation.NSActionDispatcher.Apply () [0x00007] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/src/Foundation/NSAction.cs:57
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x00020, 0x00078>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) AppKit.NSApplication.NSApplicationMain (int,string[]) <IL 0x0005a, 0x0014d>
  at AppKit.NSApplication.Main (string[]) [0x00041] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/src/AppKit/NSApplication.cs:94
  at Xamarin.Mac.Tests.MainClass.Main (string[]) [0x0002e] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:20
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00051, 0x000e0>
Comment 1 Chris Hamons 2016-07-21 21:46:06 UTC
Yeah, I'm having serious trouble reproducing locally as well. I ran DefaultCtorAllowed 100x in a row locally then the full mac introspection tests 100x with no issue.

I'm on 10.11.0.5 not .4 but I don't see how that matters.
Comment 8 Rolf Bjarne Kvinge [MSFT] 2016-08-03 07:07:23 UTC
Created attachment 16873 [details]
crash report in NSScrollView ctor
Comment 9 Rolf Bjarne Kvinge [MSFT] 2016-08-03 07:21:58 UTC
Verbose log for the crash from from comment #8: https://gist.github.com/rolfbjarne/553717832096d4db64a89b23ff8cf61c
Comment 10 Chris Hamons 2016-08-05 20:57:49 UTC
I'm hoping  https://github.com/xamarin/xamarin-macios/pull/565 fixes this.
Comment 11 Chris Hamons 2016-08-09 21:47:01 UTC
I'm thinking it might be fixed. I'll check builds over the next few days.