atm_grifter's picture

Crash when calling CreateFrameBuffer

I am hitting a similar problem referenced in the following post:

My app is on iOS 5.0 using OpenGL ES 1.1. I have a situation where my UIView is constantly changing size, and thus requiring me to recreate the frame buffer at a high rate.

Specifically, this is the following code that runs before anything else in the size changed handler for the UIView:

	if (GraphicsContext != null)

I shouldn't even need that if condition (which if it isn't there I still hit the same issue), but the exception occurs in the constructor of the GraphicsContext, complaining that a key already exists in the dictionary (which after looking at the code through the disassembler seems to be the handle for a previously created GraphicsContext). I can't find the method responsible for removing the element from the dictionary, so I don't know what the conditions are for me to expect it to be gone. Calling DestroyFrameBuffer does not remove the context from that dictionary (why doesn't it?).