title: <Error>: CGContextSaveGState, CGContextSetStyle, CGContextRestoreGState: invalid context 0x0
body: <p>I've seen this problem around but no one seems to have a general solution, at to mine. My 3 errors go as </p>
  
  <pre><code>&lt;Error&gt;: CGContextSaveGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
  
  &lt;Error&gt;: CGContextSetStyle: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
  
  &lt;Error&gt;: CGContextRestoreGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
  </code></pre>
  
  <p>My app still runs and works perfectly fine. But i want to know if i should be concerned or worried about this.</p>
  
  <p>FYI, im running Xcode 5.0.1 and the app is set for iOS 7. My libraries on the viewcontroller that causes the errors to pop-up are:</p>
  
  <pre><code>In the .h
  #import &lt;UIKit/UIKit.h&gt;
  #import "Event.h"
  #import &lt;MessageUI/MessageUI.h&gt;
  #import &lt;EventKit/EventKit.h&gt;
  #import &lt;EventKitUI/EventKitUI.h&gt;
  
  In the .m
  #import "EventDetailsViewController.h"
  #import "XMLReader.h"
  #import &lt;Twitter/Twitter.h&gt;
  #import "AppDelegate.h"
  #import "FBShareViewController.h"
  #import &lt;MapKit/MapKit.h&gt;
  </code></pre>
  
  <p>Thanks</p>