Bug 15947 - IOS App crash only when users get it from apple store
Summary: IOS App crash only when users get it from apple store
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 7.0.4.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 7.0.6
Assignee: Alex Soto [MSFT]
Depends on:
Reported: 2013-11-05 17:57 UTC by RMC
Modified: 2013-12-17 08:16 UTC (History)
4 users (show)

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

Crash Report (31.18 KB, application/octet-stream)
2013-11-05 17:57 UTC, RMC
Debug Build Log (10.18 KB, text/rtf)
2013-11-06 02:26 UTC, RMC
Release Build Log with debug option on (10.29 KB, text/rtf)
2013-11-06 02:27 UTC, RMC
Release Build Log without debug option on (1.62 KB, text/rtf)
2013-11-06 02:28 UTC, RMC
Log Crash Report (31.76 KB, text/rtf)
2013-11-06 02:34 UTC, RMC

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:

Description RMC 2013-11-05 17:57:53 UTC
Created attachment 5341 [details]
Crash Report

I've put an app recently (2 days) in apple store. Running it in simulator or device everything is ok, but the version that is in apple store (approved and ready to sell) is crashing (and i cannot reproduce the crash...please see the attachment).

Now after trying to resolve the problem, i used the “Release” option to try to get the crash and when i run the app in my device, the crash happens like in the distribution version.

The way i resolve the  problem was: I went to the menu project options and I turn on "Enable debugging” to Configuration “Release” and stop crashing….and now? is that a bug from Xamarin? I have to turn on "Enable debugging” to the Configuration “Distribution” too and then release n update to the apple store?  

My costumers are complain about the crash!

(i'm usin the last versions - stable - of Xamarin)
Comment 1 Sebastien Pouliot 2013-11-05 18:38:43 UTC
The attached crash report is not symbolicated properly. That makes it impossible to tell you what could be wrong without additional information.

The most common reason* for getting Release to crash is when some build options (e.g. additional mtouch arguments) differs from your Debug build. It's common to add some options when developing (using the Debug configuration) and forget to copy them into the Release configuration (when needed, some are obviously for debug-only).

Still your description about just enabling debug in the Release configuration should not lead to this problem. Just to be 100% sure could you compare your options ? if nothing stands out then build for Debug and Release and attach both build logs to the bug report.

Now there was also an issue with (fixed in .215+) that only affected release builds. However this version was only available on the alpha channel (not on the stable channel) so it should not have affected you.

Please include all of your version informations like explained below. This information is very useful for us to try to understand and, if needed duplicate, any issue you might have.

The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).
Comment 2 RMC 2013-11-06 02:26:40 UTC
Created attachment 5344 [details]
Debug Build Log
Comment 3 RMC 2013-11-06 02:27:39 UTC
Created attachment 5345 [details]
Release Build Log with debug option on
Comment 4 RMC 2013-11-06 02:28:06 UTC
Created attachment 5346 [details]
Release Build Log without debug option on
Comment 5 RMC 2013-11-06 02:29:18 UTC
The version of my Xamarin is 4.0.13 (build 38):

=== Xamarin Studio ===

Version 4.0.13 (build 38)
Installation UUID: e565c25a-4046-410a-875f-f1bb2a047183
	Mono 3.2.3 ((no/8d3b4b7)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (
	Package version: 302030000

=== Apple Developer Tools ===

Xcode 5.0 (3332.22)
Build 5A1412

=== Xamarin.iOS ===

Version: (Indie Edition)
Hash: 57edee2
Build date: 2013-04-10 18:05:51-0400

=== Xamarin.Android ===

Version: 4.8.3 (Starter Edition)
Android SDK: /Users/rmcaldeira/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
Java SDK: /usr
No Java runtime present, requesting install.

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Build Information ===

Release ID: 400130038
Git revision: 07afec667f7be5d0ee511eb7115bbac6377fbae8
Build date: 2013-09-24 08:53:29+0000
Xamarin addins: 61140345a5b109633a94409edcbc7a4c19a425c6

=== Operating System ===

Mac OS X 10.9.0
Darwin rmcaldeira-pcmac.home 13.0.0 Darwin Kernel Version 13.0.0
    Thu Sep 19 22:22:27 PDT 2013
    root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Comment 6 RMC 2013-11-06 02:34:54 UTC
Created attachment 5347 [details]
Log Crash Report
Comment 7 Sebastien Pouliot 2013-11-06 08:02:57 UTC

Your debug log build is for the simulator, not a device, so it's a different configuration (and what I can compare does not help). I assume the Debug|iPhone configuration works, right ?

Your "Release without Debug options" log is incomplete. It's probably just resigned an already build (cached) application. You'll need to clean first (and then build it) to get the log. Could you attach an updated log ?

From the rest of the information I suspect two things:

a) one is a the native linker stips some symbols that are required at runtime. Can you try rebuilding (without the debug) while adding `--nosymbolstrip` to the "Additional mtouch arguments" of your Project's options.

b) The trial version of IG.dll or IGChart.dll(/InfragisticsNucliOS-2013.1-trial/) detects (incorrectly?) it's being used in a release build.

One last bit of information that would be useful: Get the console log of the device (using Xcode) when the application is executed (and crash) on a device. The mono runtime (and libraries) will often write some additional logs there just before the crash occurs (and this is not part of the crash report).
Comment 8 RMC 2013-11-06 14:25:19 UTC

adding `--nosymbolstrip` works!!

No i have do build the distribution with this option? is this normal?
Comment 9 Sebastien Pouliot 2013-11-06 14:54:56 UTC
It's not normal (and not optimal, the app wil be bigger) but it's likely not a Xamarin.iOS bug either. 

It's very likely a bug in one of the binding projects you're referencing. The binding projects should include the the (native) linker instructions to ensure this does not happen.

Are those the latest versions from the component store ?

* Components/XFINIUM.PDF-3.3.0/lib/ios/Xfinium.Pdf.Xamarin.iOS.dll
* Components/InfragisticsNucliOS-2013.1-trial/lib/ios/IG.dll
* Components/InfragisticsNucliOS-2013.1-trial/lib/ios/IGChart.dll
* Components/btprogresshud-1.5/lib/ios/BTProgressHUD.dll

c.c. Alex as he might already be aware of this.

note: it's important to test the Release build before sending the AppStore build to Apple. Those builds should be identical (unless you changed their configuration) expect for the signing identity (and provisioning profile).
Comment 10 Alex Soto [MSFT] 2013-11-06 15:30:29 UTC
Hello, there is a known issue with XFINIUM.PDF and we have reported this to the component vendor, he is working on a fix and hopefully it will be available shortly.

Comment 11 Sebastien Pouliot 2013-11-06 17:09:45 UTC
ALex, I'm assigning to you. Please close this when an updated component version is available.
Comment 12 Alex Soto [MSFT] 2013-11-12 11:55:31 UTC
Hello, new version of XFINIUM.PDF  is available in the store. 


Comment 13 Sebastien Pouliot 2013-11-12 13:05:37 UTC
Comment 14 PJ 2013-12-11 18:45:51 UTC
This fix is planned to be released with Xamarin.iOS 7.0.6, which should hit the beta channel before December 23rd.
Comment 15 Akhilesh kumar 2013-12-17 08:16:53 UTC
As per comment 12 and comment 13, new version of XFINIUM.PDF  is available in the store.

Hence closing this issue.