Bug 928 - Debug build works, Release build fails/crash when submitting to Apple Store
Summary: Debug build works, Release build fails/crash when submitting to Apple Store
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2011-09-20 09:17 UTC by Sebastien Pouliot
Modified: 2011-10-12 16:31 UTC (History)
2 users (show)

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

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

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

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


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

Related Links:
Status:
RESOLVED FIXED

Description Sebastien Pouliot 2011-09-20 09:17:11 UTC
Split from bug report #921

> I have major issue trying to get this app to be approved
> by appstore. They claim it crashes upon load. In my Debug builds, I experience
> no crash on load. But in Release build I do. Realize this is a bit off bug
> topic but don't know what I can do to remedy and get app past this seemingly
> last hurtle. App is working out in field in daily basis as released through
> Debug build to testflight to over 50 users. Any Suggestions? 

Here are a few suggestions:

a) make sure your project settings are identical between your "Debug" and "Release" builds. Change made to one during development are sometimes forgotten and not copied to the other configuration (e.g. adding some "extra mtouch arguments" for linking native libraries).

b) try some variations on the linker settings (even if they are identical, and they should be, between your device Debug and Release builds).

c) Attach your application to this bug report. You can mark it as private (attachment or we can turn the whole bug private) so only Xamarin's employee we'll be able to see it (or you can send it to us out-of-band). You can also contact support@xamarin.com to ask for an NDA document. With basic instructions like "this works when using Debug builds while it fails with a Release build" we should be able to help you pinpoint your issue.
Comment 1 Mark H 2011-09-20 11:42:35 UTC
Sebastien:
Compressed source is 68mb. Cannot upload via bugzilla. Is the alternate way to get app to you? I did try various link methds and compiler settings without change in situation.
Comment 2 Sebastien Pouliot 2011-09-20 11:47:22 UTC
Yeah it's a bit big our bugzilla to digest :-) but we have good experience using some web space providers such as https://www.sendthisfile.com/ - simply add the link here on the bug report (mark it as private). Thanks!
Comment 5 Mark H 2011-09-21 08:05:08 UTC
Hi Sebastien, Just want to make sure you received message with link to file download?
Thanks.
Comment 6 Sebastien Pouliot 2011-09-21 08:07:54 UTC
Mark, yes I got (and download) it. I'll try to deplicate the "release" crash this morning and will add any findings/questions on this bug report. Thanks!
Comment 7 Sebastien Pouliot 2011-09-21 08:33:06 UTC
"AppStore|iPhone" contains "-debug=all" in "extra mtouch arguments" (not sure why - but it did not change anything for me). 

If I remove that and use my own (Developer) certificate I get a crash at startup.

