Bug 23501 - Forms app crashes on iOS device in Release configuration using DependencyService for SQLite
Summary: Forms app crashes on iOS device in Release configuration using DependencyServ...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-09-30 14:40 UTC by Jon Goldberger [MSFT]
Modified: 2016-03-18 08:16 UTC (History)
5 users (show)

Tags: AC
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 NOT_REPRODUCIBLE

Description Jon Goldberger [MSFT] 2014-09-30 14:40:37 UTC
## Description

App crashes in Release configuration deploying to iOS Device, for both iOS 7.1 (iPhone 4) and iOS 8 (iPhone 5s). Switching to Debug or enabling debugging in Release configuration avoids the crash. 

## Steps to reproduce

1. Open privately attached test project SmartParat copy 3
2. Restore packages.
3. Deploy to an iOS device

## Expected result 

Initial (blank) page will be displayed, app does not crash.

## Actual result

App crashes after launch image is displayed, but before the initial (blank) page is shown.


## Notes

As noted above, enabling debugging for iOS project in Release or using Debug configuration app does not crash. I made a version of the test project that removes iPageManager interface and the Forms App singleton, SmartParatCopy 3-Refactored, and this works on devices without crashing in release configuration.


## Description from case:

I have a simple app using SQLite exactly as outlined in the Working with..
Local databases guide on the Xamarin site. (
http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/databases/
)

My problem is that my app crashes in *release mode* on executing this line:

database = DependencyService.Get<ISQLite> ().GetConnection ();

Everything works in Debug mode, and it also works in release mode if I "*enable
debugging*" under iOS Build/Debugging Options. Changing Linker behaviour
have no effect. (I have tried all).

Putting this in my AppDelegate.cs also works fine:

var x = new SQLite_iOS ();
x.GetConnection ();

I have double checked and I don't do anything else than described in the
before mentioned guide. I have commented out all other code in my app to
isolate the problem.

-------------------------------------

There is nothing in the "application output" window except:

Please ensure your device is connected...
Connected to: Martin's iPad
Launching
/private/var/mobile/Applications/62CA324F-A9E3-4A55-A76A-EE4C7F8638BB/SmartParatiOS.app

I have a few warnings - but only because I name an element "figur2" in the
xaml with x:Name and refer that from another element (using:
ConstraintExpression Type=RelativeToView, ElementName=figur2) That produces
some warnings when compiling:

