Skip to content
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

deleting many pages with many scraps quickly will crash in [JotGLContext presentRenderBuffer:] #950

Closed
adamwulf opened this issue Oct 20, 2014 · 11 comments

Comments

@adamwulf
Copy link
Owner

Found another issue while working on #939

  1. load up the 100 pages of small data set
  2. launch + list view
  3. delete pages one after another quickly.
  4. after ~10 or 20 pages => crash

currently testing on iOS7, not sure about ios8

@adamwulf adamwulf added the bug label Oct 20, 2014
@adamwulf
Copy link
Owner Author

@heatherwong can you repro this?

related/dup of #940, #524, and others

@adamwulf
Copy link
Owner Author

seems to happen when presenting a render buffer of one context while another is loading stroke/texture data. especially when loading texture during CGContextClearRect() in JotGLTexture.m. i'll keep reproving to double check

@heatherwong
Copy link

I have seen that before, but not always reproducible.

@adamwulf
Copy link
Owner Author

just happened in same JotGLTexture file, but at glTexImage2D instead of CGContextClearRect.

it's never been easily reproduced for me in the past, but the above AT is doing the trick for me tonight

@heatherwong
Copy link

I was able to repro. I think it's more consistent to repro when you start each row with page with many scraps and delete them quickly. page with less scrap not as easy to crash app.

@adamwulf
Copy link
Owner Author

current research suggests its the JotGLTextureBackedFrameBuffer not cleaning up the context properly after use. still working on it...

@adamwulf
Copy link
Owner Author

got it narrowed down to how the texture backed frame buffer clears its contents when loading state on a background thread. gotta head to bed though, i'll tackle tomorrow (*today)

@adamwulf
Copy link
Owner Author

still tracking, looks like its how the backing texture frame buffer is used in drawBackingTexture:atP1:...

@adamwulf
Copy link
Owner Author

BOOM.

this bug was a killer. i'm 99.9% sure i've got it fixed. AT:

  1. load up 100 small scrapped pages
  2. list view
  3. delete over and over and over
  4. no more crash from [JotView presentRenderBuffer]

however, now i'm getting a crash from running out of memory, there's a leak somewhere when deleting all the pages. opened up a new issue for that one: #953

This was referenced Oct 21, 2014
@heatherwong
Copy link

verify block by #956

@heatherwong
Copy link

verified in RC8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants