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 1330 - segfault in SDL_CreateWindow
Summary: segfault in SDL_CreateWindow
Status: RESOLVED DUPLICATE of bug 1333
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Linux
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-12 06:52 UTC by Martin Gerhardy
Modified: 2011-11-20 09:31 UTC (History)
0 users

See Also:


Attachments
glxinfo output (23.48 KB, text/plain)
2011-11-12 06:55 UTC, Martin Gerhardy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Gerhardy 2011-11-12 06:52:30 UTC
X11_DestroyWindowFramebuffer (_this=0x808bee8, window=0x80aa6e0)
    at src/video/x11/SDL_x11framebuffer.c:196
196	    Display *display = data->videodata->display;
(gdb) bt
#0  X11_DestroyWindowFramebuffer (_this=0x808bee8, window=0x80aa6e0)
    at src/video/x11/SDL_x11framebuffer.c:196
#1  0x001c16e2 in SDL_DestroyWindow (window=0x80aa6e0)
    at src/video/SDL_video.c:1946
#2  0x001c236f in SDL_CreateWindow (title=0x8069fa5 "TestApp 0.1", x=805240832, 
    y=805240832, w=1024, h=768, flags=38) at src/video/SDL_video.c:1181
#3  0x08052635 in SDLFrontend::init (this=0x808f0e8, width=1024, height=768, 
    fullscreen=false, eventHandler=...) at src/client/SDLFrontend.cpp:75
#4  0x08064243 in SDLBackend::init (this=0xbffff874, width=1024, height=768, 
    fullscreen=false) at src/kernel/SDLBackend.cpp:27
#5  0x0804b284 in main (argc=1, argv=0xbffff964) at src/Argh.cpp:15
(gdb) p data
$1 = (SDL_WindowData *) 0x0
Comment 1 Martin Gerhardy 2011-11-12 06:53:40 UTC
this is the code part i used to create the window
	[...]
	if (!SDL_WasInit(SDL_INIT_VIDEO)) {
		if (SDL_Init(SDL_INIT_VIDEO) == -1) {
			return -1;
		}
	}

	int flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE;

	if (fullscreen)
		flags |= SDL_WINDOW_FULLSCREEN;

	SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
	SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
	SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
	SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
	SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
	SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
	SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
	SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);

	_window = SDL_CreateWindow(FULLNAME, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, flags);
	[...]
Comment 2 Martin Gerhardy 2011-11-12 06:55:20 UTC
Created attachment 727 [details]
glxinfo output
Comment 3 Martin Gerhardy 2011-11-20 09:31:34 UTC

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