SDL-1.0.1, VC++6.0a, Win2000RC2, VMware-1.1.2

After some trouble with main, SDL_main, _main, and _SDL_main, I managed
to link and run my application.

It links and runs, but dies with this error:

First-chance exception in minion.exe (SDL.DLL): 0xC0000005: Access

Violation.

It is loading the SDL.dll, I can see that. In fact, it passes SDL_Init
but fails in SDL_SetVideoMode: pSurface is null.

// Initialize SDL
if	(SDL_Init(SDL_INIT_VIDEO) < 0)
{
    std::cerr << "Couldn't init SDL: " << SDL_GetError() <<

std::endl;
exit(1);
}

// Set SDL video mode
pSurface = SDL_SetVideoMode(640, 480, 16, 0);
if (pSurface == null)
{
    std::cerr << "Couldn't set video mode: " << SDL_GetError() <<

std::endl;
exit(1);
}

I am running in 16bpp, 1280x1024, in VMware. Any idea why I can’t get a
video mode?–
Marc Lepage
Software Developer
Molecular Mining Corporation
http://www.molecularmining.com/

Hmmm… I don’t have any of those components except SDL 1.0.1, so I
can’t do a whole lot of debugging on it now.

I can’t think of anything offhand that would cause these errors.
Do you get any messages from your cerr output?

After some trouble with main, SDL_main, _main, and _SDL_main, I managed
to link and run my application.

It links and runs, but dies with this error:

First-chance exception in minion.exe (SDL.DLL): 0xC0000005: Access

Violation.

It is loading the SDL.dll, I can see that. In fact, it passes SDL_Init
but fails in SDL_SetVideoMode: pSurface is null.

// Initialize SDL
if	(SDL_Init(SDL_INIT_VIDEO) < 0)
{
    std::cerr << "Couldn't init SDL: " << SDL_GetError() <<

std::endl;
exit(1);
}

// Set SDL video mode
pSurface = SDL_SetVideoMode(640, 480, 16, 0);
if (pSurface == null)
{
    std::cerr << "Couldn't set video mode: " << SDL_GetError() <<

std::endl;
exit(1);
}

I am running in 16bpp, 1280x1024, in VMware. Any idea why I can’t get a
video mode?

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote:

Hmmm… I don’t have any of those components except SDL 1.0.1, so I
can’t do a whole lot of debugging on it now.

I can’t think of anything offhand that would cause these errors.
Do you get any messages from your cerr output?

Have to check later.

Is there anywhere I can download a (preferably simple) Windows
executable SDL-1.0.1 program? If it runs in VMware, at least that’s an
existence proof. If it doesn’t run, I’ll know that perhaps it’s not just
my app.–
Marc Lepage
http://www.antimeta.com/
Minion open source game, RTS game programming, etc.

Hi,

Are You sure that this is not W2000 RC2 bug? Have you tried to compile

and run this program under Win9x or NT?

If you want you can download simple SDL 1.0 application at

http://159.148.172.198/engine/Engine%20Docs/TEST1.RAR
It has worked under Win98 and WinNT 4.0 SP5

Kovacs> ----- Original Message -----

From: mlepage@antimeta.com (Marc A. Lepage)
Newsgroups: loki.open-source.sdl
To:
Sent: otrdiena, 2000. gada 4. janvaris 7:13
Subject: [SDL] Re: SDL-1.0.1, VC++6.0a, Win2000RC2, VMware-1.1.2

Sam Lantinga wrote:

Hmmm… I don’t have any of those components except SDL 1.0.1, so I
can’t do a whole lot of debugging on it now.

I can’t think of anything offhand that would cause these errors.
Do you get any messages from your cerr output?

Have to check later.

Is there anywhere I can download a (preferably simple) Windows
executable SDL-1.0.1 program? If it runs in VMware, at least that’s an
existence proof. If it doesn’t run, I’ll know that perhaps it’s not just
my app.


Marc Lepage
http://www.antimeta.com/
Minion open source game, RTS game programming, etc.

Kovacs wrote:

Hi,

Are You sure that this is not W2000 RC2 bug? Have you tried to compile

