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.
Steps to reproduce:
1. Run the BackgroundExecution Sample on simulator
2. Press [Start Long Running Task]
3. Press the home button
4. Open another app (eg Safari)
I'm only seeing this behavior on simulator, but 360logica got the same result on Release / iPad2.
MT 5.3.3 5ee2421f4f7722353285c61220c5e97090b17fe1
Release builds do not contain the UI thread checks (unless some extra command line options were included). Sure it's not a Debug build (or at debug is enabled) ?
Yeah I couldn't reproduce that result either.
I'll check again to see if they had a false negative when they're back on Sunday night.
the UI check comes from BackgroundTimeRemaining
It's not marked as thread safe but, sadly, Apple docs are rarely clear about thread-safety.
In this case the API is meant to be called (at least useful) on a background thread (since main thread is suspended). Googling shows code that use it inside background thread (including sample the "IOS 5 Programming Cookbook" book).
Fixed in 662319ab2cffed8d12c3b48ca034ce1af2d4f981
but please try this again, without the fix, since it should not happen on release builds.
I verified that this error occurs on the same build I found the initial issue on using Release | iPhoneSimulator
Have not yet tested the fix.
Please check (to be 100% sure) but "Release | iPhoneSimulator" does not use the linker (by default) so the UI checks won't be removed. That's perfectly normal.
OTOH the default, for devices, is to use the linker and *if* not on debug the UI checks should not be enabled (unless some other command lines options are added). If this can be duplicated on Release|iPhone (like the original description said) then there's an issue.
I have not yet been able to reproduce on device, and I can't again now. Think we're good!
That Release | iPad result was from 360 and it was just a false negative upon re-test.