| Summary: | Render variable corruption after SDL_SetWindowSize | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Taiki <taiki> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | CC: | aiac0692, taiki |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Windows (All) | ||
| Attachments: | Sample of this bug, it'll set RENDER_BUG at 1 after SDL_SetWindowSize | ||
Hello, as I don't see any answer, here is a new (compilable) sample
int main()
{
if(SDL_Init(SDL_INIT_VIDEO)) //launch the SDL and check for failure
return 0;
SDL_Window *windows = SDL_CreateWindow("Trigger the bug", 50, 25, 50, 75, SDL_WINDOW_OPENGL);
SDL_Renderer *renderervar = SDL_CreateRenderer(windows, -1, SDL_RENDERER_ACCELERATED);
SDL_SetWindowSize(windows, 100, 150);
SDL_RenderClear(renderervar); //Failed, SDL_GetError send "Reset(): INVALIDCALL", and then, any attempt to create texture will fail: the only fix is to destroy the render variable and create it again.
}
Can you try in the latest snapshot? http://www.libsdl.org/tmp/SDL-2.0.zip Somebody reported a similar bug, which was fixed. Thanks! Seems to be fixed :) Thanks! Great, thanks! :) |
Created attachment 1006 [details] Sample of this bug, it'll set RENDER_BUG at 1 after SDL_SetWindowSize Hello, By switching my app from SDL 1.2 to 2.0, I experimented a lot of weird bugs where create textures fail inexplicably. By investigating, I succed at reproduce the crash in a really short code (linked). I reproduce the bug with a 100% accuracy on my 64bits laptop/desktop, running both AMD and Intel CPU, both with ATI graphical cards and with updated pilots. On a 32 bit netbook with a Intel graphical chip/Atom CPU, the bug never happen. I work with MinGW, fully updated, it compiled by build of the SDL. By looking at SDL_GetError(), I get "CreateTexture(): INVALIDCALL". I went as deep as I could and it fails after a DirectX call. (I've DirectX updated SDK installed on my laptop). Thanks in advance to look into this bug.