Xamarin ios timespan axis freezes on iphone 4

Mar 20, 2014 at 4:43 AM
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
Mar 20, 2014 at 2:48 PM
Liam,

Can you run instruments against your iPhone 4 and see where your app is spending all of its time?

-ben
Mar 21, 2014 at 1:09 AM
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
Mar 21, 2014 at 11:58 AM
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:

Image

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 spinning
double 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 times