Bug 30863 - Crash in ObjCRuntime.Class.IsCustomType when using F# on the phone
Summary: Crash in ObjCRuntime.Class.IsCustomType when using F# on the phone
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 8.10
Hardware: Macintosh Mac OS
: Normal blocker
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-06-05 22:00 UTC by Frank A. Krueger
Modified: 2016-01-14 18:50 UTC (History)
3 users (show)

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


Attachments
Project that repros the bug (18.77 KB, application/zip)
2015-06-05 22:00 UTC, Frank A. Krueger
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 NORESPONSE

Description Frank A. Krueger 2015-06-05 22:00:07 UTC
Created attachment 11488 [details]
Project that repros the bug

Scary crazy error when running on the phone but works fine on the simulator.

Repro:

1. Open the attached project and try to run on an iPhone. Should crash immediately with:

Found new TLS offset at 224
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
warning: Ignoring invocation of an instance method on a NULL instance.

Unhandled Exception:
Nested exception detected.
Original Exception: at ObjCRuntime.Class.IsCustomType (System.Type) [0x00000] in /Users/builder/data/lanes/1503/e6ebd18b/source/maccore/src/ObjCRuntime/Class.cs:157
at ObjCRuntime.Class.Register (System.Type) <0x00017>
at ObjCRuntime.Class.Lookup (intptr,bool) <0x00017>
at ObjCRuntime.Runtime.GetBlockWrapperCreator (System.Reflection.MethodInfo,int) <0x00013>
at ObjCRuntime.Runtime.Initialize (ObjCRuntime.Runtime/InitializationOptions&) <0x00013>

Nested exception:at System.MonoType.GetGenericArguments () <0x0001b>
at System.Exception.get_Message () [0x0000b] in /Users/builder/data/lanes/1503/e6ebd18b/source/mono/mcs/class/corlib/System/Exception.cs:154
at System.Exception.ToString () [0x0000c] in /Users/builder/data/lanes/1503/e6ebd18b/source/mono/mcs/class/corlib/System/Exception.cs:317
Jun  5 18:50:17 Precious-XV Rough.iOS[325] <Warning>: Unhandled managed exception:
(null) (System.NullReferenceException)
(null)

Stacktrace:
	0   Rough.iOS                           0x0000000100da4630 mono_handle_native_sigsegv + 264
	1   libsystem_platform.dylib            0x0000000194c9c95c _sigtramp + 68
	2   libsystem_pthread.dylib             0x0000000194ca5170 pthread_kill + 112
	3   libsystem_c.dylib                   0x0000000194b7eb18 abort + 112
	4   Rough.iOS                           0x0000000100e71338 print_exception + 0
	5   Rough.iOS                           0x0000000100da4cb0 mono_invoke_unhandled_exception_hook + 96
	6   Rough.iOS                           0x0000000100da4440 mono_handle_exception_internal + 4408
	7   Rough.iOS                           0x0000000100da32fc mono_handle_exception + 40
	8   Rough.iOS                           0x0000000100d9d508 handle_signal_exception + 64
	9   Rough.iOS                           0x0000000100388d38 ObjCRuntime_Class_Lookup_intptr + 24
	10  Rough.iOS                           0x0000000100388d38 ObjCRuntime_Class_Lookup_intptr + 24
	11  Rough.iOS                           0x0000000100388cd8 ObjCRuntime_Class_LookupFullName_intptr + 24
	12  Rough.iOS                           0x0000000100382204 ObjCRuntime_Runtime_LookupManagedTypeName_intptr + 20
	13  Rough.iOS                           0x00000001003804e4 ObjCRuntime_Runtime_lookup_managed_type_name_intptr + 20
	14  Rough.iOS                           0x000000010030b0c4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 180
	15  Rough.iOS                           0x0000000100db0bd0 mono_jit_runtime_invoke + 1260
	16  Rough.iOS                           0x0000000100e02e6c mono_runtime_invoke + 128
	17  Rough.iOS                           0x0000000100e717c0 xamarin_initialize + 760
	18  Rough.iOS                           0x0000000100e6f29c xamarin_main + 1692
	19  Rough.iOS                           0x0000000100d78224 main + 96
	20  libdyld.dylib                       0x0000000194aeea08 <redacted> + 4


=== Xamarin Studio ===

Version 5.9.3 (build 1)
Installation UUID: e51e2705-c52a-4ae8-aa07-c481d6ab8a7a
Runtime:
	Mono 4.0.1 ((detached/ed1d3ec)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010044

=== Apple Developer Tools ===

Xcode 6.3.1 (7703)
Build 6D1002

=== Xamarin.iOS ===

Version: 8.10.1.64 (Enterprise Edition)
Hash: e6ebd18
Branch: master
Build date: 2015-05-21 21:55:09-0400

=== Xamarin.Android ===

Version: 5.1.3.1 (Enterprise Edition)
Android SDK: /Users/fak/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

=== Xamarin Android Player ===

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

=== Xamarin.Mac ===

Version: 2.0.1.64 (Enterprise Edition)

=== Build Information ===

Release ID: 509030001
Git revision: 5a524e1726ed103fdd4fe37e0356f2b35466ce9d
Build date: 2015-06-02 16:35:08-04
Xamarin addins: 51957cfbd06be911b212671ad05c2c6221ac90f9

=== Operating System ===

Mac OS X 10.10.3
Darwin lepton.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 1 Parmendra Kumar 2015-06-08 10:20:19 UTC
I have checked this issue and observed that the attached sample app working fine with simulator and getting exception on iPhone device.

Screencast: http://www.screencast.com/t/LI9dX6yVpvJ

Device Log: https://gist.github.com/Parmendrak/e488635a06ed14e1833b
ApplicationOutput: https://gist.github.com/Parmendrak/5047ff671aed1abb4b19
Buildoutput:https://gist.github.com/Parmendrak/a9a375a28e17a9745a67

Environment info:

=== Xamarin Studio ===

Version 5.9.4 (build 3)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Runtime:
	Mono 4.0.2 ((detached/198235d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020004

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.Mac ===

Version: 2.0.2.16 (Enterprise Edition)

=== Xamarin.iOS ===

Version: 8.10.2.16 (Enterprise Edition)
Hash: b2ebbc0
Branch: master
Build date: 2015-06-06 01:13:21-0400

=== Xamarin.Android ===

Version: 5.1.4.8 (Enterprise Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

=== Xamarin Android Player ===

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

=== Build Information ===

Release ID: 509040003
Git revision: 71a8c576686882a0ad224f735d9f04a6c08119c8
Build date: 2015-06-04 02:45:11-04
Xamarin addins: 456e0954631a1a80bc90389e99c6d16cd8f09ad3

=== Operating System ===

Mac OS X 10.9.4
Darwin ShrutiMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 2 Rolf Bjarne Kvinge [MSFT] 2015-07-31 13:44:22 UTC
@Frank, I can't reproduce this bug with the exact same XI version. Can you attach a crash report (which will also tell me exactly which device you used)?
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-11-11 08:46:12 UTC
@Frank, is this still a problem?
Comment 4 Rolf Bjarne Kvinge [MSFT] 2016-01-14 18:50:19 UTC
Closing.