We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4161

Summary: SDL_CreateRenderer fails if software renderer has previously been created and destroyed in the same window
Product: SDL Reporter: Anthony @ POW Games <ant>
Component: renderAssignee: Sam Lantinga <slouken>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.8   
Hardware: All   
OS: All   
Attachments: test code to recreate bug

Description Anthony @ POW Games 2018-05-09 13:22:32 UTC
Created attachment 3245 [details]
test code to recreate bug

You can create and destroy renderers using the same window, without having to destroy and create the window again, yes? I believe I've exposed a bug where SDL_CreateRenderer will fail when creating a software renderer when previously one has been created and destroyed. Perhaps the problem is in software renderer clean-up code related to the window?

The attached main.cpp will re-create the bug every time on Windows 10, Android, and presumably all platforms.
Comment 1 Anthony @ POW Games 2018-05-09 13:24:41 UTC
The test code cycles through all available renderers when you press the space key, destroying and creating a new renderer next in the list, eventually coming to the software renderer.
Comment 2 Anthony @ POW Games 2018-12-17 18:33:04 UTC
Looks like this is a duplicate of this bug which has just been fixed: 

https://bugzilla.libsdl.org/show_bug.cgi?id=4426

*** This bug has been marked as a duplicate of bug 4426 ***