Bug 29618 - SIGSEGV within Masonry Binding[GCHandle value belongs to a different domain]
Summary: SIGSEGV within Masonry Binding[GCHandle value belongs to a different domain]
Status: RESOLVED DUPLICATE of bug 15260
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 8.10
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Alex Soto [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-04-30 14:43 UTC by Jon Douglas [MSFT]
Modified: 2015-05-08 06:47 UTC (History)
4 users (show)

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


Attachments
Masonry Binding with Sample (5.83 MB, application/x-zip-compressed)
2015-04-30 14:43 UTC, Jon Douglas [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 DUPLICATE of bug 15260

Description Jon Douglas [MSFT] 2015-04-30 14:43:12 UTC
Created attachment 10992 [details]
Masonry Binding with Sample

*Description - Attempting to bind "Masonry(https://github.com/SnapKit/Masonry)" with a small sample snippet to test out the binding, I'm running into a SIGSEGV. This brings up the question of if we support properties being blocks?

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            UIView sv = new UIView();
            sv.BackgroundColor = UIColor.Black;
            View.AddSubview(sv);
         
            sv.Mas_makeConstraints(make =>
                {
                    make.Center.Equals(View);
                    make.Size.EqualTo(NSObject.FromObject(new CGSize(300, 300)));
                });
            // Perform any additional setup after loading the view, typically from a nib.
        }

2015-04-30 09:55:26.248 MasonyDemo[2139:6015448] -[UIView mas_makeConstraints:]: unrecognized selector sent to instance 0x17d9f6d0
2015-04-30 09:55:26.254 MasonyDemo[2139:6015448] critical: Stacktrace:

2015-04-30 09:55:26.255 MasonyDemo[2139:6015448] critical: 
Native stacktrace:

2015-04-30 09:55:26.467 MasonyDemo[2139:6015448] critical: 	0   MasonyDemo                          0x002191e7 mono_handle_native_sigsegv + 238
2015-04-30 09:55:26.468 MasonyDemo[2139:6015448] critical: 	1   MasonyDemo                          0x00221175 mono_sigsegv_signal_handler + 212
2015-04-30 09:55:26.470 MasonyDemo[2139:6015448] critical: 	2   libsystem_platform.dylib            0x3455b0a3 _sigtramp + 42
2015-04-30 09:55:26.471 MasonyDemo[2139:6015448] critical: 	3   ???                                 0x00000018 0x0 + 24
2015-04-30 09:55:26.472 MasonyDemo[2139:6015448] critical: 	4   MasonyDemo                          0x002187b7 mono_handle_exception_internal + 1802
2015-04-30 09:55:26.472 MasonyDemo[2139:6015448] critical: 	5   MasonyDemo                          0x002180a7 mono_handle_exception + 30
2015-04-30 09:55:26.473 MasonyDemo[2139:6015448] critical: 	6   MasonyDemo                          0x0021245b mono_arm_throw_exception + 110
2015-04-30 09:55:26.474 MasonyDemo[2139:6015448] critical: 	7   MasonyDemo                          0x001bad94 throw_exception + 64
2015-04-30 09:55:26.475 MasonyDemo[2139:6015448] critical: 	8   MasonyDemo                          0x0002aae0 ObjCRuntime_Runtime_throw_ns_exception_intptr + 28
2015-04-30 09:55:26.476 MasonyDemo[2139:6015448] critical: 	9   MasonyDemo                          0x0006c5b0 wrapper_native_to_managed_ObjCRuntime_Runtime_throw_ns_exception_intptr + 72
2015-04-30 09:55:26.477 MasonyDemo[2139:6015448] critical: 	10  MasonyDemo                          0x002b3ed4 xamarin_throw_ns_exception + 52
2015-04-30 09:55:26.478 MasonyDemo[2139:6015448] critical: 	11  MasonyDemo                          0x002b5c80 exception_handler + 224
2015-04-30 09:55:26.479 MasonyDemo[2139:6015448] critical: 	12  CoreFoundation                      0x2628b8d9 <redacted> + 632
2015-04-30 09:55:26.480 MasonyDemo[2139:6015448] critical: 	13  libobjc.A.dylib                     0x33e71eff <redacted> + 174
2015-04-30 09:55:26.480 MasonyDemo[2139:6015448] critical: 	14  libc++abi.dylib                     0x33694def <redacted> + 78
2015-04-30 09:55:26.481 MasonyDemo[2139:6015448] critical: 	15  libc++abi.dylib                     0x336948b9 __cxa_increment_exception_refcount + 0
2015-04-30 09:55:26.482 MasonyDemo[2139:6015448] critical: 	16  libobjc.A.dylib                     0x33e71dbf objc_exception_rethrow + 42
2015-04-30 09:55:26.483 MasonyDemo[2139:6015448] critical: 	17  CoreFoundation                      0x2619cbed CFRunLoopRunSpecific + 632
2015-04-30 09:55:26.484 MasonyDemo[2139:6015448] critical: 	18  CoreFoundation                      0x2619c963 CFRunLoopRunInMode + 106
2015-04-30 09:55:26.485 MasonyDemo[2139:6015448] critical: 	19  UIKit                               0x297f3b8f <redacted> + 558
2015-04-30 09:55:26.486 MasonyDemo[2139:6015448] critical: 	20  UIKit                               0x297eec91 UIApplicationMain + 1440
2015-04-30 09:55:26.486 MasonyDemo[2139:6015448] critical: 	21  MasonyDemo                          0x0006c238 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 272
2015-04-30 09:55:26.488 MasonyDemo[2139:6015448] critical: 	22  MasonyDemo                          0x00048edc UIKit_UIApplication_Main_string___intptr_intptr + 52
2015-04-30 09:55:26.488 MasonyDemo[2139:6015448] critical: 	23  MasonyDemo                          0x00048e9c UIKit_UIApplication_Main_string___string_string + 204
2015-04-30 09:55:26.489 MasonyDemo[2139:6015448] critical: 	24  MasonyDemo                          0x00026130 MasonyDemo_Application_Main_string__ + 172
2015-04-30 09:55:26.490 MasonyDemo[2139:6015448] critical: 	25  MasonyDemo                          0x00192c98 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 224
2015-04-30 09:55:26.491 MasonyDemo[2139:6015448] critical: 	26  MasonyDemo                          0x00223567 mono_jit_runtime_invoke + 1190
2015-04-30 09:55:26.492 MasonyDemo[2139:6015448] critical: 	27  MasonyDemo                          0x0025fc55 mono_runtime_invoke + 88
2015-04-30 09:55:26.493 MasonyDemo[2139:6015448] critical: 	28  MasonyDemo                          0x002630f7 mono_runtime_exec_main + 282
2015-04-30 09:55:26.494 MasonyDemo[2139:6015448] critical: 	29  MasonyDemo                          0x00262f39 mono_runtime_run_main + 476
2015-04-30 09:55:26.495 MasonyDemo[2139:6015448] critical: 	30  MasonyDemo                          0x00212261 mono_jit_exec + 48
2015-04-30 09:55:26.495 MasonyDemo[2139:6015448] critical: 	31  MasonyDemo                          0x002b2fbc xamarin_main + 2184
2015-04-30 09:55:26.496 MasonyDemo[2139:6015448] critical: 	32  MasonyDemo                          0x001efde5 main + 112
2015-04-30 09:55:26.497 MasonyDemo[2139:6015448] critical: 	33  libdyld.dylib                       0x3441aaaf <redacted> + 2
2015-04-30 09:55:26.498 MasonyDemo[2139:6015448] critical: 
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

*Reproduction Steps

#1 - Download the repo

#2 - Deploy Application to Device

#3 - Should throw a SIGSEGV like shown above. 

Tested on Simulator running iOS 8.3 and Physical iPod Touch - iOS 8.2

*Version Information

=== Xamarin Studio ===

Version 5.9 (build 431)
Installation UUID: 9091fd92-0b4a-4688-960c-73bfd6f1a240
Runtime:
	Mono 4.0.0 ((detached/d136b79)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000143

=== Apple Developer Tools ===

Xcode 6.3.1 (7703)
Build 6D1002

=== Xamarin.iOS ===

Version: 8.10.0.267 (Business Edition)
Hash: 6481535
Branch: master
Build date: 2015-04-27 04:38:13-0400

=== Xamarin.Mac ===

Version: 2.0.0.262 (Business Edition)

=== Xamarin.Android ===

Version: 5.1.0.115 (Business Edition)
Android SDK: /Users/jonathandouglas/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Build Information ===

Release ID: 509000431
Git revision: 7560726734fc7267de2fa9abed2509968deefaa8
Build date: 2015-04-17 19:25:48-04
Xamarin addins: 2e772c734ab3148054eae7bf8949f340fdeb5e5e

=== Operating System ===

Mac OS X 10.10.2
Darwin Jonathans-Mac-mini.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Feb 26 19:26:47 PST 2015
    root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-05-01 03:22:33 UTC
@Alex, can you have a look?
Comment 2 Alex Soto [MSFT] 2015-05-06 12:50:29 UTC
Attaching new test case based on the old one fixed a little ApiDefinition and used delegates instead of funcs

https://dl.dropboxusercontent.com/u/2058130/Masonry.zip

@Rolf: There is another small issue, not all delegates are making into SupportDelegates.g.cs, I had to create a separated file (workaround.cs) to include them.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-05-08 06:47:42 UTC

*** This bug has been marked as a duplicate of bug 15260 ***