-
Notifications
You must be signed in to change notification settings - Fork 933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EXC_BAD_ACCESS drawInRect #63
Comments
As I can see from code FICImageTableEntry bytes (that were used during CGBitmapContextCreate initialization) are not available after reset, so any usage of this context finishes with EXC_BAD_ACCESS |
This bug makes testing very difficult. |
This behavior is expected. You shouldn't call reset while images are in use or being processed. Why exactly are you doing that? Sent from my iPhone
|
During logout user from application, I want to reset everything It can easily also be replicated with some code manipulation, after CGBitmapContextCreate call reset, and it reproduces easily |
I pushed a commit to master which may resolve this. Please let me know. |
I'm pretty sure that will work since it looks very similar to the workaround I use in the teardown of our tests. |
Thank you guys, I am sure it should work |
Hello,
I've used in FICEntityImageDrawingBlock code from documentation:
UIGraphicsPushContext(context);
[image drawInRect:contextBounds];
UIGraphicsPopContext();
It worked excellent, but I could replicate EXC_BAD_ACCESS in drawInRect method. I reset image cache, but some pending operation was still in queue
Scenarios is following
threadX inside FICEntityImageDrawingBlock
UIGraphicsPushContext(context);
image = SomeImageTransformation
switch to main thread
[ imageCache reset ];
return back to threadX
[image drawInRect:contextBounds];
UIGraphicsPopContext();
The text was updated successfully, but these errors were encountered: