Xamarin ios timespan axis freezes on iphone 4
This discussion was imported from CodePlex
lanks wrote at 2014-03-20 05:43:
I have created a timespan axis graph that is the same as the example in the oxyplot monotouch examples app.
When the app goes to load the graph is freezes when running on an iphone 4. I have tested this with an iphone 5 and it runs perfectly. There is no error reported in the application output in xamarin studio. The app just completely freezes.
This also happens with the oxyplot monotouch examples app when selecting the timespan axis graph.
Any ideas why this is happening?
Liam
When the app goes to load the graph is freezes when running on an iphone 4. I have tested this with an iphone 5 and it runs perfectly. There is no error reported in the application output in xamarin studio. The app just completely freezes.
This also happens with the oxyplot monotouch examples app when selecting the timespan axis graph.
Any ideas why this is happening?
Liam
benhysell wrote at 2014-03-20 15:48:
Liam,
Can you run instruments against your iPhone 4 and see where your app is spending all of its time?
-ben
Can you run instruments against your iPhone 4 and see where your app is spending all of its time?
-ben
lanks wrote at 2014-03-21 02:09:
Hi Ben
Thanks for your response.
I ran instruments with the time profiler but I am not too sure what I am looking for? Here is a link to the data from instruments https://www.dropbox.com/s/gahj6l53bl4dbnx/SportsEdgeInstruments.trace.zip
Are you able to confirm that you can run the timespan axis with an iPhone < 5?
Cheers
Liam
Thanks for your response.
I ran instruments with the time profiler but I am not too sure what I am looking for? Here is a link to the data from instruments https://www.dropbox.com/s/gahj6l53bl4dbnx/SportsEdgeInstruments.trace.zip
Are you able to confirm that you can run the timespan axis with an iPhone < 5?
Cheers
Liam
benhysell wrote at 2014-03-21 12:58:
Liam,
I cannot confirm running on less than 5s and iPad 3...but my app does have an x-axis that is a date axis...I'm about to release a new version of code with OxyPlot in it. Thus if there is a major issue with the 4 I'm concerned.
Basically with Instruments I'm looking for where all the time is being spent. From your snapshot start at the top and keep hitting down arrows until the function that is using up all of the time is exposed.
Although I can't see exactly where the code is falling down, I can at least point you in the correct direction. From your Instruments after I clicked down through all of the calls:
TimeSpan axis correct? OxyPlot/Axes/TimeSpanAxis.cs line 173
I cannot confirm running on less than 5s and iPad 3...but my app does have an x-axis that is a date axis...I'm about to release a new version of code with OxyPlot in it. Thus if there is a major issue with the 4 I'm concerned.
Basically with Instruments I'm looking for where all the time is being spent. From your snapshot start at the top and keep hitting down arrows until the function that is using up all of the time is exposed.
Although I can't see exactly where the code is falling down, I can at least point you in the correct direction. From your Instruments after I clicked down through all of the calls:
TimeSpan axis correct? OxyPlot/Axes/TimeSpanAxis.cs line 173
protected override double CalculateActualInterval(double availableSize, double maxIntervalSize)
From Instruments it looks like the line 188 is just spinningdouble nextInterval = goodIntervals.FirstOrDefault(i => i > interval);
I'd start poking around here with the debugger and see why that FirstOrDefault
is never ending, or why it is being called so many timesCustomer support service by UserEcho
In OxyPlot.Axes.DateTimeAxis.CalculateActualInterval() there is the code below. The check was failing if nextInterval was zero, so the loop never terminated. Changing it to the following fixed the problem. Something not quite right with Xamarin here.