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 4741

Summary: SDL_UpdateWindowSurface() failed for resized window
Product: SDL Reporter: Koichi Yoshida <koichi.yoshida>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: amaranth72
Version: 2.0.9   
Hardware: x86_64   
OS: Linux   
Attachments: reproducible code

Description Koichi Yoshida 2019-07-26 12:32:31 UTC
I found a problem that SDL_UpdateWindowSurface() failed for a window resized by SDL_SetWindowSize().
The window is created as "not full screen" and resizable. 

I have attached a reproducible code for the problem.

Tested environment:
	debian 10.0.0 amd64
	sdl2.0.9+dfsg1-1

How to reproduce the problem:
	gcc sdl2_UpdateWindowSurface_failed.c -lSDL2 && ./a.out
	In case of SDL_UpdateWindowSurface() failed, you can see an error message as follows.
	> SDL_UpdateWindowSurface failed: Window surface is invalid, please call SDL_GetWindowSurface() to get a new surface
Comment 1 Koichi Yoshida 2019-07-26 12:34:47 UTC
Created attachment 3902 [details]
reproducible code

reproducible code
Comment 2 Alex Szpakowski 2019-07-27 17:19:57 UTC
Looks like you posted the same bug report twice

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