Bug 539 - MonoTouch Application crashes at startup before it reaches the C# code.
Summary: MonoTouch Application crashes at startup before it reaches the C# code.
Status: RESOLVED DUPLICATE of bug 707
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- critical
Target Milestone: ---
Assignee: Alan McGovern
URL:
Depends on:
Blocks:
 
Reported: 2011-08-30 10:37 UTC by Dominique NORMAND
Modified: 2011-10-31 08:43 UTC (History)
5 users (show)

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


Attachments
Crash Log (21.83 KB, application/octet-stream)
2011-08-30 10:37 UTC, Dominique NORMAND
Details
Break on Exception in MonoDevelop (156.58 KB, image/png)
2011-09-13 16:48 UTC, Dominique NORMAND
Details
Break on Exception in MonoDevelop 2 (65.61 KB, image/png)
2011-09-13 16:48 UTC, Dominique NORMAND
Details
Thumb settings (45.45 KB, image/png)
2011-09-29 12:17 UTC, Brian LeBaron
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 707

Description Dominique NORMAND 2011-08-30 10:37:44 UTC
Created attachment 214 [details]
Crash Log

Our MonoTouch App crashes at startup on the device before it even reaches the C# code. Sometimes doing a full rebuild does fix it, sometime is doesn't. This is rendering our work very unproductive since we have to do a full rebuild often, which take time, and we're not even sure it's going to work.

We're running MonoDevelop 2.6.RC2, Mono 2.10.5 and MonoTouch 4.0.6

I attached the crash log and here is the console log


Aug 30 10:09:14 AEs-iPad kernel[0] <Debug>: launchd[3563] Builtin profile: container (sandbox)
Aug 30 10:09:14 AEs-iPad kernel[0] <Debug>: launchd[3563] Container: /private/var/mobile/Applications/DDF9156C-7560-409C-98C3-CF371A00D33D [69] (sandbox)
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: Stacktrace:
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: Native stacktrace:
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: 	0   MIIPhone                            0x053e23e8 mono_handle_native_sigsegv + 412
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: 	1   MIIPhone                            0x053c82c4 mono_sigsegv_signal_handler + 360
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: 	2   libsystem_c.dylib                   0x3565c72f _sigtramp + 42
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: 	3   MIIPhone                            0x053c7f2c mono_jit_runtime_invoke + 2800
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: Debug info from gdb:
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: =================================================================
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: Got a SIGSEGV while executing native code. This usually indicates
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: a fatal error in the mono runtime or one of the native libraries 
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: used by your application.
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: =================================================================
Aug 30 10:09:14 AEs-iPad UIKitApplication:com.cegedim.mi[0x4b22][3563] <Notice>: Error parsing debug host: automatic
Aug 30 10:09:14 AEs-iPad sandboxd[3565] <Notice>: MIIPhone(3563) deny process-fork
Aug 30 10:09:14 AEs-iPad ReportCrash[3564] <Notice>: Formulating crash report for process MIIPhone[3563]
Aug 30 10:09:14 AEs-iPad com.apple.launchd[1] (UIKitApplication:com.cegedim.mi[0x4b22][3563]) <Warning>: (UIKitApplication:com.cegedim.mi[0x4b22]) Job appears to have crashed: Abort trap: 6
Aug 30 10:09:14 AEs-iPad com.apple.launchd[1] (UIKitApplication:com.cegedim.mi[0x4b22]) <Warning>: (UIKitApplication:com.cegedim.mi[0x4b22]) Throttling respawn: Will start in 2147483647 seconds
Aug 30 10:09:14 AEs-iPad SpringBoard[29] <Warning>: Application 'MIIPhone' exited abnormally with signal 6: Abort trap: 6
Aug 30 10:09:14 AEs-iPad ReportCrash[3564] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MIIPhone_2011-08-30-100914_AEs-iPad.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Comment 1 Dominique NORMAND 2011-08-30 10:51:06 UTC
I forgot to mention, we're using xcode 3.2.6 + SDK 4.3
Comment 2 Sebastien Pouliot 2011-08-31 11:56:54 UTC
There's no symbol in your crash log so it's hard to diagnose. From the log I can see that your application does get started but crash very early (but you already knew that).

Let's try to isolate the issue a bit more:

a) does it occurs only on the device ? or is the simulator crashing too ?

b) can you try to rebuild and execute the following cases ?

    b.1) on the device with the linker set to "Don't link";
    b.2) on the simulator with the linker set to "Link SDK assemblies";

c) are you linking with any native libraries ? does it crash if you remove them ?
Comment 3 Dominique NORMAND 2011-08-31 17:14:26 UTC
a)  It seems to be happening only on the device. The simulator doesn't crash. Also on the device it doesn't crash all the time.

b) 
   b.1) We're not at a stage where we can turn the "link" option on yet, so all the crashes were with "don't link". I instead tried case b.2 but on the device. The first time it crashed at startup. After a full rebuild it ran but crash in our code: "login.SendActionForControlEvents(UIControlEvent.TouchUpInside);"
 
   b.2) Works except for SendAcctionForControlEvents crash (see b.1)

c) no, we don't use native libraries.  

Can it be due to compilation issue? Usually a full rebuild is needed to prevent the crash. 
Maybe due to "copy local" in references causing multiple versions of the same assemblies exiting in different locations and the compiler picking the wrong one.

I symbolicated the crash call stack

0   libsystem_kernel.dylib        	0x31d1ea1c __pthread_kill + 8
1   libsystem_c.dylib             	0x32ae53b4 pthread_kill + 52
2   libsystem_c.dylib             	0x32addbf8 abort + 72
3   MIIPhone                      	0x053876c8 mono_handle_native_sigsegv (in MIIPhone) (mini-exceptions.c:2249)
4   MIIPhone                      	0x0536d2c4 mono_sigsegv_signal_handler (in MIIPhone) (mini.c:5891)
5   libsystem_c.dylib             	0x32af0728 _sigtramp + 36
6   MIIPhone                      	0x03b87b08 MonoTouch_ObjCRuntime_Runtime__cctor (in MIIPhone) + 36
Comment 4 Sebastien Pouliot 2011-08-31 17:58:31 UTC
a) ok, a device-only issue.

Once uploaded to the device, after a full rebuild, will it work multiple time ? (e.g. if started again from the device itself, not MonoDevelop) or would it crash (sometime/often) ?


b) the default, for devices (b.1), is "Link SDK" (not "Don't link") - that's in part because it's faster to build (smaller assemblies, less time to AOT and upload to the device). Have you turned it off ? (I just want to be sure of your settings)


