Bug 51800 - introspection-mac (Classic/Unified/Unified XM45) hitting a native assert
Summary: introspection-mac (Classic/Unified/Unified XM45) hitting a native assert
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Infrastructure (internal) ()
Version: Master
Hardware: PC Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2017-01-26 19:48 UTC by Vincent Dondain [MSFT]
Modified: 2017-01-31 14:46 UTC (History)
5 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description Vincent Dondain [MSFT] 2017-01-26 19:48:14 UTC
Execution log from the tests

***** ApiCtorInitTest.DefaultCtorAllowed
2017-01-26 10:54:26.344 introspection[2543:1639264] *** -[NSKeyedArchiver dealloc]: warning: NSKeyedArchiver deallocated without having had -finishEncoding called on it.
2017-01-26 10:54:28.626 introspection[2543:1639264] *** Assertion failure in -[NSTouch locationInView:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.81.100/AppKit.subproj/NSTouch.m:97
2017-01-26 10:54:28.630 introspection[2543:1639264] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot get locationInView: for this type of NSTouch'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fffc2b32e7b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fffd771ccad objc_exception_throw + 48
	2   CoreFoundation                      0x00007fffc2b37b82 +[NSException raise:format:arguments:] + 98
	3   Foundation                          0x00007fffc4581d50 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
	4   AppKit                              0x00007fffc0fc91f1 -[NSTouch locationInView:] + 163
	5   AppKit                              0x00007fffc0fc9448 -[NSTouch description] + 180
	6   introspection                       0x000000010cd6ebe9 xamarin_dyn_objc_msgSend + 217
	7   ???                                 0x000000011145e6c6 0x0 + 4584761030
	8   ???                                 0x0000000114fc1181 0x0 + 4647031169
	9   introspection                       0x000000010ce63f04 mono_jit_runtime_invoke + 1316
	10  introspection                       0x000000010cf12698 do_runtime_invoke + 88
	11  introspection                       0x000000010cf15ecf mono_runtime_try_invoke_array + 1439
	12  introspection                       0x000000010cebed98 ves_icall_InternalInvoke + 648
	13  ???                                 0x00000001136df904 0x0 + 4620941572
	14  ???                                 0x00000001136df69b 0x0 + 4620940955
	15  ???                                 0x00000001136cfa3a 0x0 + 4620876346
	16  introspection                       0x000000010ce63f04 mono_jit_runtime_invoke + 1316
	17  introspection                       0x000000010cf12698 do_runtime_invoke + 88
	18  introspection                       0x000000010cf125a6 mono_runtime_invoke + 102
	19  introspection                       0x000000010cd6c99d xamarin_invoke_trampoline + 5725
	20  introspection                       0x000000010cd6d71d xamarin_arch_trampoline + 189
	21  introspection                       0x000000010cd6ea61 xamarin_x86_64_common_trampoline + 110
	22  Foundation                          0x00007fffc450c88a __NSThreadPerformPerform + 326
	23  CoreFoundation                      0x00007fffc2ac8981 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	24  CoreFoundation                      0x00007fffc2aa9a7d __CFRunLoopDoSources0 + 557
	25  CoreFoundation                      0x00007fffc2aa8f76 __CFRunLoopRun + 934
	26  CoreFoundation                      0x00007fffc2aa8974 CFRunLoopRunSpecific + 420
	27  HIToolbox                           0x00007fffc2034a5c RunCurrentEventLoopInMode + 240
	28  HIToolbox                           0x00007fffc2034891 ReceiveNextEventCommon + 432
	29  HIToolbox                           0x00007fffc20346c6 _BlockUntilNextEventMatchingListInModeWithFilter + 71
	30  AppKit                              0x00007fffc05da5b4 _DPSNextEvent + 1120
	31  AppKit                              0x00007fffc0d54d6b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2789
	32  AppKit                              0x00007fffc05cef35 -[NSApplication run] + 926
	33  AppKit                              0x00007fffc0599850 NSApplicationMain + 1237
	34  ???                                 0x00000001136ed6ee 0x0 + 4620998382
	35  ???                                 0x00000001136ed274 0x0 + 4620997236
	36  introspection                       0x000000010ce63f04 mono_jit_runtime_invoke + 1316
	37  introspection                       0x000000010cf12698 do_runtime_invoke + 88
	38  introspection                       0x000000010cf14c30 mono_runtime_exec_main + 880
	39  introspection                       0x000000010cf147ff mono_runtime_run_main + 831
	40  introspection                       0x000000010cdc3b04 mono_jit_exec + 244
	41  introspection                       0x000000010cdc5d08 mono_main + 7768
	42  introspection                       0x000000010cd6f374 xamarin_main + 980
	43  introspection                       0x000000010cd70084 main + 36
	44  introspection                       0x000000010cd4f7d4 start + 52
	45  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Comment 8 Sebastien Pouliot 2017-01-27 16:45:35 UTC
-> XM
Comment 11 Sebastien Pouliot 2017-01-31 03:40:59 UTC
4   AppKit                              0x00007fffc0fc91f1 -[NSTouch locationInView:] + 163
5   AppKit                              0x00007fffc0fc9448 -[NSTouch description] + 180

^ the call comes from `description` (5)

In fact the `xcode8.3` branch does not include bindings for `locationInView:` (4)

This is not a unique case and `description` can be disabled, per type, in introspection tests just for this.

-> https://github.com/xamarin/xamarin-macios/pull/1588


In retrospect I think the default .ctor (init) for `NSTouch` should *not* have been provided. I'm not sure enough to disable it - and this would need to be outside `xcode8.3` anyway... @chamons ?
Comment 12 Sebastien Pouliot 2017-01-31 14:46:31 UTC
PR solved the assert - but there's still a failure in classic, tracked in #52065