You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
texture_p=ffi.gc(lib.SDL_CreateTexture(self.p, format, access, width, height), lib.SDL_DestroyTexture)
This line creates a texture and takes ownership, but SDL will sometimes destroy the texture owned by this object, causing SDL_DestroyTexture to fail later and sometimes crash the program.
This issue can crash the samples if you restart the renderer during that program.
I'm noting this now so that I don't forget to fix this. I'll probably have the renderer track its textures with weak references and release ownership of its them when the renderer itself is deleted.
The text was updated successfully, but these errors were encountered:
Enabling SDL logging allowed me to track down this error.
python-tcod/tcod/sdl/render.py
Line 316 in 49ebc65
This line creates a texture and takes ownership, but SDL will sometimes destroy the texture owned by this object, causing SDL_DestroyTexture to fail later and sometimes crash the program.
This issue can crash the samples if you restart the renderer during that program.
I'm noting this now so that I don't forget to fix this. I'll probably have the renderer track its textures with weak references and release ownership of its them when the renderer itself is deleted.
The text was updated successfully, but these errors were encountered: