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 - SDL_CreateRenderer fails if software renderer has previously been created and destroyed in the same window
Summary: SDL_CreateRenderer fails if software renderer has previously been created and...
Status: RESOLVED DUPLICATE of bug 4426
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: 2.0.8
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-09 13:22 UTC by Anthony @ POW Games
Modified: 2018-12-17 18:33 UTC (History)
0 users

See Also:


Attachments
test code to recreate bug (1.32 KB, text/plain)
2018-05-09 13:22 UTC, Anthony @ POW Games
Details

Note You need to log in before you can comment on or make changes to this 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 ***