SDL_CreateWindow Failing

Hello,

I did give try to SDL 1.3 and for some reason, Init video initialzed successfully but SDL_CreateWindow always fail

Visual Studio 2008
Windows XP 64bit
latest opengl 3.2 but still use legacy

///#define GL3_PROTOTYPES 1
#include <gl3.h>
#include <glext.h>

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

m_SDL_WindowId = SDL_CreateWindow(“SDL 1.3”, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_RESIZABLE |SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);

SDL_GetError() return SetProp(): Invalid Flags

Due to linkages issues, I compile SDL as Multi-threaded MT instead of Multi-threaded DLL MD
could this be the source of my problem?

Are you sure you can successfully create an OpenGL 3.2 context on your drivers?

Also, you might need to apply the patch listed in this bug:
http://bugzilla.libsdl.org/show_bug.cgi?id=776On Sat, Sep 26, 2009 at 7:27 AM, golgoth wrote:

Hello,

I did give try to SDL 1.3 and for some reason, Init video initialzed
successfully but SDL_CreateWindow always fail?

Visual Studio 2008
Windows XP 64bit
latest opengl 3.2 but still use legacy

///#define GL3_PROTOTYPES 1
#include
#include

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

m_SDL_WindowId = SDL_CreateWindow(“SDL 1.3”, SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_RESIZABLE |SDL_WINDOW_OPENGL |
SDL_WINDOW_SHOWN);

SDL_GetError() return SetProp(): Invalid Flags

Due to linkages issues, I compile SDL as Multi-threaded MT instead of
Multi-threaded DLL MD? could this be the source of my problem?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

I have the NVidia 190.62 drvier with a G8 family card, it should work indeed. I just started to follow the SVN… when you guys make a patch, is that mean that the next version while include it?

Yes, we’re evaluating the patch, but we haven’t included it yet.On Fri, Oct 2, 2009 at 5:39 AM, golgoth wrote:

I have the NVidia 190.62 drvier with a G8 family card, it should work
indeed. I just started to follow the SVN… when you guys make a patch, is
that mean that the next version while include it?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Oh, thx Sam.

You see, even if a comment :

///SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
///SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);

It fail
so I m not sure where is the problem yet. My project is fairly complex and I m also using glut.h which call the default gl.h provide with Visual Studio. Without the use of glut.h and gl.h there is a lot of linkage error so I m not sure I want a go down that road and remove all OpengGL legacy from my project for now. So, I m a little confused whether to use gl.h with the gl3.h and/or SDL_Opengl.h.

Is there any available example with OpenGL 3.x with double buffering I could test and/or someone that could help me out clear this up?

[quote]Yes, we’re evaluating the patch, but we haven’t included it yet. [\quote]

One more thing. How would I know if this feature as been included?

You can subscribe to this bug and you’ll get e-mails when it’s updated:
http://bugzilla.libsdl.org/show_bug.cgi?id=776On Tue, Oct 6, 2009 at 4:27 PM, golgoth wrote:

[quote]Yes, we’re evaluating the patch, but we haven’t included it yet.
[\quote]

One more thing. How would I know if this feature as been included?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

hummm… I did created an account but I cant figure how to suscribe to this specific bug…

You don’t. You just subscribe to the list and get emails about everything.________________________________
From: neosettlers@videotron.ca (golgoth)
Subject: Re: [SDL] SDL_CreateWindow Failing

hummm… I did created an account but I cant figure how to suscribe to this specific bug…

I think what Sam was really saying to golgoth is to add himself in the
CC field of the bug.On Wed, Oct 7, 2009 at 13:25, Mason Wheeler wrote:

You don’t.? You just subscribe to the list and get emails about everything.


From: golgoth
Subject: Re: [SDL] SDL_CreateWindow Failing

hummm… I did created an account but I cant figure how to suscribe to this
specific bug…


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

  • SR

Hi again,

This patch seems pretty important for OpenGL users, any idea when it will be implemented?

Yes, it’s on the list after a discrepancy in rendering between Windows
and Linux.On Tue, Nov 10, 2009 at 7:25 AM, golgoth wrote:

Hi again,

This patch seems pretty important for OpenGL users, any idea when it will be
implemented?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Got it!

thx for the feedback, greatly appreciated!

My app on my target system, Windows XP with a Radeon HD4600 (also tested with another 2 XP systems) crashes when SDL_CreateWindow is called. I wrote a log file of each line of code, and that’s where it ends. The crash is very inspecific:

Faulting application pr1026.exe, version 0.0.0.0, faulting module unknown, version 0.0.0.0, fault address 0x00000000.

The code is just:

logFile->debug(“SDL_SelectVideoDisplay \r\n”);
SDL_SelectVideoDisplay(0);
logFile->debug(“SDL_CreateWindow \r\n”);
window1 = SDL_CreateWindow(“WINDOW 1”,0,0,config->getScrW(),config->getScrH(),SDL_WINDOW_SHOWN|SDL_WINDOW_INPUT_FOCUS|SDL_WINDOW_MAXIMIZED|SDL_WINDOW_BORDERLESS);

This all works fine on my 3x other Windows 7 systems so it looks like it’s limited to Windows XP.

I have built a program under SDL 1.2 which works fine - so it shouldn’t be a directx thing (??)

Thanks
Ed

An error at address 00000000 almost invariably means that something’s trying to
dereference a null pointer. Make sure your Config variable is assigned. If so,
try tracing into the call in the debugger. Somewhere along the way you’ll find a
null dereference. If you can fix it, and it’s an error in SDL instead of
stemming from a problem in your code, please submit a patch to Bugzilla.________________________________
From: e_byard@yahoo.co.uk (Edward Byard)
Subject: Re: [SDL] SDL_CreateWindow Failing

My app on my target system, Windows XP with a Radeon HD4600 (also tested with
another 2 XP systems) crashes when SDL_CreateWindow is called. I wrote a log
file of each line of code, and that’s where it ends. The crash is very
inspecific:

Faulting application pr1026.exe, version 0.0.0.0, faulting module unknown,
version 0.0.0.0, fault address 0x00000000.

The code is just:

logFile->debug(“SDL_SelectVideoDisplay \r\n”);
SDL_SelectVideoDisplay(0);
logFile->debug(“SDL_CreateWindow \r\n”);
window1 = SDL_CreateWindow(“WINDOW
1”,0,0,config->getScrW(),config->getScrH(),SDL_WINDOW_SHOWN|SDL_WINDOW_INPUT_FOCUS|SDL_WINDOW_MAXIMIZED|SDL_WINDOW_BORDERLESS);

This all works fine on my 3x other Windows 7 systems so it looks like it’s
limited to Windows XP.

I have built a program under SDL 1.2 which works fine - so it shouldn’t be a
directx thing (??)

Thanks
Ed

I need to install VS on an xp system and then i can debug properly. Its a bit odd that it fails on all xp systems but nothing else. Will let you know how it goes…

I should say I forgot I replied to this thread - my other thread explains what’s going on

http://forums.libsdl.org/viewtopic.php?t=6811