alexdrone / ios-realtimeblur

Multipurpose real-time blur view for iOS6+
MIT License
951 stars 107 forks source link

Fatal Error in Upcoming Update #2

Closed peoplecallmefrancois closed 10 years ago

peoplecallmefrancois commented 11 years ago

I received the following error. Thought I should warn you. Great library by the way. :)

CGContextTranslateCTM: 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.

brendand commented 11 years ago

I'm receiving this warning too. Any ideas how to fix it?

peoplecallmefrancois commented 11 years ago

I am quite new to iOS development at the moment unfortunately. These may/may not help. http://stackoverflow.com/questions/3571053/cgcontext-cgbitmapcontextcreateimage-errors-how-to-fix http://stackoverflow.com/questions/10695258/how-do-i-capture-uiimage-of-complete-contents-of-uitableview-uiscrollview-and

pizzafilms commented 11 years ago

The error occurs when the visibleRect is empty. I'm not exactly sure when it happens, but I believe it's as the blur view is going on or off. I added: if(CGRectIsEmpty(visibleRect)) return; near the top of renderLayerWithView and it was all better. Sorry, I'm not very versed in github stuff.

rathahin commented 10 years ago

Hello, I come here just confirm that the solution by pizzafilms is working.

Added:

if(CGRectIsEmpty(visibleRect)) return;

After create visibleRect from superview frame.

Thank you very much for saving my time, and Thank to great library.