MonoGame/MonoGame

Async dispose causes concurrent mod exception

Open

#3 760 ouverte le 23 avr. 2015

Voir sur GitHub
 (7 commentaires) (0 réactions) (0 assignés)C# (3 071 forks)batch import
Help WantedOpenGLbughelp wantediOSplatform: iosscope: graphicsscope: opengl

Métriques du dépôt

Stars
 (13 886 stars)
Métriques de merge PR
 (Merge moyen 25j 3h) (22 PRs mergées en 30 j)

Description

During the async dispose of resources in iOS (OpenGL) you will get a concurrent modification exception during the PlatformDeleteRenderTarget. I have fixed it in our fork of MG. You can see my bug report here:

https://github.com/Cocos2DXNA/cocos2d-xna/issues/471

and you can see my changes to the OpenGL GraphicsDevice here:

https://github.com/Cocos2DXNA/MonoGame/commit/47bec75605efabd17656356e955affec0248f57a

The Activate/Dispose/Resolve methods all access or make changes to the glFrameBuffers dictionary, and they do so without any regard to protection during an async dispose. I found that this exception occurs about 1 in 200 activate/dispose operations.

Guide contributeur