c) ok, no native libraries involved


> Can it be due to compilation issue? Usually a full rebuild is needed to prevent the crash. 

Maybe, but unlikely.
* The same, compared to the simulator, managed (smcs) compile steps are done - but the simulator is fine;
* There's no linking done - so the managed assemblies are untouched (that also should be identical to the simulator which default to "Don't link");
* Finally the AOT step is always _completely_ done (nothing is cached) before uploading to the device.


> I symbolicated the crash call stack

Thanks. It confirms it very early, likely when we want to start the registration (which requires the static ctor to be called).


Can you provide me (you can mark it 'private' when adding the attachment) the full (re)build log of your application ? First make sure to add "-v -v -v" to the "extra mtouch arguments" in "Project Options, iPhone Build". There could be a warning in there that would give us a hint about this. Thanks!
Comment 5 Dominique NORMAND 2011-08-31 20:02:55 UTC
a. Yes, once an good version is uploaded to the device it always works fine.

b. Yes, in MonoDevelop's project we have "Don't Link" for all the configuration  <MtouchLink>None</MtouchLink>
 
c. I think I forgot to mention a very important detail. We have 2 solutions. Solution 1 has all our Framework assemblies. Those assemblies are used by more than 1 application. Solution 2 has all the application specific assemblies + the monotouch application itself. When compiling solution 1, the assemblies are copied to a folder and projects in solution 2 reference them from that folder.
The crash seems to happen when modifying one of the "Framework" assemblies. Then compiling the solution 2 will most of the time cause the crash.
I'll attach 2 build log files. One for which it didn't crash, and one for which it did crash.
Comment 8 Sebastien Pouliot 2011-09-01 10:44:19 UTC
That's a bit uncommon setup but AFAIK it _should_ work (modulo bugs in MonoDevelop).

Let's try to find out if this is MonoTouch or MonoDevelop related. 

Can do add the project files (Add Existing Projects...) from Solution 1 into (a backed up ;-) Solution 2 and edit your reference to the project (instead of the files) ?

* If all builds from such a setup works correctly then the issue is either a bug in MonoTouch (or something is misconfigured).

* If you still have builds that crash then it's unrelated to having separate solution (and likely not a MonoDevelop issue).


note: sadly the build logs you provided me were truncated (MD has a limit on their length [1]) but I saw nothing wrong in the last part (but it only covers the AOTing). If you're able to quickly copy/paste the beginning of the build (or interrupt one) I would gladly review it too.

