mapbox / mapbox-scenekit

Other
231 stars 51 forks source link

Move context blitting operation to a dispatch queue with a barrier #68

Closed avi-c closed 5 years ago

avi-c commented 5 years ago

Safeguard against concurrency problems. CGContexts are not thread-safe and this caused occasional crashes as tile images were returned and stitched together.

avi-c commented 5 years ago

@natalia-osa - Any comments?

natalia-osa commented 5 years ago

Seems fine. But I cannot test it because I still have 100% crashes with the code (from this branch or from master). If you wanted to fix my issue, it doesn't look like the reason.

Here is the description of crash happening for for 100% sessions for us: https://github.com/mapbox/mapbox-scenekit/issues/62#issuecomment-427118577. It's also the reason why we're not up to date with your code.

psahgal commented 5 years ago

Are there any updates on this pull request? I was about to put a up a pull request with the same fix, as this fixes one of several crashes happening in my project.

psahgal commented 5 years ago

Thanks! That was a really quick response!