Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 1918 [details]
Project demonstrating the issue
MonoTouch 5.2.11, iPad 2 (5.1.1), ARM7 build, SGen ON
When calling GC.WaitForPendingFinalizers() the app freezes in RELEASE builds.
Please treat this prio 1 because our customers are cursing at us due to our application getting stuck randomly (if GC is triggered by the runtime).
Run the attached sample on an iPad 2 and watch the console output. It will show "1" and "2" but "3" is never outputted. "3" would be after WaitForPendingFinalizers().
What I noticed:
* Happens on the device only
* RELEASE builds only
* If I tick "emmit debug information" in the release build, it will also work
And one more note: if I kill the app forcefully on the iPad using home button double click and then restart it, it won't even show "1" and "2" but instead:
May 18 18:34:39 unknown SpringBoard <Warning>: gctest failed to resume in time
May 18 18:34:39 unknown SpringBoard <Warning>: Forcing crash report of GCTest...
May 18 18:34:39 unknown SpringBoard <Warning>: Finished crash reporting.
May 18 18:34:39 unknown com.apple.launchd <Notice>: (UIKitApplication:gctest[0x9069]) Exited: Killed: 9
May 18 18:34:39 unknown SpringBoard <Warning>: Application 'GCTest' exited abnormally with signal 9: Killed: 9
May 18 18:34:39 unknown ReportCrash <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/GCTest_2012-05-18-183439_iPad-von-Rene.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
To me this means that even though it gets killed and exits, something is still running, maybe the GC.
And just to point that out: the app also freezes if DON'T call GC manually. I have reports about the exact same behavior that I'm getting if calling it manually. So I assume that at some point GC is simply triggered and freezes.
Fixed on trunk. Will be part of 5.4.