[1] I filled a bug report about this http://bugzilla.xamarin.com/show_bug.cgi?id=582
Comment 9 Dominique NORMAND 2011-09-02 00:33:15 UTC
I created the solution that contains all the projects and changed the assembly references to project references. Once this was done, all compilation did seem to work fine.
Comment 10 Sebastien Pouliot 2011-09-02 08:38:23 UTC
Downgraded priority (there's a workaround) and switching to MonoDevelop since they'll be able to ask you better question to see if this is a bug or a configuration issue.
Comment 11 Dominique NORMAND 2011-09-08 16:11:07 UTC
After working few days with the new solution, we're still getting the crash once in a while
Comment 12 Dominique NORMAND 2011-09-12 14:37:56 UTC
Today,  the crash is back when compiled in Debug mode but not in Release Mode

Below is the new log output to the Console. It's not much different except for the message
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: Listened for connections from MonoDevelop for 2 seconds, nobody connected.
Maybe the defect is related to the app trying to connect to the debugger.

Console Log:
-----------

Sep 12 14:23:03 AEs-iPad SpringBoard[29] <Notice>: MultitouchHID(1ed84ba0) uilock state: 1 -> 0
Sep 12 14:23:04 AEs-iPad kernel[0] <Debug>: set_crc_notification_state 0
Sep 12 14:23:07 AEs-iPad kernel[0] <Debug>: launchd[105] Builtin profile: container (sandbox)
Sep 12 14:23:07 AEs-iPad kernel[0] <Debug>: launchd[105] Container: /private/var/mobile/Applications/ED7D9F0A-B528-4309-B6B0-988E01A3965A [69] (sandbox)
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: Listened for connections from MonoDevelop for 2 seconds, nobody connected.
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: Stacktrace:
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: Native stacktrace:
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: 	0   MIIPhone                            0x041b95ac mono_handle_native_sigsegv + 412
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: 	1   MIIPhone                            0x0419f31c mono_sigsegv_signal_handler + 360
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: 	2   libsystem_c.dylib                   0x3561f72f _sigtramp + 42
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: 	3   MIIPhone                            0x03aea918 MonoTouch_ObjCRuntime_Runtime__cctor + 44
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: Debug info from gdb:
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: =================================================================
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: Got a SIGSEGV while executing native code. This usually indicates
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: a fatal error in the mono runtime or one of the native libraries 
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: used by your application.
Sep 12 14:23:08 AEs-iPad UIKitApplication:com.cegedim.mi[0xfbca][105] <Notice>: =================================================================
Sep 12 14:23:08 AEs-iPad sandboxd[107] <Notice>: MIIPhone(105) deny process-fork
Sep 12 14:23:08 AEs-iPad ReportCrash[106] <Notice>: Formulating crash report for process MIIPhone[105]
Sep 12 14:23:08 AEs-iPad com.apple.launchd[1] (UIKitApplication:com.cegedim.mi[0xfbca][105]) <Warning>: (UIKitApplication:com.cegedim.mi[0xfbca]) Job appears to have crashed: Abort trap: 6
Sep 12 14:23:08 AEs-iPad com.apple.launchd[1] (UIKitApplication:com.cegedim.mi[0xfbca]) <Warning>: (UIKitApplication:com.cegedim.mi[0xfbca]) Throttling respawn: Will start in 2147483645 seconds
Sep 12 14:23:08 AEs-iPad SpringBoard[29] <Warning>: Application 'MIIPhone' exited abnormally with signal 6: Abort trap: 6
Sep 12 14:23:08 AEs-iPad ReportCrash[106] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MIIPhone_2011-09-12-142308_AEs-iPad.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Comment 13 Rolf Bjarne Kvinge [MSFT] 2011-09-12 16:25:28 UTC
I doubt it's the app trying to connect to the debugger, in particular if it fails to connect. In any case, can you upload the crashreport produced? It might have more information about the problem.
Comment 14 Dominique NORMAND 2011-09-12 22:54:32 UTC
Here it is

Incident Identifier: 51BE51C3-64C0-4909-9EA0-2DDE78820539
CrashReporter Key:   0eb35b8ee7515a5c59b14403c2ffd32eb3e0458a
Hardware Model:      iPad2,1
Process:         MIIPhone [610]
Path:            /var/mobile/Applications/0418EBCC-1514-4208-8D66-91D4D3F1E82D/MIiPhone.app/MIIPhone
Identifier:      MIIPhone
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2011-09-12 22:46:52.396 -0400
OS Version:      iPhone OS 4.3.5 (8L1)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x31d1ea1c __pthread_kill + 8
1   libsystem_c.dylib             	0x32ae53b4 pthread_kill + 52
2   libsystem_c.dylib             	0x32addbf8 abort + 72
3   MIIPhone                      	0x0421b7f4 mono_handle_native_sigsegv (in MIiPhone) (mini-exceptions.c:2249)
4   MIIPhone                      	0x04201284 mono_sigsegv_signal_handler (in MIiPhone) (mini.c:5896)
5   libsystem_c.dylib             	0x32af0728 _sigtramp + 36
6   MIIPhone                      	0x03ab3750 MonoTouch_ObjCRuntime_Runtime__cctor (in MIiPhone)+ 36

Thread 1:
0   libsystem_kernel.dylib        	0x31d1f3ec __workq_kernreturn + 8
1   libsystem_c.dylib             	0x32ae66d8 _pthread_wqthread + 592
2   libsystem_c.dylib             	0x32ae6bbc start_wqthread + 0

Thread 2 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0   libsystem_kernel.dylib        	0x31d1ffbc kevent + 24
1   libdispatch.dylib             	0x34ebfed4 _dispatch_mgr_invoke + 744
2   libdispatch.dylib             	0x34ec0f3a _dispatch_queue_invoke + 70
3   libdispatch.dylib             	0x34ec04ec _dispatch_worker_thread2 + 228
4   libsystem_c.dylib             	0x32ae658a _pthread_wqthread + 258
5   libsystem_c.dylib             	0x32ae6bbc start_wqthread + 0

Thread 0 crashed with ARM Thread State:
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000001      r3: 0x00000000
    r4: 0x3f0a948c    r5: 0x00000006      r6: 0x00000000      r7: 0x2fdfe9a4
    r8: 0x067626b0    r9: 0x00000000     r10: 0x00000000     r11: 0x2fdff4c8
    ip: 0x00000148    sp: 0x2fdfe998      lr: 0x356143bb      pc: 0x3400fa1c
  cpsr: 0x00000010

Binary Images:
    0x1000 -  0x440bfff +MIIPhone armv6  <f04f8133d6dd374189b17f340ca8178a> /var/mobile/Applications/0418EBCC-1514-4208-8D66-91D4D3F1E82D/MIiPhone.app/MIIPhone
0x2fe00000 - 0x2fe25fff  dyld armv7  <4d3190188cbf32a8a73f32a8b5bb7adf> /usr/lib/dyld
0x30852000 - 0x3085bfff  CoreVideo armv7  <ea847e6dba2d36b1826b255c73b39539> /System/Library/Frameworks/CoreVideo.framework/CoreVideo
0x30967000 - 0x30987fff  AppleAccount armv7  <4e0ac5cf93b338ab8c5f34ba3c5e2ee4> /System/Library/PrivateFrameworks/AppleAccount.framework/AppleAccount
0x30990000 - 0x30995fff  liblaunch.dylib armv7  <f5ccc8234aea3ebd9a88bd37f0fa23ae> /usr/lib/system/liblaunch.dylib
0x30996000 - 0x30ab7fff  CoreGraphics armv7  <65f6c8701b563542820a26b0dfc4f6a4> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x30ab9000 - 0x30ab9fff  Accelerate armv7  <7d5ad465049136afaa1f0d89aac600bc> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x30aba000 - 0x30aedfff  StoreServices armv7  <d526715648f435c3aac4c42953e76d20> /System/Library/PrivateFrameworks/StoreServices.framework/StoreServices
0x30c1b000 - 0x30d1afff  PhotoLibrary armv7  <03a0336e443b3d958419dab3d432b147> /System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary
0x30d3c000 - 0x30d47fff  libz.1.dylib armv7  <ac706bee36593dc683fd5a96a389d72e> /usr/lib/libz.1.dylib
0x30d48000 - 0x30d8efff  CoreTelephony armv7  <af7d1e770e5a3ffd8834a57fb5d40557> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
0x30dd8000 - 0x30ddefff  StoreKit armv7  <0deee3e11c7632aab98ab3c026d41e41> /System/Library/Frameworks/StoreKit.framework/StoreKit
0x30ddf000 - 0x30e22fff  ManagedConfiguration armv7  <f790c26852cb3cf298abe56bc9a3940b> /System/Library/PrivateFrameworks/ManagedConfiguration.framework/ManagedConfiguration
0x30e23000 - 0x30e33fff  DataAccessExpress armv7  <66d9047da79a31daa887e6d84c42ecb2> /System/Library/PrivateFrameworks/DataAccessExpress.framework/DataAccessExpress
0x30e34000 - 0x30ef3fff  CFNetwork armv7  <b09e0d53de9f3bc8bde494780f3cdd4f> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x30ef4000 - 0x30ef5fff  DataMigration armv7  <42e9e87a4e0735c3837e27d4f2adcf55> /System/Library/PrivateFrameworks/DataMigration.framework/DataMigration
0x30f04000 - 0x30f08fff  libcache.dylib armv7  <362fdd2de66f3e189b5d139c9669a9e3> /usr/lib/system/libcache.dylib
0x30f09000 - 0x30f40fff  Security armv7  <6599f42a910b3b31a0e1d98c883d61cb> /System/Library/Frameworks/Security.framework/Security
0x30f41000 - 0x3154cfff  WebCore armv7  <07941e59d0a33f94802c16c76238fddf> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x3154d000 - 0x31699fff  MediaToolbox armv7  <482b13059e8a329fa5d832baede25103> /System/Library/PrivateFrameworks/MediaToolbox.framework/MediaToolbox
0x3184c000 - 0x31864fff  iAd armv7  <7f6c5b4499ee383ea75f0cc8dcb5ca35> /System/Library/Frameworks/iAd.framework/iAd
0x3337f000 - 0x33384fff  libcopyfile.dylib armv7  <e32cf2d48a1f3060b372ca7623e4a12b> /usr/lib/system/libcopyfile.dylib
0x33385000 - 0x3339afff  libresolv.9.dylib armv7  <e92cfbb83f7b330db19181e797bb3f7b> /usr/lib/libresolv.9.dylib
0x3339b000 - 0x3349ffff  JavaScriptCore armv7  <61a94142e2d23dafa2964190dd46e9e3> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore
0x334ae000 - 0x3350dfff  libBLAS.dylib armv7  <0b36b2272aa33a8c9aa22d99c89d7189> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x33520000 - 0x33674fff  AudioToolbox armv7  <6619c8c13f8d328e923e797fa8d0df23> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
0x33675000 - 0x3367bfff  ProtocolBuffer armv7  <f9277ee9b85b3722975ad319a323aca0> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/ProtocolBuffer
0x3367c000 - 0x33688fff  GraphicsServices armv7  <ff78a9636e933f0dbd222f8d26209788> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x33689000 - 0x3368efff  libsystem_dnssd.dylib armv7  <f019bc513a6a37f4a79555b3ffb2a777> /usr/lib/system/libsystem_dnssd.dylib
0x3368f000 - 0x33755fff  MusicLibrary armv7  <71a09022bd8b3b6a90a250199d190f10> /System/Library/PrivateFrameworks/MusicLibrary.framework/MusicLibrary
0x33769000 - 0x337b3fff  libstdc++.6.dylib armv7  <e98c3fd72ba43d02aac24b08f7219eb7> /usr/lib/libstdc++.6.dylib
0x337bd000 - 0x337ddfff  MobileSync armv7  <4df400c4559435889eccd88db77a110c> /System/Library/PrivateFrameworks/MobileSync.framework/MobileSync
0x337de000 - 0x3380cfff  DataAccess armv7  <3a2e67aa1d8834b7a8fc2fbb56654b15> /System/Library/PrivateFrameworks/DataAccess.framework/DataAccess
0x3380f000 - 0x33815fff  AssetsLibrary armv7  <124dd93095423fcf8029d3c7614dffd4> /System/Library/Frameworks/AssetsLibrary.framework/AssetsLibrary
0x33846000 - 0x33855fff  Notes armv7  <d9c976ca976e3d029f69febd48f17601> /System/Library/PrivateFrameworks/Notes.framework/Notes
0x338b6000 - 0x33925fff  ProofReader armv7  <6d843c6aecdd37ae84baa40af8ad7e65> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
0x33945000 - 0x33946fff  libsystem_blocks.dylib armv7  <ccc041df3de73eafb7a59e74cdb1702b> /usr/lib/system/libsystem_blocks.dylib
0x3395c000 - 0x3395cfff  libsystem_sandbox.dylib armv7  <f47c01d627853b328e088b3fdd08e87d> /usr/lib/system/libsystem_sandbox.dylib
0x33974000 - 0x339bafff  CoreLocation armv7  <249b8af3dc503d11bf3711f0407c66d8> /System/Library/Frameworks/CoreLocation.framework/CoreLocation
0x339dd000 - 0x33a72fff  ImageIO armv7  <d520e3241d1130e8ac1375ee0f2c1095> /System/Library/Frameworks/ImageIO.framework/ImageIO
0x33a83000 - 0x33a99fff  EAP8021X armv7  <9fefc0ada30435fbb3b51818c74f6cb8> /System/Library/PrivateFrameworks/EAP8021X.framework/EAP8021X
0x33b93000 - 0x33bc2fff  SystemConfiguration armv7  <1d73b8a159363f96bb9c039655c5eae6> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x33bf9000 - 0x33d0bfff  MediaPlayer armv7  <da848c0745a637af81d7edd962a09324> /System/Library/Frameworks/MediaPlayer.framework/MediaPlayer
0x33d78000 - 0x33e92fff  libicucore.A.dylib armv7  <bada0c2725bb31a483d5adf9aaf1f8df> /usr/lib/libicucore.A.dylib
0x33ec9000 - 0x33eccfff  ApplePushService armv7  <015c68c15621348db9f6a012499170e1> /System/Library/PrivateFrameworks/ApplePushService.framework/ApplePushService
0x33edf000 - 0x33edffff  libCVMSPluginSupport.dylib armv7  <42d8aa2a31843a6e8bfff745644a7ba5> /System/Library/Frameworks/OpenGLES.framework/libCVMSPluginSupport.dylib
0x33f12000 - 0x33ff7fff  CoreFoundation armv7  <a8444f997111304c9571b3ff974b769c> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x33ffa000 - 0x33ffdfff  MobileIcons armv7  <08e426f8a707388d8adda670bfed0c2e> /System/Library/PrivateFrameworks/MobileIcons.framework/MobileIcons
0x33ffe000 - 0x34015fff  libsystem_kernel.dylib armv7  <c4ebe7eb2e6c3a2d9bd3620a4d6dbc0e> /usr/lib/system/libsystem_kernel.dylib
0x34016000 - 0x34135fff  Foundation armv7  <09ff368178c5321c9715b9c8d491d53f> /System/Library/Frameworks/Foundation.framework/Foundation
0x34136000 - 0x34140fff  AccountSettings armv7  <d083fb384dc7311eb6766b9b2d2dd9c8> /System/Library/PrivateFrameworks/AccountSettings.framework/AccountSettings
0x3419c000 - 0x3419efff  libAccessibility.dylib armv7  <d55f1553d14831a2a5435ae27ef75ef4> /usr/lib/libAccessibility.dylib
0x341a6000 - 0x341aefff  MobileBluetooth armv7  <63f11756c4aa3262b2317ff3b8e2a977> /System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth
0x341e7000 - 0x34210fff  ContentIndex armv7  <ecd71782cd833360872b943ecc65d203> /System/Library/PrivateFrameworks/ContentIndex.framework/ContentIndex
0x342ab000 - 0x342aefff  ArtworkCache armv7  <4863e321afee3ac5a3749e50cd926597> /System/Library/PrivateFrameworks/ArtworkCache.framework/ArtworkCache
0x342af000 - 0x342b0fff  libdyld.dylib armv7  <7dd4acfe150831e0ae82296587e67e7f> /usr/lib/system/libdyld.dylib
0x342d3000 - 0x342d9fff  liblockdown.dylib armv7  <14c89b7346433c1f8675f454531f6ca3> /usr/lib/liblockdown.dylib
0x343ac000 - 0x343c7fff  FTServices armv7  <e23c3572bf3a36a3a99364d18c484f1e> /System/Library/PrivateFrameworks/FTServices.framework/FTServices
0x3445b000 - 0x344c1fff  EventKitUI armv7  <b3b568df80863f2e9374054bab335bf3> /System/Library/Frameworks/EventKitUI.framework/EventKitUI
0x344c2000 - 0x344c9fff  AggregateDictionary armv7  <ab9777b39e8e3026ad64dc90323cad7e> /System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary
0x344e6000 - 0x34523fff  CoreText armv7  <fb6a72faec2330c4b2cd33c2e9c59588> /System/Library/Frameworks/CoreText.framework/CoreText
0x34524000 - 0x348b1fff  UIKit armv7  <c271b78464d93cb7bf28c6e49df293ba> /System/Library/Frameworks/UIKit.framework/UIKit
0x348c8000 - 0x349c2fff  GameKitServices armv7  <a69426414c4634cda77409d5890696ac> /System/Library/PrivateFrameworks/GameKitServices.framework/GameKitServices
0x349c9000 - 0x349fcfff  iCalendar armv7  <34ce1957082f3518b5740ac33cfc92eb> /System/Library/PrivateFrameworks/iCalendar.framework/iCalendar
0x349fd000 - 0x34a30fff  QuickLook armv7  <29d2d981d1d6358381f5716ee37314b4> /System/Library/Frameworks/QuickLook.framework/QuickLook
0x34a31000 - 0x34a3afff  MobileWiFi armv7  <03d98d5cf6383695aa7d8a88da52f410> /System/Library/PrivateFrameworks/MobileWiFi.framework/MobileWiFi
0x34a51000 - 0x34a58fff  libbz2.1.0.dylib armv7  <0a082e1d475432959ba93aa3dbf7fb31> /usr/lib/libbz2.1.0.dylib
0x34a5b000 - 0x34a5dfff  MobileInstallation armv7  <94b6d6c5d9883175af26764567528127> /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation
0x34a6b000 - 0x34a7afff  MobileDeviceLink armv7  <563a09bcdb2f32369b1e22f53f58273a> /System/Library/PrivateFrameworks/MobileDeviceLink.framework/MobileDeviceLink
0x34a98000 - 0x34a9efff  IAP armv7  <c0f4c99a1b493e489948f231ad9238e2> /System/Library/PrivateFrameworks/IAP.framework/IAP
0x34ab5000 - 0x34ad4fff  Bom armv7  <b178e3efb4d733c694bd5a55e57a314f> /System/Library/PrivateFrameworks/Bom.framework/Bom
0x34ad6000 - 0x34ad8fff  SpringBoardUI armv7  <90ba5da3e3e337e0a83e2c2589d951a8> /System/Library/PrivateFrameworks/SpringBoardUI.framework/SpringBoardUI
0x34ad9000 - 0x34b1efff  IMAVCore armv7  <a4dbb6f1203e3f569080707b3a388573> /System/Library/PrivateFrameworks/IMAVCore.framework/IMAVCore
0x34b47000 - 0x34bedfff  GameKit armv7  <844f6d90111f3e81961a723f557dd2a1> /System/Library/Frameworks/GameKit.framework/GameKit
0x34c02000 - 0x34c2cfff  libtidy.A.dylib armv7  <68abd33352613e80a099a46d38704085> /usr/lib/libtidy.A.dylib
0x34c2d000 - 0x34c86fff  EventKit armv7  <0d4e597ee229337183e96e921a72e30a> /System/Library/Frameworks/EventKit.framework/EventKit
0x34c98000 - 0x34c9bfff  MediaRemote armv7  <0804293b2774359189f3a67e2c81558d> /System/Library/PrivateFrameworks/MediaRemote.framework/MediaRemote
0x34cab000 - 0x34cacfff  libremovefile.dylib armv7  <0fa08e1bb47a3d179072a933d1726597> /usr/lib/system/libremovefile.dylib
0x34cbf000 - 0x34cf4fff  AddressBook armv7  <3f2071a77bc134cd82065eef90d4082f> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x34cf5000 - 0x34d20fff  IMFoundation armv7  <f1f21bedbf2e3ea38f692abef0005d76> /System/Library/PrivateFrameworks/IMCore.framework/Frameworks/IMFoundation.framework/IMFoundation
0x34d60000 - 0x34d6afff  ExternalAccessory armv7  <eebb4bdbbefb37419b884ffa011e1dc5> /System/Library/Frameworks/ExternalAccessory.framework/ExternalAccessory
0x34d6b000 - 0x34db2fff  MessageUI armv7  <35a81f5d4eb03467a1447db80337e570> /System/Library/Frameworks/MessageUI.framework/MessageUI
0x34e45000 - 0x34e47fff  Camera armv7  <fd4d53b318ab35ce9bb89db3879120f0> /System/Library/PrivateFrameworks/Camera.framework/Camera
0x34e54000 - 0x34e57fff  IOSurface armv7  <ad50e71624583d06b891344d832f9b08> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
0x34e58000 - 0x34e5afff  libgcc_s.1.dylib armv7  <a2631ac302f4310dae8367939e16b7c2> /usr/lib/libgcc_s.1.dylib
0x34e93000 - 0x34e96fff  CertUI armv7  <9060fe03a4943ef295531feced9a17dd> /System/Library/PrivateFrameworks/CertUI.framework/CertUI
0x34e9f000 - 0x34f48fff  libxml2.2.dylib armv7  <5538d3f2c7d83b88b06168488fe6326b> /usr/lib/libxml2.2.dylib
0x34f8f000 - 0x34fbdfff  MIME armv7  <60de1fe0bbb134d788c09f7c34b1caa4> /System/Library/PrivateFrameworks/MIME.framework/MIME
0x34fdd000 - 0x34fe6fff  ITSync armv7  <ba8b48d061903e4096774344448776d0> /System/Library/PrivateFrameworks/ITSync.framework/ITSync
0x34fe7000 - 0x34ff3fff  SpringBoardServices armv7  <c68262667ac8397a949ce4e92dfec7db> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices
0x350f2000 - 0x351dffff  libiconv.2.dylib armv7  <f4146ce07e3031ea8a81fa5516fd77d0> /usr/lib/libiconv.2.dylib
0x355e1000 - 0x35662fff  libsystem_c.dylib armv7  <17ee3fe220c23b1f898d21ba25b2bcac> /usr/lib/system/libsystem_c.dylib
0x35673000 - 0x35677fff  libGFXShared.dylib armv7  <a0772a32cd8b3b9194bb0c29807c1c5b> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib
0x35678000 - 0x356bafff  CoreAudio armv7  <c972fd5f8e89333ca680b9a33587f896> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x356bb000 - 0x35761fff  Celestial armv7  <407badafc6403692bf099d542d28bf7f> /System/Library/PrivateFrameworks/Celestial.framework/Celestial
0x35766000 - 0x3586efff  CoreData armv7  <9843a401dd1d322383e3e40021cc8b95> /System/Library/Frameworks/CoreData.framework/CoreData
0x3586f000 - 0x35874fff  MobileKeyBag armv7  <8c35c090bc373cb181fc26b961b8dba5> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag
0x35876000 - 0x35893fff  libsystem_info.dylib armv7  <48016be86e3f3cd9aeee1c6590e1ac6f> /usr/lib/system/libsystem_info.dylib
0x358db000 - 0x3598cfff  WebKit armv7  <eb9a0d69c64b3127b2bffd71641add3b> /System/Library/PrivateFrameworks/WebKit.framework/WebKit
0x3598d000 - 0x35ca0fff  GeoServices armv7  <88616f3deada3bb495fc15e3ba58dc83> /System/Library/PrivateFrameworks/GeoServices.framework/GeoServices
0x35ca1000 - 0x35ccafff  MobileCoreServices armv7  <57fef84bdc17301d8bf53ba0fb967fe6> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x35ccb000 - 0x35cccfff  CoreSurface armv7  <7b83cd757da73e6e826693c29296d3fa> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
0x35ccd000 - 0x35cdafff  libbsm.0.dylib armv7  <0a1e2bb78d5138419ecad8ba0fe42fdd> /usr/lib/libbsm.0.dylib
0x35cdb000 - 0x35d97fff  MapKit armv7  <806f9ca7eb593d1998587441ce87a396> /System/Library/Frameworks/MapKit.framework/MapKit
0x35da8000 - 0x35de8fff  CoreMedia armv7  <8e0570582ba535bfa74f1f00eef64376> /System/Library/Frameworks/CoreMedia.framework/CoreMedia
0x35df8000 - 0x35dfefff  BluetoothManager armv7  <7861bc6128d93f72877df2f234434a47> /System/Library/PrivateFrameworks/BluetoothManager.framework/BluetoothManager
0x35dff000 - 0x35e50fff  libsqlite3.dylib armv7  <8a41cc6a6d9332308bc415d27577fd24> /usr/lib/libsqlite3.dylib
0x35e51000 - 0x35e63fff  TelephonyUI armv7  <e2c34b9a391e3384875ac552dbca0ad4> /System/Library/PrivateFrameworks/TelephonyUI.framework/TelephonyUI
0x35f9c000 - 0x35fd0fff  VideoToolbox armv7  <570c63dc3a273a5a8c9072fd5567f5c1> /System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox
0x36133000 - 0x36420fff  libLAPACK.dylib armv7  <b855d60dac01310495453bddfd004f0d> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
0x36428000 - 0x36428fff  libdnsinfo.dylib armv7  <21415179ffa03f949fa8cc851c6c31c7> /usr/lib/system/libdnsinfo.dylib
0x36429000 - 0x36468fff  libSystem.B.dylib armv7  <64cf947dd8423eeeb677f81dd3eb2d9d> /usr/lib/libSystem.B.dylib
0x36469000 - 0x3649efff  ImageCapture armv7  <2c474beec10f3791ac8a1d37df04600f> /System/Library/PrivateFrameworks/ImageCapture.framework/ImageCapture
0x3649f000 - 0x36563fff  libobjc.A.dylib armv7  <a89ef30f6d663254babb6329ce02ca3d> /usr/lib/libobjc.A.dylib
0x36564000 - 0x36567fff  CaptiveNetwork armv7  <fc834fd33a18341ea7506587ad895703> /System/Library/PrivateFrameworks/CaptiveNetwork.framework/CaptiveNetwork
0x36584000 - 0x36597fff  libmis.dylib armv7  <529ea6e3a87230ce9f6cf3285c22429c> /usr/lib/libmis.dylib
0x365a0000 - 0x365b2fff  PersistentConnection armv7  <659ea9d5b13d3fefb37acff09016a69c> /System/Library/PrivateFrameworks/PersistentConnection.framework/PersistentConnection
0x365b3000 - 0x365b5fff  MailServices armv7  <74ae0145ef713c6d91fd8f68885b0a61> /System/Library/PrivateFrameworks/MailServices.framework/MailServices
0x365b6000 - 0x365bafff  AssetsLibraryServices armv7  <e1cbfe599c96369ca4bdb0dd99d3cd9f> /System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices
0x365c6000 - 0x3660ffff  IMCore armv7  <9c1e280e1fa33fa784cad479b9cbd941> /System/Library/PrivateFrameworks/IMCore.framework/IMCore
0x36620000 - 0x36622fff  IOMobileFramebuffer armv7  <683f321680763e519d61541170ba2133> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
0x3662b000 - 0x36638fff  libdispatch.dylib armv7  <9a0511ad5ebc3db898f1f49ed1a73d34> /usr/lib/system/libdispatch.dylib
0x36639000 - 0x36649fff  WebBookmarks armv7  <6956561235333e74b8ff316cb2edc93e> /System/Library/PrivateFrameworks/WebBookmarks.framework/WebBookmarks
0x3664c000 - 0x36651fff  libnotify.dylib armv7  <9d7198e91de9386a9e5ea43608a66a57> /usr/lib/system/libnotify.dylib
0x36685000 - 0x36734fff  QuartzCore armv7  <ef9632c9781f3101916b65e9faae1579> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x36735000 - 0x36738fff  libmacho.dylib armv7  <53908d448e9e32418652a4afee5bc578> /usr/lib/system/libmacho.dylib
0x367fb000 - 0x3682efff  AppSupport armv7  <0217468bd9f839229a47910b7816b3d5> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
0x3682f000 - 0x36836fff  libMobileGestalt.dylib armv7  <55f29184efcc3046bb833dd72a4487e1> /usr/lib/libMobileGestalt.dylib
0x36851000 - 0x36875fff  MediaControl armv7  <1cfc7d79f554357ab59eb69f9efebf07> /System/Library/PrivateFrameworks/MediaControl.framework/MediaControl
0x368c4000 - 0x36948fff  AVFoundation armv7  <eeaf5f4f822436a5bd1655f536e69879> /System/Library/Frameworks/AVFoundation.framework/AVFoundation
0x36949000 - 0x36997fff  GMM armv7  <049361f664eb3f30b0d25cd56ffc1f0f> /System/Library/PrivateFrameworks/GMM.framework/GMM
0x36998000 - 0x36999fff  libsystem_network.dylib armv7  <3e0b7d6754cd33669c0680525f03ede1> /usr/lib/system/libsystem_network.dylib
0x369de000 - 0x36a33fff  libvDSP.dylib armv7  <0221caba81a235c5a896a835e2aac047> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x36a41000 - 0x36a8ffff  CoreMotion armv7  <5e6b884d36d93789b40b7f3876130417> /System/Library/Frameworks/CoreMotion.framework/CoreMotion
0x36a9c000 - 0x36a9efff  CrashReporterSupport armv7  <9e7efa009730322f84bbc5d8bf1ded94> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport
0x36a9f000 - 0x36aadfff  OpenGLES armv7  <5a76beaeaa013f0cbf16e5cb154598ab> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x36aae000 - 0x36ae6fff  IOKit armv7  <80ae313ad69d3363935c88e51a11862d> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x36ae7000 - 0x36aeafff  ActorKit armv7  <f7aa6cdd654231988aafcf448978f450> /System/Library/PrivateFrameworks/ActorKit.framework/ActorKit
0x36aeb000 - 0x36b0bfff  PrintKit armv7  <e5a01ca9083a36afacc08611a398e2ad> /System/Library/PrivateFrameworks/PrintKit.framework/PrintKit
0x36b1f000 - 0x36b21fff  Marco armv7  <53203fa831ab34f894f3a3811bf3917c> /System/Library/PrivateFrameworks/Marco.framework/Marco
0x36ccd000 - 0x36cd9fff  HomeSharing armv7  <2df6957cdfea31aea12eebf27ca1691c> /System/Library/PrivateFrameworks/HomeSharing.framework/HomeSharing
0x36cda000 - 0x36d16fff  libGLImage.dylib armv7  <9d97699e44ee3651ba4ac37e5adec35b> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib
0x36d85000 - 0x36e0ffff  Message armv7  <2cce1aa95a493906bb0227197f9e4b96> /System/Library/PrivateFrameworks/Message.framework/Message
0x36e57000 - 0x36ef4fff  AddressBookUI armv7  <e354aeb3d96e30338e90cc3638ffe81b> /System/Library/Frameworks/AddressBookUI.framework/AddressBookUI
0x36ef5000 - 0x36ef5fff  vecLib armv7  <0c60cd0a60f43d2791d36cb357d30e3c> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
Comment 15 Rolf Bjarne Kvinge [MSFT] 2011-09-13 03:42:17 UTC
This is the same crash you had earlier.

a) It seems to be a crash in a static constructor, do you have any of those in your project?

