Bug 15 - SIGSEGV using CorePlot and BarChart
Summary: SIGSEGV using CorePlot and BarChart
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 1.0
Hardware: Other Other
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-07-18 13:50 UTC by Berndt H.
Modified: 2012-03-12 21:54 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

MonoTouch app using CorePlot and a bar chart (176.01 KB, application/zip)
2011-07-18 13:53 UTC, Berndt H.

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:

Description Berndt H. 2011-07-18 13:50:33 UTC
Miguel's sample app for CorePlot, enhanced to use a bar chart.
When running in debugger and clicking on the chart the app SIGSEVs.

Complete Sample attached.
Comment 1 Berndt H. 2011-07-18 13:53:46 UTC
Created attachment 5 [details]
MonoTouch app using CorePlot and a bar chart

Removed libCorePlotDevice.a and libCorePlotSim.a to bring down the file size
Comment 2 Jeffrey Stedfast 2011-07-18 18:09:27 UTC
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x4f7f0000
0x0287609f in objc_msgSend ()
(gdb) bt
#0  0x0287609f in objc_msgSend ()
#1  0x07615540 in ?? ()
#2  0x000093da in -[CPBarPlot renderAsVectorInContext:] ()
#3  0x00019489 in -[CPLayer drawInContext:] ()
#4  0x00002d5b in -[CPPlot drawInContext:] (self=0xd73c5d0, _cmd=0x2e10e7, theContext=0x7615540) at /Users/eskroch/Projects/Core Plot/framework/Source/CPPlot.m:224
#5  0x01e95e47 in backing_callback ()
#6  0x01de31f7 in CABackingStoreUpdate ()
#7  0x01e95d24 in -[CALayer _display] ()
#8  0x01e8c27d in CALayerDisplayIfNeeded ()
#9  0x01e310c3 in CA::Context::commit_transaction ()
#10 0x01e32294 in CA::Transaction::commit ()
#11 0x01e3246d in CA::Transaction::observer_callback ()
#13 0x01faa6e7 in __CFRunLoopDoObservers ()
#14 0x01f731d7 in __CFRunLoopRun ()
#15 0x01f72840 in CFRunLoopRunSpecific ()
#16 0x01f72761 in CFRunLoopRunInMode ()
#17 0x031341c4 in GSEventRunModal ()
#18 0x03134289 in GSEventRun ()
#19 0x010c7c93 in UIApplicationMain ()
#20 0x0aaa346c in ?? ()
#21 0x0aaa33a2 in ?? ()
#22 0x0aaa2d06 in ?? ()
#23 0x07761a50 in ?? ()
#24 0x07761b2d in ?? ()
#25 0x0004f48b in mono_jit_runtime_invoke (method=0x801cbec, obj=0x0, params=0xbfffea9c, exc=0x0) at ../../../../mono/mini/mini.c:5765
#26 0x0022d1dd in mono_runtime_invoke (method=0x801cbec, obj=0x0, params=0xbfffea9c, exc=0x0) at ../../../../mono/metadata/object.c:2756
#27 0x0022f8c4 in mono_runtime_exec_main (method=0x801cbec, args=0xa89ec60, exc=0x0) at ../../../../mono/metadata/object.c:3939
#28 0x0022ecae in mono_runtime_run_main (method=0x801cbec, argc=0, argv=0xbfffebb8, exc=0x0) at ../../../../mono/metadata/object.c:3561
#29 0x000e3017 in mono_jit_exec (domain=0x71e9e00, assembly=0x7500a20, argc=1, argv=0xbfffebb4) at ../../../../mono/mini/driver.c:1102
#30 0x00042786 in main ()

We might need to build our own CorePlot library to figure out what is going wrong here... it doesn't appear to me that any managed code is really involved here?

The demo app is pretty simple and no crash happens with the ScatterPlot (instead of the BarGraph). Not much code changed between the 2 graph types used in Miguel's demo vs the attached app.
Comment 3 Sebastien Pouliot 2011-09-05 15:45:16 UTC
Miguel has updated the bindings for CorePlot 0.4 API
Comment 4 Miguel de Icaza [MSFT] 2012-03-12 21:54:27 UTC
Closing, ancient, and I fixed the APIs.