and run this program under Win9x or NT?

I got some friends to try it. It didn’t work on Win2000RC2 not in
VMware, or in WinNT4 not in VMware.

If you want you can download simple SDL 1.0 application at

http://159.148.172.198/engine/Engine%20Docs/TEST1.RAR
It has worked under Win98 and WinNT 4.0 SP5

I get this error:

Couldn’t set 640x480x8 video mode: DirectDraw2::CreateSurface(PRIMARY):
No DirectDraw hardware

Once again, I am running 1280x1024x16, in Win2000RC2, in VMware-1.1.2,
on Debian GNU/Linux 2.1 (slink).–
Marc Lepage
Software Developer
Molecular Mining Corporation
http://www.molecularmining.com/

Marc Lepage schrieb:

Is there anywhere I can download a (preferably simple) Windows
executable SDL-1.0.1 program? If it runs in VMware, at least that’s an
existence proof. If it doesn’t run, I’ll know that perhaps it’s not just
my app.

Check out http://biesinger.virtualave.net–
Christian Biesinger
PGP ID: DFFE21F1; Get it at: http://biesinger.virtualave.net
Fingerprint: E60D 24FC BBC5 97CE 5421 C0FE 311B 7F82 DFFE 21F1

Christian Biesinger wrote:

Marc Lepage schrieb:

Is there anywhere I can download a (preferably simple) Windows
executable SDL-1.0.1 program? If it runs in VMware, at least that’s an
existence proof. If it doesn’t run, I’ll know that perhaps it’s not just
my app.

Check out http://biesinger.virtualave.net

I get an application error, which is dereferencing a null pointer.

I’ll try it on non-VMware Windows variants when I get a chance.–
Marc Lepage
Software Developer
Molecular Mining Corporation
http://www.molecularmining.com/

Does VMWare even support Direct X?On Tue, 4 Jan 2000, Marc Lepage wrote:

Kovacs wrote:

Hi,

Are You sure that this is not W2000 RC2 bug? Have you tried to compile

and run this program under Win9x or NT?

I got some friends to try it. It didn’t work on Win2000RC2 not in
VMware, or in WinNT4 not in VMware.

If you want you can download simple SDL 1.0 application at

http://159.148.172.198/engine/Engine%20Docs/TEST1.RAR
It has worked under Win98 and WinNT 4.0 SP5

I get this error:

Couldn’t set 640x480x8 video mode: DirectDraw2::CreateSurface(PRIMARY):
No DirectDraw hardware

Once again, I am running 1280x1024x16, in Win2000RC2, in VMware-1.1.2,
on Debian GNU/Linux 2.1 (slink).


Marc Lepage
Software Developer
Molecular Mining Corporation
http://www.molecularmining.com/

Ryan Wahle wrote:

Does VMWare even support Direct X?

I don’t believe so. Is there a way (command line option?) to force SDL
to not use DirectX?–
Marc Lepage
Software Developer
Molecular Mining Corporation
http://www.molecularmining.com/

Ryan Wahle wrote:

Does VMWare even support Direct X?

I don’t believe so. Is there a way (command line option?) to force SDL
to not use DirectX?

Ahhh. You can set the environment variables:

set SDL_VIDEODRIVER=windib
set SDL_AUDIODRIVER=waveout

If I get a chance, I’ll see if I can get the detection code to try to
create a DirectDraw surface to detect this condition.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote:

Ryan Wahle wrote:

Does VMWare even support Direct X?

I don’t believe so. Is there a way (command line option?) to force SDL
to not use DirectX?

Ahhh. You can set the environment variables:

set SDL_VIDEODRIVER=windib
set SDL_AUDIODRIVER=waveout

If I get a chance, I’ll see if I can get the detection code to try to
create a DirectDraw surface to detect this condition.

My app (and Wurm) still yield this error:

Couldn’t set 640x480x16 video mode: DirectDraw2::CreateSurface(PRIMARY):
No DirectDraw hardware

Is it possible the environment variables are not working for me? They
appear to be set. Perhaps I am still messing something up?–
Marc Lepage
Software Developer
Molecular Mining Corporation
http://www.molecularmining.com/