b) Can you try re-uploading (only) a working version to see if it starts crashing?

c) You can re-uploading doesn't make a difference, it's something that changes in the app itself, which means we can create two app, one that works and one that doesn't and compare the difference. The easiest way is probably to copy your entire solution to another directory, and have one solution with a working build and the other with the crashing build, and just manually upload each version for testing (without rebuilding). Then you can compare the two app directories using diff (or maybe send the failing app dir to us? If possible it would likely be a lot faster)
Comment 16 Dominique NORMAND 2011-09-13 16:47:30 UTC
a) Yes, we have many static fields and constructors. In .NET the static constructor are supposed to be executed the first time you access the class. Is it the same in MonoTouch? Also should I look into the main application or all the assemblies?

b) once good, always good. Once bad, always bad.

c) I saved a crashing app. Once Zipped it's about 45MB. Should I upload it here or is 45 MB too big ?

d) Maybe this isn't related, maybe it is but I changed some stuff around in the app (related to static fields & constructor) and now it fails later in the C# code. I was even able to break on exception and took some screenshot (attached). It fails on the line XmlDocument document = new XmlDocument() with a NullReference exception, but the call stack shows XmlDocument.Validate.
Comment 17 Dominique NORMAND 2011-09-13 16:48:18 UTC
Created attachment 353 [details]
Break on Exception in MonoDevelop
Comment 18 Dominique NORMAND 2011-09-13 16:48:42 UTC
Created attachment 354 [details]
Break on Exception in MonoDevelop 2
Comment 19 Rolf Bjarne Kvinge [MSFT] 2011-09-13 17:22:02 UTC
a) It's the same in MonoTouch, but exact moment may be different from .NET (.NET doesn't guarantee the exact moment either, they just say "before the first access to the class"). I'd recomment doing point c) first though, this might be a red herring.

