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 - SDL_UpdateWindowSurface() failed for resized window
Summary: SDL_UpdateWindowSurface() failed for resized window
Status: RESOLVED DUPLICATE of bug 4740
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.9
Hardware: x86_64 Linux
: P2 major
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-26 12:32 UTC by Koichi Yoshida
Modified: 2019-07-27 17:19 UTC (History)
1 user (show)

See Also:


Attachments
reproducible code (2.35 KB, text/plain)
2019-07-26 12:34 UTC, Koichi Yoshida
Details

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