Bug 9261 - Instantiation of inherited class from UIWebView crash an application on iOS 5.0 device
Summary: Instantiation of inherited class from UIWebView crash an application on iOS 5...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- major
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
: 9483 ()
Depends on:
Blocks:
 
Reported: 2013-01-04 06:26 UTC by Seifer
Modified: 2013-01-14 06:48 UTC (History)
4 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 Seifer 2013-01-04 06:26:00 UTC
Monotouch version: 6.0.8
iOS SDK version: 6.0
Device: iPhone 3GS iOS 5.0

Simulator works fine.
Previous Monotouch version works fine.

Steps to reproduce:
1. Inherit class from UIWebView
2. Instantiate
Crash


Stacktrace:

  at MonoTouch.Foundation.NSObject.CreateManagedRef (bool) [0x0001c] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:184
  at MonoTouch.Foundation.NSObject.InitializeObject (bool) [0x00063] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:143
  at MonoTouch.Foundation.NSObject..ctor (MonoTouch.Foundation.NSObjectFlag) [0x0000d] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:61
  at MonoTouch.UIKit.UIResponder..ctor (MonoTouch.Foundation.NSObjectFlag) <IL 0x00002, 0x00023>
  at MonoTouch.UIKit.UIView..ctor (MonoTouch.Foundation.NSObjectFlag) <0x00023>
  at MonoTouch.UIKit.UIWebView..ctor () <IL 0x00001, 0x0002b>
  at CrashTest3.AppDelegate/MyWebView..ctor () <IL 0x00001, 0x0007f>
  at CrashTest3.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication,MonoTouch.Foundation.NSDictionary) [0x00016] in /Users/MacBook/Projects/Playgrounds/MonoTouch.Playground/CrashTest3/AppDelegate.cs:34
  at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
  at CrashTest3.Application.Main (string[]) [0x00001] in /Users/MacBook/Projects/Playgrounds/MonoTouch.Playground/CrashTest3/Main.cs:17
  at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	0   CrashTest3                          0x003628dd mono_handle_native_sigsegv + 244
	1   CrashTest3                          0x0032a13d mono_sigsegv_signal_handler + 172
	2   libsystem_c.dylib                   0x355407ed _sigtramp + 48
	3   CrashTest3                          0x003d88a4 monotouch_create_gchandle + 60
	4   CrashTest3                          0x003d8c20 monotouch_create_managed_ref + 104
	5   CrashTest3                          0x0001f180 wrapper_managed_to_native_MonoTouch_Foundation_NSObject_monotouch_create_managed_ref_intptr_intptr_bool + 96
	6   CrashTest3                          0x00006f38 MonoTouch_Foundation_NSObject_InitializeObject_bool + 236
	7   CrashTest3                          0x00006b94 MonoTouch_Foundation_NSObject__ctor_MonoTouch_Foundation_NSObjectFlag + 44
	8   CrashTest3                          0x0000ed6c MonoTouch_UIKit_UIResponder__ctor_MonoTouch_Foundation_NSObjectFlag + 36
	9   CrashTest3                          0x0000f484 MonoTouch_UIKit_UIView__ctor_MonoTouch_Foundation_NSObjectFlag + 36
	10  CrashTest3                          0x0000fb78 MonoTouch_UIKit_UIWebView__ctor + 44
	11  CrashTest3                          0x00326574 CrashTest3_AppDelegate_MyWebView__ctor + 128
	12  CrashTest3                          0x00326318 CrashTest3_AppDelegate_FinishedLaunching_MonoTouch_UIKit_UIApplication_MonoTouch_Foundation_NSDictionary + 344
	13  CrashTest3                          0x001d791c wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
	14  CrashTest3                          0x0032b713 mono_jit_runtime_invoke + 1054
	15  CrashTest3                          0x00386823 mono_runtime_invoke + 90
	16  CrashTest3                          0x00326f75 native_to_managed_trampoline_CrashTest3_AppDelegate_FinishedLaunching + 256
	17  UIKit                               0x30b14cab -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1182
	18  UIKit                               0x30b0e7dd -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 408
	19  UIKit                               0x30adcac3 -[UIApplication handleEvent:withNewEvent:] + 1010
	20  UIKit                               0x30adc567 -[UIApplication sendEvent:] + 54
	21  UIKit                               0x30adbf3b _UIApplicationHandleEvent + 5826
	22  GraphicsServices                    0x3342222b PurpleEventCallback + 882
	23  CoreFoundation                      0x31425523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
	24  CoreFoundation                      0x314254c5 __CFRunLoopDoSource1 + 140
	25  CoreFoundation                      0x31424313 __CFRunLoopRun + 1370
	26  CoreFoundation                      0x313a74a5 CFRunLoopRunSpecific + 300
	27  CoreFoundation                      0x313a736d CFRunLoopRunInMode + 104
	28  UIKit                               0x30b0d86b -[UIApplication _run] + 550
	29  UIKit                               0x30b0acd5 UIApplicationMain + 1080
	30  CrashTest3                          0x000206a0 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 240
	31  CrashTest3                          0x003260ac CrashTest3_Application_Main_string__ + 188
	32  CrashTest3                          0x001d791c wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
	33  CrashTest3                          0x0032b713 mono_jit_runtime_invoke + 1054
	34  CrashTest3                          0x00386823 mono_runtime_invoke + 90
	35  CrashTest3                          0x00389307 mono_runtime_exec_main + 306
	36  CrashTest3                          0x0038c58b mono_runtime_run_main + 482
	37  CrashTest3                          0x0033d933 mono_jit_exec + 94
	38  CrashTest3                          0x003c78c4 main + 2236
	39  CrashTest3                          0x00002028 start + 40

=================================================================
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.
=================================================================
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-01-04 08:12:35 UTC
I can reproduce this.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2013-01-04 13:57:52 UTC
Fixed.

The next release with the fix will be 6.0.9.

master: b83688cbcd65564f7dee6bd05fe55ebf3b1e9f29
ios6: 997efdd8073569694beb8cca5e57ff8b1178982c
Comment 3 Alex Anikin 2013-01-14 05:54:10 UTC
When 6.0.9 will come?
Comment 4 Rolf Bjarne Kvinge [MSFT] 2013-01-14 06:34:19 UTC
It has not been determined yet, but historically there tends to be 2-3 weeks between releases.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2013-01-14 06:48:39 UTC
*** Bug 9483 has been marked as a duplicate of this bug. ***