b) That's definitively good.

c) 45mb is too big unfortunately, can you publish it on a web site and send the link to us (this can of course be done through the support request you have open, or you can send me the link directly). Please publish a working app too if you can.

d) This definitively looks strange, it's probably not related though since long after the startup code that was crashing earlier.
Comment 20 Rolf Bjarne Kvinge [MSFT] 2011-09-14 05:44:24 UTC
I can confirm that the bad build you sent me crashes the exact same way it does for you.

a) Release builds tend to be smaller than debug builds, so this might be the difference. Your application is enormous compared to most other applications (195 mb installed, the main binary is 103 mb), this might be triggering a bug in our native code generation nobody else has run into yet. Sorry to ask about this again, but if you can't send a working build, can you send the MIIPhone file from a working build? That way I can compare the generated assembly code to see if it changes between builds.

b) Have you tried enabling the llvm-optimizing compiler (even for a debug build)? This could confirm the hypothesis in a) (different compiler, most likely it would also produce a smaller binary)
Comment 21 Brian LeBaron 2011-09-21 13:35:03 UTC
I am seeing this same issue with my application. I can open a new bug if needed. The app is also large and I AM using a 3rd party library. It always runs fine in the simulator but more often then not will not run on actual hardware. Doing a complete rebuild sometimes makes it work. What causes it to work seems to be random. Once we have a build that will run it always runs. The same is true for a build that won't run, it never runs.

