Bug 556 - App crashes on startup: code_size not met
Summary: App crashes on startup: code_size not met
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-08-30 19:25 UTC by Andrew Young
Modified: 2013-12-05 18:35 UTC (History)
3 users (show)

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


Attachments
symbolicated crash report (24.46 KB, text/plain)
2011-09-27 13:31 UTC, Andrew Young
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 NORESPONSE

Description Andrew Young 2011-08-30 19:25:37 UTC
Sometimes after deploying the app to the device it will crash as soon as I invoke the app to startup. Console log says this:

Stacktrace:
  at System.Uri.GetDefaultPort (string) <0x0000b>
* Assertion at ../../../../../mono/mono/mini/aot-runtime.c:2215, condition `(guint8*)addr < (guint8*)jinfo->code_start + jinfo->code_size' not met
(UIKitApplication:com.saambaa.mobile[0x4ea]) Exited with exit code: 1
Application 'QA' exited abnormally with exit status 1

Cleaning the proj/sln then rebuilding, redeploying usually fixes this error and it will run again.

MonoTouch: 4.1.0.1313530435
Mono: 2.10.5
MonoDevelop: 2.6 RC2
Comment 1 Sebastien Pouliot 2011-08-30 20:25:31 UTC
Weird. The executable code itself does not (and cannot) change.

Is your application saving data that it reloads each time it's started ? That could explain why "it works, it crash, redeploy, it works again". 

It there anything else, before those line, in your crash about your application (or any other error) that repeats itself between crashes ?
Comment 2 Andrew Young 2011-08-31 12:40:59 UTC
The app occasionally saves data to a SQLite DB it reloads that data when the app starts again.

I did not notice anything unusual before those lines. But I'll try to pay more attention to it the next time it happens.
Comment 3 Andrew Young 2011-09-02 13:35:02 UTC
Happened again. I copied a little more of the console logs here. Perhaps it has to do with the TestFlight SDK that I recently started using. The SDK is a crash reporter. It records crashes and tries to send them out before the app is terminated. But if it didn't get enough time to send it out, it will try sending again when the app starts up the next time.

 TestFlight: Started Session
 TestFlight: Crash Handlers are installed
 CaptiveNetworkSupport:UIAllowedNotifyCallback:70 uiallowed: true
 Stacktrace:
   at System.Uri.GetDefaultPort (string) <0x0000b>
 * Assertion at ../../../../../mono/mono/mini/aot-runtime.c:2215, condition `(guint8*)addr < (guint8*)jinfo->code_start + jinfo->code_size' not met
 TestFlight: Team Token is recognized
 (UIKitApplication:com.saambaa.mobile[0xd00a]) Exited with exit code: 1
 Application 'QA' exited abnormally with exit status 1
 CaptiveNetworkSupport:UIAllowedNotifyCallback:70 uiallowed: false
 2ff9f000 handle_connection: Could not receive USB message #6 from mtouch. Killing connection
Comment 4 Andrew Young 2011-09-02 13:43:09 UTC
One more thing to note is that normally doing a clean proj then redeploy doesn't help. You kind of have to change the code a little before it works again. i.e. comment out a line of code then rebuild. After that it will run again. Just my observations.
Comment 5 Andrew Young 2011-09-27 13:31:51 UTC
Created attachment 511 [details]
symbolicated crash report

I'm reporting another instance of this bug. I have attached the symbolicated crash report. Below is the console output.


Sep 27 10:22:07 unknown configd[26] <Debug>: CaptiveNetworkSupport:UIAllowedNotifyCallback:70 uiallowed: true
Sep 27 10:22:07 unknown UIKitApplication:com.saambaa.mobile[0x38a8][11827] <Notice>: Stacktrace:
Sep 27 10:22:07 unknown UIKitApplication:com.saambaa.mobile[0x38a8][11827] <Notice>:   at System.Uri.GetDefaultPort (string) <0x0000b>
Sep 27 10:22:07 unknown UIKitApplication:com.saambaa.mobile[0x38a8][11827] <Notice>: * Assertion at ../../../../../mono/mono/mini/aot-runtime.c:2217, condition `(guint8*)addr < (guint8*)jinfo->code_start + jinfo->code_size' not met
Sep 27 10:22:07 unknown ReportCrash[11829] <Notice>: Formulating crash report for process SaambaaiPhone[11827]
Sep 27 10:22:07 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.saambaa.mobile[0x38a8]) Job appears to have crashed: Abort trap: 6
Sep 27 10:22:07 unknown SpringBoard[30] <Warning>: Application 'QA' exited abnormally with signal 6: Abort trap: 6
Sep 27 10:22:07 unknown configd[26] <Debug>: CaptiveNetworkSupport:UIAllowedNotifyCallback:70 uiallowed: false
Sep 27 10:22:08 unknown ReportCrash[11829] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/SaambaaiPhone_2011-09-27-102207_Andrew-Phone.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Comment 6 PJ 2013-11-19 17:05:24 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 7 PJ 2013-12-05 18:35:44 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.