Bug 52365 - App crashes in Release mode
Summary: App crashes in Release mode
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 10.4 (C9)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-02-07 17:03 UTC by Tom Harvey
Modified: 2017-02-08 11:52 UTC (History)
4 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Tom Harvey 2017-02-07 17:03:26 UTC
My app is crashing in release mode only

Switching Link behaviour to "Don't Link" fixes the issue (as described in the following document)

https://developer.xamarin.com/guides/ios/advanced_topics/linker/

That link suggested that this shouldn't happen and to report it as a bug.

Here is the the stack trace from the device console

Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: error: Failed to load AOT module 'Microsoft.CSharp' while running in aot-only mode because a dependency cannot be found or it is out of date.
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: Stacktrace:
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 
Native stacktrace:
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 0   testApp.iOS                    0x0000000100106fc4 testApp.iOS + 241604
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 1   libsystem_platform.dylib            0x000000018c0ad348 _sigtramp + 52
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 2   libsystem_pthread.dylib             0x000000018c0b3450 pthread_kill + 112
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 3   libsystem_c.dylib                   0x000000018bf5f400 abort + 140
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 4   testApp.iOS                    0x0000000100223204 xamarin_get_block_descriptor + 5064
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 5   testApp.iOS                    0x000000010021a9cc testApp.iOS + 1370572
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 6   testApp.iOS                    0x00000001000d1950 testApp.iOS + 22864
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 7   testApp.iOS                    0x0000000100125754 testApp.iOS + 366420
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 8   testApp.iOS                    0x00000001001252a4 testApp.iOS + 365220
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 9   testApp.iOS                    0x0000000100227094 xamarin_GetFolderPath + 2652
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 10  testApp.iOS                    0x0000000100128014 testApp.iOS + 376852
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 11  testApp.iOS                    0x0000000100124628 testApp.iOS + 362024
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 12  testApp.iOS                    0x00000001000d980c testApp.iOS + 55308
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 13  testApp.iOS                    0x00000001000d18dc testApp.iOS + 22748
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 14  testApp.iOS                    0x0000000100125754 testApp.iOS + 366420
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 15  testApp.iOS                    0x00000001001252a4 testApp.iOS + 365220
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 16  testApp.iOS                    0x0000000100227094 xamarin_GetFolderPath + 2652
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 17  testApp.iOS                    0x0000000100128014 testApp.iOS + 376852
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 18  testApp.iOS                    0x0000000100124628 testApp.iOS + 362024
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 19  testApp.iOS                    0x00000001000d980c testApp.iOS + 55308
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 20  testApp.iOS                    0x00000001000d18dc testApp.iOS + 22748
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 21  testApp.iOS                    0x0000000100125754 testApp.iOS + 366420
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 22  testApp.iOS                    0x00000001001252a4 testApp.iOS + 365220
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 23  testApp.iOS                    0x0000000100227094 xamarin_GetFolderPath + 2652
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 24  testApp.iOS                    0x0000000100128014 testApp.iOS + 376852
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 25  testApp.iOS                    0x0000000100124628 testApp.iOS + 362024
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 26  testApp.iOS                    0x00000001000d980c testApp.iOS + 55308
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 27  testApp.iOS                    0x00000001000d18dc testApp.iOS + 22748
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 28  testApp.iOS                    0x0000000100125754 testApp.iOS + 366420
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 29  testApp.iOS                    0x00000001001252a4 testApp.iOS + 365220
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 30  testApp.iOS                    0x000000010022273c xamarin_get_block_descriptor + 2304
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 31  testApp.iOS                    0x00000001002228bc xamarin_get_block_descriptor + 2688
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 32  testApp.iOS                    0x00000001002274d8 xamarin_GetFolderPath + 3744
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 33  testApp.iOS                    0x0000000100edd360 WriteZStream + 13326432
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 34  libdyld.dylib                       0x000000018bed95b8 <redacted> + 4
Feb  7 16:23:11 testIPad testApp.iOS[863] <Notice>: critical: 
=================================================================
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.
=================================================================
Comment 1 Rodrigo Kumpera 2017-02-07 18:42:32 UTC
This is a linker bug.
Comment 2 Zoltan Varga 2017-02-07 19:49:52 UTC
It's also possible that the app is loading assembly dynamically using Assembly.Load () or such.
Comment 3 Manuel de la Peña [MSFT] 2017-02-08 09:20:02 UTC
@Tom can you confirm that you are not doing anything dynamically as @Zoltan mentioned. Is there a way we could access your code base or have a small test that shows the issue?
Comment 4 Tom Harvey 2017-02-08 11:14:57 UTC
I've just reproduced the problem again by switching link behaviour back to "Link Framework SDK's Only". Was about to recreate the issue an an isolated project when another Xamarin update came through. I've installed that update and it's working now!

I'll let you know if I get this again. Thanks
Comment 5 Manuel de la Peña [MSFT] 2017-02-08 11:52:33 UTC
Ok, great news then, I'll close the bug for now and feel free to reopen it if the issue reappears.