In addition to the "exited abnormally with signal 6: Abort trap: 6" error I also see a "segmentation fault 11" which appears to be caused by a stack overflow. Looking at the log the same memory offsets are repeated multiple times before it fails.

The same thing happens using the LLVM compiler.


Date/Time:       2011-09-21 11:24:35.809 -0600
OS Version:      iPhone OS 4.3.5 (8L1)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x2fd00eac
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   MyApp                     	0x0148cb94 0x1000 + 21543828
1   MyApp                     	0x014efcc8 0x1000 + 21949640
2   MyApp                     	0x0150a850 0x1000 + 22059088
3   MyApp                     	0x0150a808 0x1000 + 22059016
4   MyApp                     	0x0150ade8 0x1000 + 22060520
5   MyApp                     	0x0149c1c0 0x1000 + 21606848
6   MyApp                     	0x0149d70c 0x1000 + 21612300
7   MyApp                     	0x014c8908 0x1000 + 21788936
8   MyApp                     	0x01476ffc 0x1000 + 21454844
9   MyApp                     	0x01581148 0x1000 + 22544712
10  MyApp                     	0x01579320 0x1000 + 22512416
11  MyApp                     	0x0150a8c0 0x1000 + 22059200
12  MyApp                     	0x0150a808 0x1000 + 22059016
13  MyApp                     	0x0150ade8 0x1000 + 22060520
14  MyApp                     	0x0149c1c0 0x1000 + 21606848
15  MyApp                     	0x0149d70c 0x1000 + 21612300
16  MyApp                     	0x014c8908 0x1000 + 21788936
17  MyApp                     	0x01476ffc 0x1000 + 21454844
18  MyApp                     	0x01581148 0x1000 + 22544712
19  MyApp                     	0x01579320 0x1000 + 22512416
20  MyApp                     	0x0150a8c0 0x1000 + 22059200
21  MyApp                     	0x0150a808 0x1000 + 22059016
22  MyApp                     	0x0150ade8 0x1000 + 22060520
23  MyApp                     	0x0149c1c0 0x1000 + 21606848
24  MyApp                     	0x0149d70c 0x1000 + 21612300
25  MyApp                     	0x014c8908 0x1000 + 21788936
26  MyApp                     	0x01476ffc 0x1000 + 21454844
27  MyApp                     	0x01581148 0x1000 + 22544712
28  MyApp                     	0x01579320 0x1000 + 22512416
29  MyApp                     	0x0150a8c0 0x1000 + 22059200
30  MyApp                     	0x0150a808 0x1000 + 22059016
31  MyApp                     	0x0150ade8 0x1000 + 22060520
32  MyApp                     	0x0149c1c0 0x1000 + 21606848
33  MyApp                     	0x0149d70c 0x1000 + 21612300
34  MyApp                     	0x014c8908 0x1000 + 21788936
35  MyApp                     	0x01476ffc 0x1000 + 21454844
36  MyApp                     	0x01581148 0x1000 + 22544712
37  MyApp                     	0x01579320 0x1000 + 22512416
38  MyApp                     	0x0150a8c0 0x1000 + 22059200
39  MyApp                     	0x0150a808 0x1000 + 22059016
40  MyApp                     	0x0150ade8 0x1000 + 22060520
41  MyApp                     	0x0149c1c0 0x1000 + 21606848
42  MyApp                     	0x0149d70c 0x1000 + 21612300
43  MyApp                     	0x014c8908 0x1000 + 21788936
44  MyApp                     	0x01476ffc 0x1000 + 21454844
45  MyApp                     	0x01581148 0x1000 + 22544712

