Bug 17695 - Accessing the files through IsolatedFile causes NSTimer stop firing - ONLY Xamarin.iOS 7.0.6
Summary: Accessing the files through IsolatedFile causes NSTimer stop firing - ONLY Xa...
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 7.0.6.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-02-10 23:21 UTC by Ales Suchac
Modified: 2016-05-24 21:14 UTC (History)
5 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 NORESPONSE

Description Ales Suchac 2014-02-10 23:21:10 UTC
Description of Problem:

We have app published in App store for about 2.5 years. When compiled with Xamarin.iOS 7.0.6, the download/upload function which is handled inside callbacks fired by NSTimer just hung. Xamarin Studio is 4.2.2 (build 2).

This happened only after on someplace in the code inside the firing event I accessed file through IsolatedFile store. The code worked, no crash, it read the info I needed and the execution reached the end of code block but no subsequent firing event occured.

When checked the timer immediately before exit from the function, the IsValid was still True.

When I downloaded Xamarin.iOS 7.0.5 & installed it, the problem disappeared running exactly the same code.
**********************************************************************************************************


Steps to reproduce the problem:
-------------------------------
Unfortunately, I don't have time to produce sample code and test it as I am under pressure to get updated app to the App store.

But if I am right it might be potentially serious problem. I'd suggest try something like this:

int Ticks = 0;
NSTimer xferTimer = NSTimer.CreateRepeatingScheduledTimer(TimeSpan.FromMilliseconds(100.0), 
                         delegate { OnXferTimerTick(); });

private void OnXferTimerTick()
{
    Ticks++;

    if (Ticks == 10) 
    {
        ReadSomethingFromIsolatedFile();
    }
    Console.WriteLine("Ticks: " + Ticks.ToString());
}


Actual Results:
---------------
I assert that when compiled with Xamarin.iOS 7.0.6, the timer will stop firing after 10th tick.


Expected Results:
-----------------
Ticks should continue regardless of Xamarin.iOS version, of course.


How often does this happen? 
---------------------------
Well, in my real code, each time I ran it.

Additional Information:
-----------------------
When I have chance I can update this with real sample.
Comment 1 Sadik Ali 2014-02-11 03:21:03 UTC
Hi Ales,

We have checked this issue with the code snippet mentioned in description also
Created Method to read data from text file for " ReadSomethingFromIsolatedFile()" method. Then debug the application and observed that "Ticks" continue after 10th tick. Refer screen cast: http://screencast.com/t/ljEUcI81ZD

Could you please provide us sample code for which you are encountering error?

Environment Info:
XS 4.2.2 (build 2)
Build Information
Git revision: c5f82958ae7d9af652b44b87ceff777b3ad19b91
Xamarin addins: a4044fee09138f6fd031a9944b7caaeb51e57e80
Xam.iOS 7.0.6-168

Thanks.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-02-11 08:51:08 UTC
This *might* be a dup of bug #17597 - we're planning on releasing a new version (Xamarin.iOS 7.0.7) to the beta channel in the upcoming days (where bug #17597 is fixed), so the easiest would probably be for you to test your app with this version once it's out.

If version 7.0.7 does not fix your bug, then we'll need a complete test project we can use to reproduce this problem.
Comment 3 Sebastien Pouliot 2016-05-24 21:14:48 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!