RSully / RSColorPicker

iOS color picker view with brightness control, opacity control, and delegation support.
Other
302 stars 77 forks source link

Invalid context 0x0. This is a serious error. #41

Closed conanjb closed 10 years ago

conanjb commented 10 years ago

Hi,

I've been using RSColorPicker in my app for a while.

I just updated to XCode51-DP2 and the 7.1 beta and I am getting the errors below when I access RSColorPicker in my app.

Just to be sure I ran the standalone RSColorPicker example project and I also got the same errors.

RSColorPicker[20655] : CGContextAddPath: 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. RSColorPicker[20655] : clip: 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.

These errors seem to prevent the app from continuing.

jb

RSully commented 10 years ago

Could you provide anymore of a backtrace from Xcode? Trying to see if this is an issue in our code or within the bitmap library.

conanjb commented 10 years ago
Hi,
  I wish I could, but the app just basically stalls and these error
  messages just continue to be written to the debug console. There's
  no crash where I can get a backtrace. And pausing on execution
  from Xcode doesn't help either.
  It works great in 7.0 and the current stable Xcode. This issue is
  only in the beta version.
  On 12/16/13, 7:51 AM, Ryan wrote:

  Could you provide anymore of a backtrace from Xcode? Trying to
    see if this is an issue in our code or within the bitmap
    library. 
  —
    Reply to this email directly or view
      it on GitHub.

-- 
     Gary 'JB' Baranzini , MS, L.Ac.,
        CMTconanjb@gmail.comIn Balance
          Acupuncture925.998.4768 or
        209.221.0122
RSully commented 10 years ago

Right, but based on the error messages you shared this issue is being "upgraded" from silent/warning to an error. We need to look into this before 7.1 goes live.

/cc @unixpickle

conanjb commented 10 years ago
That's why I brought it to your
  attention. 
  It's not a very helper error message, is it? I Google it and some
  other have encountered this also. Seems to be in the CG area.
  Good luck finding it.
  On 12/16/13, 8:00 AM, Ryan wrote:

  Right, but based on the error messages you shared this issue is
    being "upgraded" from silent/warning to an error. We need to
    look into this before 7.1 goes live. 
  /cc @unixpickle
  —
    Reply to this email directly or view
      it on GitHub.

-- 
     Gary 'JB' Baranzini , MS, L.Ac.,
        CMTconanjb@gmail.comIn Balance
          Acupuncture925.998.4768 or
        209.221.0122
unixpickle commented 10 years ago

The problem is in the custom slider.

- (CGRect)trackRectForBounds:(CGRect)bounds {
    //to hide the track view
    return CGRectMake(0, ceilf(bounds.size.height / 2), bounds.size.width, 0);
}

This was never really supported by apple in the first place.

conanjb commented 10 years ago

Yes, commenting out the two occurrences resolves the issue. Is that the correct solution?

unixpickle commented 10 years ago

Yes. Really, the correct solution is to use your own sliders. These are just demos of how one might control the brightness and opacity of an RSColorPicker.

RSully commented 10 years ago

If this happens again from another cause please make a new issue.