*** this continues for 450 more frames ***
Comment 22 Rolf Bjarne Kvinge [MSFT] 2011-09-21 16:06:58 UTC
Brian, can we get access to your application somehow?
Comment 23 Brian LeBaron 2011-09-22 13:52:04 UTC
I'm working on getting you access to the application. Is there anything else I can look at in the meantime as a possible workaround?
Comment 24 Rolf Bjarne Kvinge [MSFT] 2011-09-22 15:12:25 UTC
Brian, unfortunately we don't know enough about it to have a possible workaround.
Comment 26 Rolf Bjarne Kvinge [MSFT] 2011-09-23 18:55:30 UTC
Brian, I can confirm that there is a build that works and one that doesn't in that zip file. I'm investigating right now, but I don't think I'll figure out something until next week since it's getting late here.
Comment 27 Rolf Bjarne Kvinge [MSFT] 2011-09-26 16:32:59 UTC
Brian, unfortunately I haven't been able to pinpoint the reason for the crashes. The difference in the main binary is quite big betwen the crashing and the working version (a diff between disassembled code of the binaries give a 900mb file), so I'm afraid I'll need access to the source code to track it down (we'll be happy to sign an NDA if you contact us at support@xamarin.com).
Comment 28 Brian LeBaron 2011-09-27 11:41:25 UTC
That's interesting. The only change I made between those two builds was a single space to force it to recompile. 

