Visual C++ 2005 Express Edition Problems

Hi Everyone,

I am converting my Visual C++ 5.0 game to Visual C++ 2005 Express Edition using
SDL 1.2.9. I have got it to compile and run without any warnings, but when I
shut the game down, a box pops up with this message:

Unhandled exception at 0x0000001f in FightingFantasy.exe: 0xC0000005: Access
violation reading location 0x0000001f.

When I push the Break button, the call stack looks like this:*************************************************************
0000001f()
FightingFantasy.exe!std::_Container_base::_Container_base() + 0x1ea bytes
msvcr80d.dll!102020c6()
[Frames below may be incorrect and/or missing,
no symbols loaded for msvcr80d.dll]
msvcr80d.dll!10201e00()
FightingFantasy.exe!_main() + 0x108 bytes
FightingFantasy.exe!_WinMain at 16() + 0x1cd bytes
FightingFantasy.exe!__tmainCRTStartup() Line 578 + 0x35 bytes
FightingFantasy.exe!WinMainCRTStartup() Line 403
KERNEL32.DLL!7c598989()
NTDLL.DLL!77f85c09()


Can anyone tell me what I need to do to fix this?

Can anyone tell me what I need to do to fix this?

No idea, though I just built SDL under VC++ 2005 Express, and testwm and
testgl worked just fine.

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Sam Lantinga <slouken devolution.com> writes:

Can anyone tell me what I need to do to fix this?

No idea, though I just built SDL under VC++ 2005 Express, and testwm and
testgl worked just fine.

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Thanks for your reply Sam. I followed all the steps you mentioned and I got it
to compile and run some test programs for the Ogre 3D Engine and they worked
fine. My project is using a Visual C++ 5.0 project file that was upgraded by
Visual C++ 2005 Express Edition (perhaps the error is there). So I’ll try
creating the project again from scratch in Express and see if that fixes it.

David Moffatt <david_moffatt hotmail.com> writes:

So I’ll try
creating the project again from scratch in Express and see if that fixes it.

That fixed the problem. :slight_smile:

El vie, 27-01-2006 a las 02:46 +0000, David Moffatt escribi?:

I am converting my Visual C++ 5.0 game to Visual C++ 2005 Express Edition using
SDL 1.2.9. I have got it to compile and run without any warnings, but when I
shut the game down, a box pops up with this message:

I’ve recently experienced a lot of weird crashes when doing the same. In
my case I solved everything by recompiling SDL and SDL_Mixer, I was
using the precompiled versions from the site. Note that recompiling
SDL_Mixer alone which was causing the crash didn’t fix the problem, I
also had to compile SDL. And SDL_Image just in case although it appeared
to work.

--Gabriel-- 

Gabriel Gambetta
Mystery Studio - http://www.mysterystudio.com
Gabriel on Graphics - http://gabrielongraphics.blogspot.com

Just be aware VC++ 2005 Express requires some DLL assemblies to be installed
on computers without VC++ 2005. If you don’t, a message box appears saying
the program can’t run.

It’s explained on this website:

Once you’ve done that though, it works fine :-)On Friday 27 January 2006 08:57, Sam Lantinga wrote:

Can anyone tell me what I need to do to fix this?

No idea, though I just built SDL under VC++ 2005 Express, and testwm and
testgl worked just fine.


http://www.piku.org.uk

Just for the record, I have had no problems using the pre-compiled versions
of SDL, SDL_image, and SDL_ttf (haven’t used SDL_mixer, yet) in combination
with VC++2005 Express. And this was taking an existing Dev-c++ project and
converting it over.

-Dave

This problem has been existent since Visual Studio .NET 2002, and as of
yet, I have not been able to narrow down exactly why – but, I have
made some progress, and have a currently untestable (to me – perhaps
others have better tools available) theory. I believe that the Visual
C++ compiler is actually optimizing to the point where it unloads the
SDL .dll after it is no longer used by the program itself – this causes
issue with the SDL_Parachute, which adds a method into the _onexit
vector, which no longer exists when the exit() method is called
implicitly at the end of your main().

Compiling your program with optimizations off seems to fix it, as does
passing the SDL_INIT_NOPARACHUTE flag to the SDL_Init() method. While
neither of these solutions is a ‘great’ one, I prefer the *_NOPARACHUTE
one – just make sure you’re cleaning up SDL on your own.

  • Silicon

David Moffatt wrote:> Hi Everyone,

I am converting my Visual C++ 5.0 game to Visual C++ 2005 Express Edition using
SDL 1.2.9. I have got it to compile and run without any warnings, but when I
shut the game down, a box pops up with this message:

Unhandled exception at 0x0000001f in FightingFantasy.exe: 0xC0000005: Access
violation reading location 0x0000001f.

When I push the Break button, the call stack looks like this:


0000001f()
FightingFantasy.exe!std::_Container_base::_Container_base() + 0x1ea bytes
msvcr80d.dll!102020c6()
[Frames below may be incorrect and/or missing,
no symbols loaded for msvcr80d.dll]
msvcr80d.dll!10201e00()
FightingFantasy.exe!_main() + 0x108 bytes
FightingFantasy.exe!_WinMain at 16() + 0x1cd bytes
FightingFantasy.exe!__tmainCRTStartup() Line 578 + 0x35 bytes
FightingFantasy.exe!WinMainCRTStartup() Line 403
KERNEL32.DLL!7c598989()
NTDLL.DLL!77f85c09()


Can anyone tell me what I need to do to fix this?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl