Bug 6537 - Application crachs on startup on iPad 4.2.1 + Monotouch 5.3.5 with --noregistrar options
Summary: Application crachs on startup on iPad 4.2.1 + Monotouch 5.3.5 with --noregist...
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 5.3.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-08-15 08:19 UTC by Alex Anikin
Modified: 2013-12-05 18:35 UTC (History)
2 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 NORESPONSE

Description Alex Anikin 2012-08-15 08:19:00 UTC
Hi 

Application crachs on startup on iPad 4.2.1 + Monotouch 5.3.5 with --noregistrar options without any visible reasons in logs.
It's ok on iPad 5.1
Comment 1 Alex Anikin 2012-08-30 04:50:58 UTC
Where can i find information what exactly --noregistrar do?
Comment 2 Rolf Bjarne Kvinge [MSFT] 2012-09-03 07:03:01 UTC
I'll need a bit more information about this in order to track it down, can you provide the crash report and console output (see here how to get it: http://rolfkvinge.blogspot.com.es/2012/04/native-crashes-in-monotouch.html)?
Comment 3 Alex Anikin 2012-09-03 12:14:08 UTC
I have strange situation:
1. On 4.2.1 only - I got
System.InvalidCastException: Cannot cast from source type to destination type.
  at MonoTouch.UIKit.UIDevice.get_CurrentDevice () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIDevice.g.cs:129
  at MonoTouch.Foundation.NSFileManager..cctor () [0x002ef] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSFileManager.cs:32

 at var manager = new NSFileManager();
Adding file protetion.

2. We used this build options by default:
--noregistrar -aot "nimt-trampolines=512" -aot "ntrampolines=2048"  -aot "nrgctx-trampolines=2048" 

Initially was working with -aot "nimt-trampolines=512" only.

On 4.2.1 - working without  --noregistrar only. 
With this flag - application can't start - just black screen. Other devices works well.

Console:
Mon Sep  3 20:16:07 unknown kernel[0] <Debug>: launchd[12597] Builtin profile: container (sandbox)
Mon Sep  3 20:16:07 unknown kernel[0] <Debug>: launchd[12597] Container: /private/var/mobile/Applications/D2FFB458-88D5-431E-9D73-43767EC32070 [69] (sandbox)
> 
Mon Sep  3 20:16:09 unknown OS33Drive[12597] <Warning>: Could not load 'monotouch' for registration: System.Exception: Wrapper type 'MonoTouch.CoreBluetooth.CBCentralManager' is missing its native ObjectiveC class 'CBCentralManager'.
	  at MonoTouch.ObjCRuntime.Class.Register (System.Type type, System.String name, Boolean is_wrapper) [0x006ad] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Class.cs:358 
	  at MonoTouch.ObjCRuntime.Class.Register (System.Type type) [0x0004f] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Class.cs:191 
	  at MonoTouch.ObjCRuntime.Runtime.RegisterAssembly (System.Reflection.Assembly a) [0x0009f] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Runtime.cs:96 
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:375; Executing SQL command: "PRAGMA journal_mode = OFF"
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:380; SQLiteCache: Query "PRAGMA journal_mode = OFF", result rows count: 0
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:387; Executing SQL command: "select sum("ContentLength") from "FileManagerCacheData""
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:400; SQLiteCache: Query "select sum("ContentLength") from "FileManagerCacheData"", result: 24868902
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:424; Executing SQL command: "PRAGMA journal_mode = OFF"
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:428; SQLiteCache: Query "PRAGMA journal_mode = OFF", result rows count: 0
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:442; Executing SQL command: "select "Name", "Value" from "SettingCacheData" where Name = ? limit 1"
	Parameter 0: "CacheSize" of type String
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:470; SQLiteCache: Query "select "Name", "Value" from "SettingCacheData" where Name = ? limit 1", result rows count: 1
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:493; Executing SQL command: "PRAGMA journal_mode = OFF"
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:496; SQLiteCache: Query "PRAGMA journal_mode = OFF", result rows count: 0
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Warning: Libinfo call to mDNSResponder on main thread
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:562; Executing SQL command: "select "Name", "Value" from "SettingCacheData" where Name = ? limit 1"
	Parameter 0: "LastRunAppDate" of type String
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:566; SQLiteCache: Query "select "Name", "Value" from "SettingCacheData" where Name = ? limit 1", result rows count: 1
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:576; Executing SQL command: "select "Name", "Value" from "SettingCacheData" where Name = ? limit 1"
	Parameter 0: "EraseForDays" of type String
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:579; SQLiteCache: Query "select "Name", "Value" from "SettingCacheData" where Name = ? limit 1", result rows count: 0
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:586; Executing SQL command: "select "Name" from "SettingCacheData" where Name = ? limit 1"
	Parameter 0: "LastRunAppDate" of type String
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:590; SQLiteCache: Query "select "Name" from "SettingCacheData" where Name = ? limit 1", result rows count: 1
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:602; Executing SQL command: "update "SettingCacheData" set "Value" = ? where Name = ?"
	Parameter 0: "03.09.2012 16:16:10" of type String
	Parameter 1: "LastRunAppDate" of type String
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:607; SQLiteCache: Query "update "SettingCacheData" set "Value" = ? where Name = ?", result rows count: 1
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Warning: Libinfo call to mDNSResponder on main thread
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:630; Executing SQL command: "select "Name", "Value" from "SettingCacheData" where Name = ? limit 1"
	Parameter 0: "KeepMeLoggedIn" of type String
Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Thread:1; 16:16:10:632; SQLiteCache: Query "select "Name", "Value" from "SettingCacheData" where Name = ? limit 1", result rows count: 0
!!!!!!!!!!!!!!!!! - here we should show main app screen, but nothing...

Mon Sep  3 20:16:10 unknown OS33Drive[12597] <Warning>: Warning: Libinfo call to mDNSResponder on main thread
> 
Mon Sep  3 20:16:17 unknown lockdownd[16] <Error>: 2ff66000 handle_connection: Could not receive USB message #6 from iTunes. Killing connection
Mon Sep  3 20:16:17 unknown com.apple.mobile.lockdown[16] <Notice>: Could not receive size of message

And no crashes for now, sorry for inconvenience.
Comment 4 Alex Anikin 2012-09-03 12:16:58 UTC
To point 1.
 My last crashes was with --noregistrar and with line  var manager = new NSFileManager();

Now - just black screen.
Comment 5 Alex Anikin 2012-09-03 16:14:01 UTC
Found this:
SecRecord rec = new SecRecord(SecKind.GenericPassword);
App stop on black screen on this line and nothing in console and application output.
Comment 6 Rolf Bjarne Kvinge [MSFT] 2012-09-04 19:02:05 UTC
It looks like you're using bluetooth types, which was added in iOS 5.

Can you try linking all assemblies (right click your project, Options, iPhone Build, Linker Behavior: Link all assemblies)? If that doesn't work, could you share your project with us somehow?
Comment 7 PJ 2013-11-19 17:05:18 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 8 PJ 2013-12-05 18:35:38 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.