I was able to get things working by compiling our static library for Armv7 only and then using llvm to compile in MonoDevelop. I'm not sure why this works and nothing else does. I was able to strip the app down to the point where it was a simple MonoTouch project that linked to our static library. I kept getting the same errors until I switched everything to Armv7. The lib is around 17 MB in size.
Comment 31 Rolf Bjarne Kvinge [MSFT] 2011-09-29 03:45:48 UTC
Brian,

I have built your project a lot of times, and it *always* crashes, I have not been able to create a build that runs on device (in which case it's a different issue than the one this bug is about).

For the crash I'm seeing: you must ensure you disable thumb support when compiling the static library.
Comment 32 Brian LeBaron 2011-09-29 10:21:16 UTC
Turning off thumb was something I stumbled into on another post. Compile for Thumb is set to off. Are there any other requirements for building the library? Compiler, Arch, etc...
Comment 33 Rolf Bjarne Kvinge [MSFT] 2011-09-29 11:05:26 UTC
I disassembled the universal binary, and there are thumbs instructions in it.
Comment 34 Brian LeBaron 2011-09-29 12:17:06 UTC
I've double checked the settings and it is set to off. I've done a clean and recompiled the library. I've attached a screenshot of the settings in case I am missing something.
Comment 35 Brian LeBaron 2011-09-29 12:17:49 UTC
Created attachment 535 [details]
Thumb settings
Comment 36 Brian LeBaron 2011-09-29 12:23:12 UTC
I am only able to get the app to launch if I set it to Link All and then set the compiler to LLVM Armv7 only.
Comment 37 Rolf Bjarne Kvinge [MSFT] 2011-09-29 17:29:52 UTC
I ran this test: http://lists.ximian.com/pipermail/monotouch/2011-September/005393.html against your library, and indicated that it is thumb.

In any case this is a different issue from the originally reported and what you had first too, when you could fix the crash by just rebuilding, without any other changes. I suspect the original, random, crash went away when you tried to reduce your project into a smaller test case.
Comment 38 Alan McGovern 2011-10-25 07:20:54 UTC
IS this still an issue or has it been resolved?
Comment 39 Rolf Bjarne Kvinge [MSFT] 2011-10-25 07:35:23 UTC
It hasn't been fixed, but we're lacking a test case can use to track it down.
Comment 40 Rolf Bjarne Kvinge [MSFT] 2011-10-31 08:43:09 UTC
Actually I think it's a dup of #707, marking as such.

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