Using "/Developer/MonoTouch/usr/bin/mtouch --logdev" in a terminal window* I see:
* you can see it from MD using the "iOS Device Log" pad

Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: Application crashed 2011-09-21 08:32:41
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: Terminating: True
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: System.NotImplementedException: Derived classes must implement it
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at System.Reflection.Module.IsResource () [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at System.Reflection.MonoAssembly.GetModules (Boolean getResourceModules) [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at System.Reflection.Assembly.GetModules () [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Configuration.get_ApplicationPath () [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Configuration.GetAppRelativePath (System.String[] relativePath) [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Configuration.OpenDataConfig (System.String fileName) [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Program.DebugCheckDBVersion (IDatabase db, System.String databasePath, System.Boolean& exists) [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Program.InitializeDatabase () [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Program.Main () [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: ------------------------------------------
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: [ERROR] FATAL UNHANDLED EXCEPTION: System.NotImplementedException: Derived classes must implement it
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at System.Reflection.Module.IsResource () [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at System.Reflection.MonoAssembly.GetModules (Boolean getResourceModules) [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at System.Reflection.Assembly.GetModules () [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Configuration.get_ApplicationPath () [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Configuration.GetAppRelativePath (System.String[] relativePath) [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Configuration.OpenDataConfig (System.String fileName) [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Program.DebugCheckDBVersion (IDatabase db, System.String databasePath, System.Boolean& exists) [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Program.InitializeDatabase () [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>:   at MobileBusiness.Program.Main () [0x00000] in <filename unknown>:0
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: Terminating runtime due to unhandled exception
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: Stacktrace:
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: Native stacktrace:
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	0   MobileForce3MonoTouch               0x00a2be98 MobileForce3MonoTouch + 10661528
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	1   MobileForce3MonoTouch               0x00a53394 MobileForce3MonoTouch + 10822548
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	2   libsystem_c.dylib                   0x32c9b72f _sigtramp + 42
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	3   libsystem_c.dylib                   0x32c903bb pthread_kill + 58
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	4   libsystem_c.dylib                   0x32c88bff abort + 78
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	5   MobileForce3MonoTouch               0x00b6ae58 MobileForce3MonoTouch + 11968088
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	6   MobileForce3MonoTouch               0x00b6af10 MobileForce3MonoTouch + 11968272
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	7   MobileForce3MonoTouch               0x00a0d7b8 MobileForce3MonoTouch + 10536888
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	8   MobileForce3MonoTouch               0x00a2b238 MobileForce3MonoTouch + 10658360
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	9   MobileForce3MonoTouch               0x00a2bb20 MobileForce3MonoTouch + 10660640
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	10  MobileForce3MonoTouch               0x00a51398 MobileForce3MonoTouch + 10814360
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	11  MobileForce3MonoTouch               0x006c308c MobileForce3MonoTouch + 7086220
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	12  MobileForce3MonoTouch               0x005d3610 MobileForce3MonoTouch + 6104592
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	13  MobileForce3MonoTouch               0x005cbd48 MobileForce3MonoTouch + 6073672
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	14  MobileForce3MonoTouch               0x00066a74 MobileForce3MonoTouch + 416372
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	15  MobileForce3MonoTouch               0x00066ad4 MobileForce3MonoTouch + 416468
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	16  MobileForce3MonoTouch               0x00067044 MobileForce3MonoTouch + 417860
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	17  MobileForce3MonoTouch               0x0041caa0 MobileForce3MonoTouch + 4307616
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	18  MobileForce3MonoTouch               0x0041cc98 MobileForce3MonoTouch + 4308120
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	19  MobileForce3MonoTouch               0x0041c5a4 MobileForce3MonoTouch + 4306340
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	20  MobileForce3MonoTouch               0x00684714 MobileForce3MonoTouch + 6829844
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	21  MobileForce3MonoTouch               0x00a11870 MobileForce3MonoTouch + 10553456
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	22  MobileForce3MonoTouch               0x00b00378 MobileForce3MonoTouch + 11531128
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	23  MobileForce3MonoTouch               0x00b03334 MobileForce3MonoTouch + 11543348
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	24  MobileForce3MonoTouch               0x00b02390 MobileForce3MonoTouch + 11539344
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	25  MobileForce3MonoTouch               0x00a1905c MobileForce3MonoTouch + 10584156
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	26  MobileForce3MonoTouch               0x00a0bdc8 MobileForce3MonoTouch + 10530248
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: 	27  MobileForce3MonoTouch               0x00002944 MobileForce3MonoTouch + 6468
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: =================================================================
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: Got a SIGABRT while executing native code. This usually indicates
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: a fatal error in the mono runtime or one of the native libraries
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: used by your application.
Sep 21 08:32:41 unknown UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285][21605] <Notice>: =================================================================
Sep 21 08:32:42 unknown ReportCrash[21608] <Notice>: Formulating crash report for process MobileForce3MonoTouch[21605]
Sep 21 08:32:42 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285]) Job appears to have crashed: Abort trap: 6
Sep 21 08:32:42 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:net.amtechsoftware.MobileForceSales[0x6285]) Throttling respawn: Will start in 2147483645 seconds
Sep 21 08:32:42 unknown SpringBoard[30] <Warning>: Application 'MobileForce' exited abnormally with signal 6: Abort trap: 6


However enabling debugging (in the options) only makes MD show me a dialog the the same NotImplementedException. I tried to build the "Release|iPhone" build but got some compiler errors (I assume some #if are out-of-sync).

Could you give me specific instructions on how your get your Debug build working (and how the Release build fails) ? Thanks
Comment 8 Mark H 2011-09-21 09:45:44 UTC
I must have broke something yesterday in trying to get AppStore Build to work. Actually only code change I did was in MobileBusiness.Data/Configuration.cs
I added try catch to OpenResourceConfig method. All other changes where in compiler settings. 
Let me check into this.
Comment 9 Mark H 2011-09-21 11:38:33 UTC
Sebastien:
I unzipped the package sent to you and was able to change my Active Config to Debug|iPhone Clean all then build for debug. Upload to Devidce and the application ran presented splash then main menu. Also able to just click Debug icon on toolbar that allows to upload to device and then debug.
Did not do any code changes to get this to work, just opened MD changed Active Config on toolbar and then clean build (as I go no output message on 1st build attempt). Sometimes when I get the No output I have to go out of MD then back in do a clean build then a build.
Comment 10 Sebastien Pouliot 2011-09-21 16:21:15 UTC
Sorry, I must have done something wrong the first time (likely when changing the identity/provisioning profile). I have reverted and I don't get the same error for "Debug|iPhone".

However i get the same exception as before - but it's similar (but not identical) to something else we fixed a while ago. You're on 4.0.3 like bug #921 mentioned right ?
Comment 11 Mark H 2011-09-21 16:27:51 UTC
Yes on that release 4.0.3. I just think I noticed something. I went back through the Output settings on some of the projects, noticed that somehow Debug|Iphone and AppStore|Iphone  config outputs were corrupted on some of the projects. They were set to proper values on the Debug |Iphone Sim config. I changed these to correct value (about 4 projects were messed) and it buit and loaded to device under the Appstore config without a crash. So I guess that was it?
Comment 12 Sebastien Pouliot 2011-09-21 17:05:00 UTC
*** mid-air conflict *** below was written before comment #11 ***

Ok, found and fixed the other issue that gave me the exception. I was able to build "Debug|iPhone" and execute it, see the menu...

Trying "Release|iPhone" I get back my previous compilation errors (I guess that was my error earlier). It seems that "MobileBusiness.Services.MonoTouch" miss its MONOTOUCH define in "Release". Adding the define fixed the build.

> They claim it crashes upon load. In my Debug builds, I experience
> no crash on load. But in Release build I do.

However I did not get any crash when I executed the application on my device (iPad 1st gen). Any clue on how to duplicate ?

*** after comment #11 ***

I honestly don't know since I could not reproduce/see the issue myself :( I was either unable to compile release or got a successful build and execution. I sure hope it does fix it (since it worked on debug builds).

I'll leave the bug open (as NEEDINFO) to let you time to test it further (in case it's intermittent) and submit your application back to Apple. Let me know the outcome!
Comment 13 Mark H 2011-09-21 17:11:07 UTC
Thanks Sebastien for your tenacious efforts and help!!! Appreciate the help as I need to get off the Testflight thing and having to rebuild every 90 days when provision runs out.

I tested app functionality out and resubmitted to appstore. Now its the waiting game again.
Comment 14 Sebastien Pouliot 2011-10-12 16:31:11 UTC
Hey Mark, I just saw your app on the appstore while updating my apps. I assume we can close the bug report :-) Congratulations!