Bug: ShinobiChart calls abort() when there's no datasource set!


So I’ve stumbled across a fairly ordinary behaviour from ShinobiChart: if there’s no datasource set for a chart, it calls abort() (and thus kills your app). This is a bad design decision — throw an exception if you must (at least I can wrap that in an @try{ … } @catch { … } block, but ideally the ShinobiChart instance should just handle the missing datasource gracefully and not display anything.

How do I best report bugs like this? Here? Or is there a better place?


Further to this, I thought creating a data source that returns an empty result set might temporarily alleviate this problem. This also throws a crashing error in:

-[ShinobiChart loadData]

Is there a workaround? My graph does not have data until after some user activity, and the data source is dynamically assigned based upon user selection.

Also, why would someone downvote this question? Where am I supposed to go for when I strike issues with this library?


Righto, the second issue (empty data source) was my problem (threading issue), and has hence been fixed. The original point becomes less of a showstopper, but it’s still an odd way to handle a nil datasource.


You are absolutely right, this isn’t the best way to handle lack of information. I’m quite sure Apple speaks againt the use of abort() in production apps. Write a mail directly to Shinobi Support about the issue.

You say that an empty data source doesn’t alleviate the problem - I think it should, so the issue might be something else.


Thanks @duemunk — the empty data source works as expected now. It was a threading issue in my code. I’ll email Shinobi support about the abort() issue separately.


Hi Tony,

We are sorry to hear you’ve been having issues with our charts. We are aware of this particular flaw and intend to do something about it in the near future. We didn’t anticipate people may want to use charts without a datasource at the time, but we are aware of such use cases now and are aiming to fix this soon. 

With regard to the downvote, I’m not sure who did that unfortunately! Remember that this is a community forum and anyone can downvote or upvote questions. It certainly wasn’t someone on the Shinobi team, as we don’t make a habit of downvoting our customers!

If you have any more questions please feel to get in touch or post on the forums and we will be more than happy to help. If you do happen to find any more bugs then please raise a ticket with our support team. 


I apologise if I come across as being a bit blunt and cranky with the charts control — it just happened that the control was maddeningly close to what I needed, but currently has some annoying bugs. I’ll post the bugs I’ve come across to the support team tonight, so that you’re dealing with actual solvable issues and not a cranky twitter/forum user.


No problem. Thanks for making us aware of your concerns - we are always happy to hear feedback from our users.



Hi Tony,

We are sorry to hear you’ve been having issues with our charts. We are aware of this particular flaw and intend to do something about it in the near future. 

Nearing two years and this still appears to be an issue; unless there is some workaround I’m not currently aware of. Currently I am about to try just creating an empty datasource and see how that works.

Edit: well, the blank data source didnt work. Guess I’m gonna have to get rid of the views on my storyboard and painfully add them back via code once the data has been refreshed from the server


Hi there,

Unfortunately, this appears to be something we have missed and aim to rectify very shortly.

However, for now, you should be able to slightly adjust your datasource as follows without having to remove any of your views from your storyboard:

  • Within numberOfSeriesInSChart:  return 0 series while you’re waiting for your data, set the chart’s visibilty to hidden
  • When the data arrives from the server, update your datasource to return the correct number of series
  • Call reloadData and redrawChart on your chart, make chart visible

I appreciate the above is a little annoying to have to fiddle about with and it could be handled a lot more gracefully, so this issue is a high priority for us. If you have any further questions, please let me know.

Kind regards,