[CorePlot] Line chart hangs in iPhone project

17 views
Skip to first unread message

Michael

unread,
Apr 30, 2010, 2:44:27 PM4/30/10
to coreplot-discuss
I have a chart view set up in an iPhone project that creates a line
chart (CPXYGraph with CPStocksTheme). It was working previously, but
with a larger data set (still under 30 data points), it will no longer
bring up the chart.

It looks like it's getting locked into an infinite loop trying to
generate a line chart. Repeated pauses/continues in the debugger
consistently shows the following sequence in the middle of the call
stack:

CPDecimalFromUnsignedInteger
[CPAxis
tickLocationsBeginningAt:increasing:majorTickLocations:minorTickLocations:]
[CPAxis relabel]
[CPAxis layoutSublayers]

I'm at a loss for what the issue is, or how to fix it. Any
suggestions would be greatly appreciated!

Thanks!

Michael

--
You received this message because you are subscribed to the Google Groups "coreplot-discuss" group.
To post to this group, send email to coreplot...@googlegroups.com.
To unsubscribe from this group, send email to coreplot-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coreplot-discuss?hl=en.

Eric

unread,
Apr 30, 2010, 10:00:43 PM4/30/10
to coreplot-discuss
Could you post more of the call stack?

Thanks,
Eric

Michael

unread,
Apr 30, 2010, 11:34:43 PM4/30/10
to coreplot-discuss
Sure. Here are the stacks from 2 of the pauses.

Pause 1
==========
__vfpringf
asprintf
_CFRelease
_CFStringCreateWIthFormatAndArgumentsAux
-[NSPlaceholderString initWithFormat:locale:arguments;]
-[NSString initWithFormat:locale:]
-[NSNumber descriptionWithLocale:]
-[NSNumber stringValue]
-[NSNumber(NSDecimalNumberExtensions) decimalValue]
CPDecimalFromUnsignedInteger
[CPAxis
tickLocationsBeginningAt:increasing:majorTickLocations:minorTickLocations:]
[CPAxis relabel]
[CPAxis layoutSublayers]
CALayerLayoutifNeeded
-[CALayer layoutifNeeded]
-[CALayer renderinContext]
_CreateRotationSnapshot
-[UIWindow _setRotatableViewOrientation:duration:force:]
-[UIWindow _updateInterfaceOrientationFromDeviceOrientation]
_nsnote_callback
...


Pause 2
==========
fmodl$fenv_access_off
fmod$fenv_access_off
-[NSNumber hash]
CFHash
__CFSetFindBuckets2
CFSetAddValue
-[CPAxis
tickLocationsBeginningAt:increasing:majorTickLocations:minorTickLocations:]
-[CPAxis relabel]
-[CPYAxis renderAsVectorInContext:]
-[CPLayer drawInContext:]
backing_callback
CABackingStoreUpdate
-[CALayer _display]
CALayerDisplayIfNeeded
CA::Context::commit_transaction
CA::Transaction::commit
CA::Transaction::observer_callback
__CFRunLoopDoObservers
CFRunLoopRunSpecific
CFRunnLoopRunInMode
GSEventRunModal
...

Michael

unread,
May 3, 2010, 4:34:29 PM5/3/10
to coreplot-discuss
I got this resolved in my app, although I think the framework should
have reacted differently than it did, and handled the situation
better. The data initialization inadvertently got skipped due to some
troubleshooting code, and this put the framework into a spin...

Eric

unread,
May 3, 2010, 7:24:14 PM5/3/10
to coreplot-discuss
Were you using a datasource or bindings? What was being sent to the
plot? It sounds like we need to do some validation on the data as it's
being loaded.

Benjamin Collins

unread,
May 14, 2010, 9:24:38 AM5/14/10
to coreplot-discuss
Michael, what did you do to resolve it? I'm having the same issue.
Also, I posted this same question on Stack Overflow yesterday:
http://stackoverflow.com/questions/2831690/core-plot-never-stops-asking-for-data-hangs-device

Michael Goodwin

unread,
May 14, 2010, 12:32:55 PM5/14/10
to coreplot...@googlegroups.com
In my case, in the middle of debugging an issue I had commented out my call to stuff the data into my chart object, so the data source was empty.

I also had a problem early on where it wouldn't bring up various charts, but the others would work.  I fixed that by updating the x&y ranges for the plot space to fit the range of actual data, and also adjust the majorIntervalLength and minorTicksPerInterval while I was at it.  I trigger that update whenever the data set is updated.

I had to wander around in the dark to find those...
Reply all
Reply to author
Forward
0 new messages