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 1256 - Invalid window warning in GL_CreateRenderer
Summary: Invalid window warning in GL_CreateRenderer
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-27 02:26 UTC by Martin Gerhardy
Modified: 2012-01-06 23:32 UTC (History)
0 users

See Also:


Attachments
patch to fix the missing window reference (461 bytes, patch)
2011-07-27 02:28 UTC, Martin Gerhardy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Gerhardy 2011-07-27 02:26:06 UTC
the window reference is lost in the GL_CreateRenderer function. The attached patch should fix this error.

#0  SDLSystem_LogOutputFunction (userdata=0x63b010, category=1, priority=SDL_LOG_PRIORITY_ERROR, message=0x7fffffffcd00 "Invalid window") at src/system/sdl/SDLSystem.cpp:8
#1  0x00007ffff7b1ddb3 in SDL_LogMessageV (category=1, priority=SDL_LOG_PRIORITY_ERROR, fmt=<value optimized out>, ap=<value optimized out>) at src/SDL_log.c:275
#2  0x00007ffff7b1df7c in SDL_LogError (category=<value optimized out>, fmt=<value optimized out>) at src/SDL_log.c:212
#3  0x00007ffff7b1d582 in SDL_SetError (fmt=0x7ffff7baaff0 "") at src/SDL_error.c:111
#4  0x00007ffff7b96f9e in SDL_GL_MakeCurrent (window=0x0, ctx=0xa62ce0) at src/video/SDL_video.c:2484
#5  0x00007ffff7b4ba0c in GL_ActivateRenderer (renderer=0xa8f680) at src/render/opengl/SDL_render_gl.c:195
#6  0x00007ffff7b4c59a in GL_ResetState (window=0x918010, flags=<value optimized out>) at src/render/opengl/SDL_render_gl.c:214
#7  GL_CreateRenderer (window=0x918010, flags=<value optimized out>) at src/render/opengl/SDL_render_gl.c:343
#8  0x00007ffff7b48053 in SDL_CreateRenderer (window=0x918010, index=<value optimized out>, flags=2) at src/render/SDL_render.c:166
Comment 1 Martin Gerhardy 2011-07-27 02:28:05 UTC
Created attachment 658 [details]
patch to fix the missing window reference

I'm not sure whether this is the right approach and would be glad about feedback - but with the attached patch applied the missing window error is fixed
Comment 2 Sam Lantinga 2012-01-06 23:32:32 UTC
The patch looks good, thanks!
http://hg.libsdl.org/SDL/rev/7b9126fde949