/Users/amor/code/OKMonkey/SmartParat/SmartParat/Pages/QuestionPage.xaml(23,23):
Warning: The private field `SmartParat.QuestionResultPage.figur2' is
assigned but its value is never used (SmartParat)

I just tried launching again to produce the crash and this is the
additional info to the log in the XS log directory:

INFO [2014-09-18 22:18:19Z]: Found PCLv2 assembly.
INFO [2014-09-18 22:18:19Z]:
/Library/Frameworks/Mono.framework/Versions/3.8.0/bin/mcs
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/mscorlib.dll"
-nostdlib
"/out:/Users/amor/code/OKMonkey/SmartParat/iOS/bin/iPhone/Release/SmartParatiOS.exe"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/System.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/System.Xml.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/System.Core.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/monotouch.dll"
"/r:/Users/amor/code/OKMonkey/SmartParat/packages/SQLite.Net-PCL.2.3.0/lib/portable-net4+sl5+netcore45+wp8+MonoAndroid1+MonoTouch1/SQLite.Net.dll"
"/r:/Users/amor/code/OKMonkey/SmartParat/packages/SQLite.Net.Platform.XamarinIOS.2.3.0/lib/monotouch/SQLite.Net.Platform.XamarinIOS.dll"
"/r:/Users/amor/code/OKMonkey/SmartParat/packages/ExifLib.PCL.1.0.0/lib/portable-net45+sl50+win+WindowsPhoneApp81+wp80+MonoAndroid10+MonoTouch10/ExifLib.dll"
"/r:/Users/amor/code/OKMonkey/SmartParat/packages/Xamarin.Forms.Labs.1.1.0/lib/MonoTouch/Xamarin.Forms.Labs.iOS.dll"
"/r:/Users/amor/code/OKMonkey/SmartParat/packages/Xamarin.Forms.Labs.1.1.0/lib/MonoTouch/Xamarin.Forms.Labs.dll"
"/r:/Users/amor/code/OKMonkey/SmartParat/packages/Xamarin.Forms.1.2.2.6243/lib/MonoTouch10/Xamarin.Forms.Platform.iOS.dll"
"/r:/Users/amor/code/OKMonkey/SmartParat/packages/Xamarin.Forms.1.2.2.6243/lib/MonoTouch10/Xamarin.Forms.Core.dll"
"/r:/Users/amor/code/OKMonkey/SmartParat/packages/Xamarin.Forms.1.2.2.6243/lib/MonoTouch10/Xamarin.Forms.Xaml.dll"
"/r:/Users/amor/code/OKMonkey/SmartParat/SmartParat/bin/Release/SmartParat.dll"
"/r:/Users/amor/code/OKMonkey/SmartParat/appsee_xamarin_2.08/Appsee.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Collections.Concurrent.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Collections.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.ComponentModel.Annotations.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.ComponentModel.EventBasedAsync.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.ComponentModel.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Diagnostics.Contracts.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Diagnostics.Debug.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Diagnostics.Tools.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Dynamic.Runtime.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Globalization.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.IO.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Linq.Expressions.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Linq.Parallel.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Linq.Queryable.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Linq.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Net.NetworkInformation.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Net.Primitives.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Net.Requests.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.ObjectModel.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Reflection.Extensions.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Reflection.Primitives.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Reflection.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Resources.ResourceManager.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Runtime.Extensions.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Runtime.InteropServices.WindowsRuntime.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Runtime.InteropServices.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Runtime.Numerics.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Runtime.Serialization.Json.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Runtime.Serialization.Primitives.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Runtime.Serialization.Xml.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Runtime.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Security.Principal.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.ServiceModel.Http.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.ServiceModel.Primitives.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Text.Encoding.Extensions.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Text.Encoding.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Text.RegularExpressions.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Threading.Tasks.Parallel.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Threading.Tasks.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Threading.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Xml.ReaderWriter.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Xml.XDocument.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/Facades/System.Xml.XmlSerializer.dll"
"/r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/System.Core.dll"
/nologo
/warn:4
/debug:full
/optimize+
/codepage:utf8
"/define:__MOBILE__"

"/define:__IOS__"

/t:exe
"/Users/amor/code/OKMonkey/SmartParat/iOS/Main.cs"
"/Users/amor/code/OKMonkey/SmartParat/iOS/AppDelegate.cs"
"/Users/amor/code/OKMonkey/SmartParat/iOS/Data/SQLite_iOS.cs"
"/Users/amor/code/OKMonkey/SmartParat/iOS/ViewRenderers/ImageButtonRenderer.cs"
"/Users/amor/code/OKMonkey/SmartParat/iOS/ViewRenderers/BlurViewRenderer.cs"
"/Users/amor/code/OKMonkey/SmartParat/iOS/ViewRenderers/ContentPageRenderer.cs"
"/Users/amor/code/OKMonkey/SmartParat/iOS/ViewRenderers/LabelWithSizeRenderer.cs"
"/Users/amor/code/OKMonkey/SmartParat/iOS/ViewRenderers/ImageWithSizeRenderer.cs"


-------------------------------------

here is (a bit) more info from the console in Xcode/Organizer:
At least it indicates what type of exception is occurring:

Sep 19 11:47:50 Martins-iPad backboardd[31] <Notice>: ALS:
SetDisplayFactor: factor=0.0500
Sep 19 11:48:05 Martins-iPad backboardd[31] <Notice>: ALS:
SetDisplayFactor: factor=0.0000
Sep 19 11:48:05 Martins-iPad kernel[0] <Debug>: AppleMultitouchN1SPI:
updating power statistics
Sep 19 11:48:05 Martins-iPad SpringBoard[17] <Warning>:
[MPUSystemMediaControls] Disabling lock screen media controls updates for
screen turning off.
Sep 19 11:48:05 Martins-iPad backboardd[31] <Notice>: MultitouchHID:
detection mode: 3->255
Sep 19 11:48:05 Martins-iPad backboardd[31] <Notice>: Posting
'com.apple.iokit.hid.displayStatus' notifyState=0
Sep 19 11:48:05 Martins-iPad kernel[0] <Debug>: ALS:
AppleARMBacklight::setBacklightEnableGated 0 (set level to 0x269)
Sep 19 11:48:05 Martins-iPad SpringBoard[17] <Warning>:
[MPUNowPlayingController] Not registered for now playing notifications.
Ignoring call to -unregisterForNotifications.
Sep 19 11:48:05 Martins-iPad touchsetupd[3616] <Warning>: WPTransfer
deallocing
Sep 19 11:48:05 Martins-iPad wirelessproxd[3965] <Notice>: (Error) error
event: (<OS_xpc_error: <error: 0x199edfdc8> { count = 1, contents =
"XPCErrorDescription" => <string: 0x199ee00d0> { length = 18, contents =
"Connection invalid" }
}>)
Sep 19 11:48:05 Martins-iPad profiled[4846] <Notice>: (Note ) profiled:
Service starting...
Sep 19 11:48:06 Martins-iPad kernel[0] <Debug>:
AppleMobileADBE0::do_power_state_change(): fSoft: 0 fHard: 1 swapBusy: 0
pendingSwap: 0x0 fController: 1 -> 0 fDisplay: 1 -> 0
Sep 19 11:48:06 Martins-iPad kernel[0] <Debug>: ALS:
AppleARMBacklight::handleMessageGated - framebufferState -> 0
Sep 19 11:48:06 Martins-iPad kernel[0] <Debug>: 000243.721175
IOAV[3533,271] AppleDPDisplay::setLCDStateGated:(0xffffff808f682600)
Disabling
Sep 19 11:48:06 Martins-iPad kernel[0] <Debug>: 000000.000135
IOAV[3534,271] AppleDPDisplay::deviceTerminated:(0xffffff808f682600)
device=0xffffff80909d1800 _dpDevice=0xffffff80909d1800
Sep 19 11:48:06 Martins-iPad kernel[0] <Debug>: 000000.053220
IOAV[3535,271] AppleDPDisplay::terminateLink:(0xffffff808f682600) Waited 53
ms for display to disable
Sep 19 11:48:06 Martins-iPad kernel[0] <Debug>: 000000.000091
IOAV[3536,271] AppleDPDisplay::setPower:(0xffffff808f682600) enable=0
ret=0x00000000
Sep 19 11:48:06 Martins-iPad kernel[0] <Debug>: 000000.010700
IOAV[3537,271] AppleDPDisplay::setLCDStateGated:(0xffffff808f682600)
enable=0 ret=0x00000000
Sep 19 11:48:06 Martins-iPad backupd[4847] <Warning>: INFO: Scheduling next
backup at 9/19/14, 2:46:37 PM
Sep 19 11:48:16 Martins-iPad profiled[4846] <Notice>: (Note ) profiled:
Service stopping.
Sep 19 11:49:42 Martins-iPad backboardd[31] <Notice>: ALS:
SetDisplayFactor: factor=1.0000
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>:
AppleMobileADBE0::do_power_state_change(): fSoft: 1 fHard: 1 swapBusy: 0
pendingSwap: 0x0 fController: 0 -> 1 fDisplay: 0 -> 1
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: 000096.435557
IOAV[3538,271] AppleDPDisplay::setLCDStateGated:(0xffffff808f682600)
Enabling
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: 000000.001415
IOAV[3539,271] AppleDPDisplay::setPower:(0xffffff808f682600) setting bl
deadline for 193 ms from now
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: 000000.000007
IOAV[3540,271] AppleDPDisplay::setPower:(0xffffff808f682600) enable=1
ret=0x00000000
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: 000000.000005
IOAV[3541,271] AppleDPDisplay::setLCDStateGated:(0xffffff808f682600)
enable=1 ret=0x00000000
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: 000000.022124
IOAV[3542,3356407] AppleDPDisplay::devicePublished:(0xffffff808f682600)
newDevice=0xffffff8090709800
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: 000000.006395
IOAV[3543,3356407] AppleDPDisplay::trainLink:(0xffffff808f682600) Waited 6
ms for link training
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: 000000.000088
IOAV[3544,3356407] AppleDPDisplay::initiateLink:(0xffffff808f682600) Waited
30 ms for display to enable
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: 000000.000005
IOAV[3545,3356407] AppleDPDisplay::initiateLink:(0xffffff808f682600)
device=0xffffff8090709800 ret=0x00000000
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: 000000.000005
IOAV[3546,3356407] AppleDPDisplay::devicePublished:(0xffffff808f682600)
ret=0x00000000 opened=1
Sep 19 11:49:42 Martins-iPad backboardd[31] <Notice>: Posting
'com.apple.iokit.hid.displayStatus' notifyState=1
Sep 19 11:49:42 Martins-iPad SpringBoard[17] <Warning>:
[MPUSystemMediaControls] Enabling lock screen media controls updates for
screen turning on.
Sep 19 11:49:42 Martins-iPad SpringBoard[17] <Warning>:
[MPUNowPlayingController] Already registered for now playing notifications.
Sep 19 11:49:42 Martins-iPad backboardd[31] <Notice>: MultitouchHID:
detection mode: 255->6 (deferring until bootloaded)
Sep 19 11:49:42 Martins-iPad backboardd[31] <Notice>: MultitouchHID: device
bootloaded
Sep 19 11:49:42 Martins-iPad backboardd[31] <Notice>: MultitouchHID:
detection mode: 6->6
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: ALS:
AppleARMBacklight::handleMessageGated - framebufferState -> 1
Sep 19 11:49:42 Martins-iPad kernel[0] <Debug>: ALS:
AppleARMBacklight::setBacklightEnableGated 1 (set level to 0x30f)
Sep 19 11:49:43 Martins-iPad backboardd[31] <Notice>: MultitouchHID:
detection mode: 6->3
Sep 19 11:49:43 Martins-iPad wirelessproxd[3965] <Notice>: (Note ) Created
WPTransfer Object for touchsetupd with daemon <DaemonBluetooth: 0x145503300>
Sep 19 11:50:36 Martins-iPad mobile_installation_proxy[4348] <Warning>:
LaunchServices: Please include the kCFBundleIdentifierKey in the options
dictionary when installing an app.
Sep 19 11:50:36 Martins-iPad mobile_installation_proxy[4348] <Warning>:
LaunchServices: installing app for existing placeholder (null)
Sep 19 11:50:36 Martins-iPad installd[3960] <Notice>: 0x100598000
handle_install_for_ls: Install of
"/var/mobile/Media/PublicStaging/SmartParatiOS.app" requested by
mobile_installation_proxy
Sep 19 11:50:36 Martins-iPad installd[3960] <Notice>: 0x100598000
MobileInstallationInstall_Server: Installing app dk.okmonkey.smartparatsvar
Sep 19 11:50:36 Martins-iPad SpringBoard[17] <Warning>: Killing
dk.okmonkey.smartparatsvar for termination assertion
Sep 19 11:50:36 Martins-iPad installd[3960] <Notice>: 0x100598000
install_application: Performing developer delta patch
Sep 19 11:50:36 Martins-iPad installd[3960] <Notice>: 0x100598000
MobileInstallationInstall_Server: Staging: 0.05s; Waiting: 0.00s;
Installation: 0.20s; LS Sync: 0.00s; Overall: 0.25s
Sep 19 11:50:36 Martins-iPad lsd[3958] <Warning>: LaunchServices: Updating
identifier store
Sep 19 11:50:36 Martins-iPad SpringBoard[17] <Error>: libMobileGestalt
MobileGestalt.c:835: any-telephony is static and will never generate a
notification
Sep 19 11:50:36 Martins-iPad SpringBoard[17] <Error>: libMobileGestalt
MobileGestalt.c:837: front-facing-camera cannot generate notifications yet
Sep 19 11:50:36 Martins-iPad SpringBoard[17] <Error>: libMobileGestalt
MobileGestalt.c:835: still-camera is static and will never generate a
notification
Sep 19 11:50:36 Martins-iPad SpringBoard[17] <Error>: libMobileGestalt
MobileGestalt.c:835: ipad is static and will never generate a notification
Sep 19 11:50:36 Martins-iPad SpringBoard[17] <Error>: libMobileGestalt
MobileGestalt.c:835: stand-alone-contacts is static and will never generate
a notification
Sep 19 11:50:37 Martins-iPad MobileStorageMounter[4860] <Error>:
0x199ed92a0 digest_disk_image: Could not open
/var/run/mobile_image_mounter/912Ash.dmg: No such file or directory
Sep 19 11:50:37 Martins-iPad MobileStorageMounter[4860] <Error>:
0x199ed92a0 reload_mount_map: /Developer - could not create digest
Sep 19 11:50:37 Martins-iPad mobile_storage_proxy[4859] <Error>:
0x199ed92a0 handle_lookup_image: Entry 3 of 4 did not have a digest
Sep 19 11:50:37 Martins-iPad MobileStorageMounter[4860] <Error>:
0x199ed92a0 handle_mount_disk_image: A disk image of type Developer is
already mounted
Sep 19 11:50:37 Martins-iPad mobile_storage_proxy[4859] <Error>:
MobileStorageMount:355 Could not extract mount path from response message
Sep 19 11:50:37 Martins-iPad mobile_storage_proxy[4859] <Error>:
0x199ed92a0 handle_mount_image: Could not mount the disk image
Sep 19 11:50:37 Martins-iPad mobile_storage_proxy[4859] <Error>:
0x199ed92a0 main: Could not mount the image
Sep 19 11:50:38 Martins-iPad com.apple.debugserver-310.2[4861] <Warning>:
debugserver-310.2 for arm64.
Sep 19 11:50:38 Martins-iPad com.apple.debugserver-310.2[4861] <Warning>:
Connecting to com.apple.debugserver service...
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4862] <Warning>:
debugserver-310.2 for arm64.
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4862] <Warning>:
Connecting to com.apple.debugserver service...
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4862] <Warning>:
Got a connection, waiting for process information for launching or
attaching.
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4862] <Warning>:
About to launch process for bundle ID: dk.okmonkey.smartparatsvar
Sep 19 11:50:39 Martins-iPad kernel[0] <Debug>: launchd[4863] Container:
/private/var/mobile/Applications/62CA324F-A9E3-4A55-A76A-EE4C7F8638BB
(sandbox)
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4862] <Warning>:
In completion handler, got pid for bundle id, pid: 4863.
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4862] <Warning>:
Got a connection, launched process /Developer/usr/bin/debugserver.
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4862] <Warning>: 1
+0.000000 sec [12fe/060b]: error: ::ptrace (request = PT_THUPDATE, pid =
0x12ff, tid = 0x2503, signal = -1) err = Invalid argument (0x00000016)
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4862] <Warning>: 2
+0.001009 sec [12fe/1207]: error: ::read ( -1, 0x1005a3a38, 1024 ) => -1
err = Bad file descriptor (0x00000009)
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4862] <Warning>:
Exiting.
Sep 19 11:50:39 Martins-iPad mobile_installation_proxy[4348] <Error>:
0x10050c000 handle_connection: Could not receive request from host.
Sep 19 11:50:39 Martins-iPad mobile_installation_proxy[4348] <Error>:
0x1006ac000 handle_connection: Could not receive request from host.
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4861] <Warning>: 1
+0.000000 sec [12fd/060b]: error: ::read ( 6, 0x16fd86ce8, 1024 ) => 0 err
= Function not implemented (0x0000004e)
Sep 19 11:50:39 Martins-iPad com.apple.debugserver-310.2[4861] <Warning>:
Exiting.
Sep 19 11:50:40 Martins-iPad backboardd[31] <Error>: HID: The 'Passive'
connection 'SmartParatiOS' access to protected services is denied.
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Warning>:
Unhandled Exception:
0 SmartParatiOS 0x01cfd537 SmartParatiOS + 29680951
1 SmartParatiOS 0x01cfcd4f SmartParatiOS + 29678927
2 SmartParatiOS 0x01cf67db SmartParatiOS + 29652955
3 SmartParatiOS 0x00b23688 SmartParatiOS + 10962568
4 SmartParatiOS 0x01d55f1f SmartParatiOS + 30043935
5 SmartParatiOS 0x01d081ed SmartParatiOS + 29725165
6 SmartParatiOS 0x01cdbdbf SmartParatiOS + 29543871
7 SmartParatiOS 0x01cdb729 SmartParatiOS + 29542185
8 SmartParatiOS 0x01d08b29 SmartParatiOS + 29727529
9 SmartParatiOS 0x01d0b117 SmartParatiOS + 29737239
10 SmartParatiOS 0x01d55e2d SmartParatiOS + 30043693
11 SmartParatiOS 0x01ca4691 SmartParatiOS + 29316753
12 SmartParatiOS 0x01cafad9 SmartParatiOS + 29362905
13 UIKit 0x32276cc1 <redacted> + 276
14 UIKit 0x32276613 <redacted> + 1610
15 UIKit 0x32270cc9 <redacted> + 720
16 UIKit 0x3220cc97 <redacted> + 3550
17 UIKit 0x3220bdf9 <redacted> + 72
18 UIKit 0x32270405 <redacted> + 616
19 GraphicsServices 0x34836b55 <redacted> + 608
20 GraphicsServices 0x3483673f <redacted> + 34
21 CoreFoundation 0x2f9a2847 <redacted> + 34
22 CoreFoundation 0x2f9a27e3 <redacted> + 346
23 CoreFoundation 0x2f9a0faf <redacted> + 1406
24 CoreFoundation 0x2f90b769 CFRunLoopRunSpecific +
524
25 CoreFoundation 0x2f90b54b CFRunLoopRunInMode + 106
26 UIKit 0x3226f62b <redacted> + 762
27 UIKit 0x3226a891 UIApplicationMain + 1136
at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication.UIApplicationMain
(int,string[],intptr,intptr) <0x00110>
at MonoTouch.UIKit.UIApplication.Main (string[],string,string) <0x0012c>
at SmartParat.iOS.Application.Main (string[]) <0x00030>
at (wrapper runtime-invoke) object.runtime_invoke_dynamic
(intptr,intptr,intptr,intptr) <0x000c8>
32 SmartParatiOS 0x01d0b491 SmartParatiOS + 29738129
33 SmartParatiOS 0x01d55e2d SmartParatiOS + 30043693
34 SmartParatiOS 0x01d59d47 SmartParatiOS + 30059847
35 SmartParatiOS 0x01d59b8f SmartParatiOS + 30059407
36 SmartParatiOS 0x01cf45cd SmartParatiOS + 29644237
37 SmartParatiOS 0x01da5d60
xamarin_IntPtr_objc_msgSendSuper_IntPtr + 5572
38 libdyld.dylib 0x3a99cab7 <redacted> + 2
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Warning>: Unhandled
managed exception: An exception was thrown by the type initializer for
SmartParat.App (System.TypeInitializationException)
at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args,
System.String principalClassName, System.String delegateClassName)
[0x00000] in <filename unknown>:0
at SmartParat.iOS.Application.Main (System.String[] args) [0x00000] in
<filename unknown>:0
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: Stacktrace:
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>:
Native stacktrace:
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 0 SmartParatiOS
0x01cfe005 SmartParatiOS + 29683717
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 1 SmartParatiOS
0x01d03693 SmartParatiOS + 29705875
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 2
libsystem_platform.dylib 0x3aab6723 _sigtramp + 42
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 3
libsystem_pthread.dylib 0x3aabb7b7 pthread_kill + 58
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 4
libsystem_c.dylib 0x3aa03ff9 abort + 76
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 5 SmartParatiOS
0x01db8810 monotouch_release_managed_ref + 2232
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 6 SmartParatiOS
0x01cfe50b SmartParatiOS + 29685003
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 7 SmartParatiOS
0x01d0bcdb SmartParatiOS + 29740251
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 8 SmartParatiOS
0x01cfdcc3 SmartParatiOS + 29682883
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 9 SmartParatiOS
0x01cfcd4f SmartParatiOS + 29678927
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 10 SmartParatiOS
0x01cf67db SmartParatiOS + 29652955
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 11 SmartParatiOS
0x00b23688 SmartParatiOS + 10962568
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 12 SmartParatiOS
0x01d55f1f SmartParatiOS + 30043935
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 13 SmartParatiOS
0x01d081ed SmartParatiOS + 29725165
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 14 SmartParatiOS
0x01cdbdbf SmartParatiOS + 29543871
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 15 SmartParatiOS
0x01cdb729 SmartParatiOS + 29542185
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 16 SmartParatiOS
0x01d08b29 SmartParatiOS + 29727529
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 17 SmartParatiOS
0x01d0b117 SmartParatiOS + 29737239
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 18 SmartParatiOS
0x01d55e2d SmartParatiOS + 30043693
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 19 SmartParatiOS
0x01ca4691 SmartParatiOS + 29316753
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 20 SmartParatiOS
0x01cafad9 SmartParatiOS + 29362905
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 21 UIKit
0x32276cc1 <redacted> + 276
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 22 UIKit
0x32276613 <redacted> + 1610
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 23 UIKit
0x32270cc9 <redacted> + 720
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 24 UIKit
0x3220cc97 <redacted> + 3550
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 25 UIKit
0x3220bdf9 <redacted> + 72
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 26 UIKit
0x32270405 <redacted> + 616
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 27
GraphicsServices 0x34836b55 <redacted> + 608
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 28
GraphicsServices 0x3483673f <redacted> + 34
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 29
CoreFoundation 0x2f9a2847 <redacted> + 34
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 30
CoreFoundation 0x2f9a27e3 <redacted> + 346
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 31
CoreFoundation 0x2f9a0faf <redacted> + 1406
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 32
CoreFoundation 0x2f90b769 CFRunLoopRunSpecific + 524
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 33
CoreFoundation 0x2f90b54b CFRunLoopRunInMode + 106
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 34 UIKit
0x3226f62b <redacted> + 762
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 35 UIKit
0x3226a891 UIApplicationMain + 1136
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 36 SmartParatiOS
0x0069167c SmartParatiOS + 6170236
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 37 SmartParatiOS
0x002efd18 SmartParatiOS + 2362648
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 38 SmartParatiOS
0x000f2e40 SmartParatiOS + 278080
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 39 SmartParatiOS
0x00abb08c SmartParatiOS + 10535052
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 40 SmartParatiOS
0x01d0b491 SmartParatiOS + 29738129
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 41 SmartParatiOS
0x01d55e2d SmartParatiOS + 30043693
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 42 SmartParatiOS
0x01d59d47 SmartParatiOS + 30059847
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 43 SmartParatiOS
0x01d59b8f SmartParatiOS + 30059407
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 44 SmartParatiOS
0x01cf45cd SmartParatiOS + 29644237
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 45 SmartParatiOS
0x01da5d60 xamarin_IntPtr_objc_msgSendSuper_IntPtr +
5572
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>: 46 libdyld.dylib
0x3a99cab7 <redacted> + 2
Sep 19 11:50:40 Martins-iPad SmartParatiOS[4863] <Error>:
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Sep 19 11:50:40 Martins-iPad ReportCrash[4865] <Notice>: ReportCrash acting
against PID 4863
Sep 19 11:50:41 Martins-iPad ReportCrash[4865] <Notice>: Formulating crash
report for process SmartParatiOS[4863]
Sep 19 11:50:41 Martins-iPad com.apple.launchd[1]
(UIKitApplication:dk.okmonkey.smartparatsvar[0x96bc][4863]) <Warning>:
(UIKitApplication:dk.okmonkey.smartparatsvar[0x96bc]) Job appears to have
crashed: Abort trap: 6
Sep 19 11:50:41 Martins-iPad backboardd[31] <Warning>: Application
'UIKitApplication:dk.okmonkey.smartparatsvar[0x96bc]' exited abnormally
with signal 6: Abort trap: 6
Sep 19 11:50:41 Martins-iPad ReportCrash[4865] <Notice>: Saved crashreport
to
/var/mobile/Library/Logs/CrashReporter/SmartParatiOS_2014-09-19-115040_Martins-iPad.ips
using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Sep 19 11:52:27 Martins-iPad backboardd[31] <Notice>: ALS:
SetDisplayFactor: factor=0.0500
Comment 5 Sadik Ali 2014-10-01 05:09:20 UTC
I have check this issue and I am able to reproduce this issue.

When I run the attached sample on release mode the application always crashes and when I try the same application on "Debug" mode application doesn't crashes.

I also observed that If I use following statement application doesn't crashes 
		var database = new QuestionDb (); 
but if I use following code application crashes every time 
		 App.Instance.PageManager = this;
	
IDE logs: https://gist.github.com/saurabh360/5291792c808680866c51
Device logs: https://gist.github.com/saurabh360/83211ca096924f13e87e

Environment Info:

=== Xamarin Studio ===

Version 5.5 (build 225)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Runtime:
	Mono 3.10.0 ((detached/ac51002)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000016

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.iOS ===

Version: 8.2.0.189 (Business Edition)
Hash: e934614
Branch: 
Build date: 2014-09-29 14:42:26-0400

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.0   (API level 11)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		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)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 505000225
Git revision: 50a525f6fca1b6ad5bd4da1ab2f2b0083240826d
Build date: 2014-09-30 12:07:18-04
Xamarin addins: bcebe330d7d264c5241c3d9b459aaf3bfd8ac4e0

=== Operating System ===

Mac OS X 10.9.5
Darwin Jatin66s-iMac.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 6 Jon Goldberger [MSFT] 2014-10-01 13:56:59 UTC
From desk case: (New reply)

I decided to look into this problem again.
Starting with a complete new blank Xamarin.Portable project and trying to
reproduce it.

During this I found out what the issue is:

I use a Singleton pattern implemented with static initialization as
described here <http://msdn.microsoft.com/en-us/library/ff650316.aspx>;
(MSDN).
If I use DependencyService in the ctor of the singleton it crashes - but
only in release mode.
If i enable debug info on the release build it works.
I guess some initializing is needed for the DependencyService which is not
executed at that time.
I have solved it by moving my code in the ctor to a init method which is
executed later.

You might still want to investigate exactly what is going on - and what
that dependency is.
Comment 7 Jason Smith [MSFT] 2014-10-20 21:55:21 UTC
Try setting the build configuration settings to Link SDK Only and see if the problem goes away.
Comment 8 Jason Smith [MSFT] 2014-10-20 21:58:13 UTC
I just saw that you already tried that...
Comment 9 Jason Smith [MSFT] 2016-03-18 08:16:02 UTC
Believe this is fixed in newer versions of Xamarin.iOS