Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog


Return to Microsoft Windows

ShivaSDK: MFCSampleApp crashes in Visual Studio  [SOLVED]

Windows DX9/OpenGL 2 Standalone Apps

ShivaSDK: MFCSampleApp crashes in Visual Studio

Postby Barnski » 05 May 2010, 08:45


this is really weird and I have spent alot of time on this, but couldn't find a solution.
The problem is that when I run a ShivaSDK application using Visual Studio 2008, the MFC window shows alright, but the group control that should display the shiva rendering remains grey and after about 3 seconds an unhandled exception is thrown; violation reading memory adress, within the S3DClient_Wrapper_Win32.cpp "bool S3DClient_RunOneFrame()" function. When I remove the call to that function within the OnTimer function of the dialog class, then the program runs without crashing, but obviously also without any shiva rendering.

However, when I run the compiled exe within the Debug folder, it works fine.
Of course I have set the working folder in the project properties (the S3D log file is written correctly there), and all the STK files are present and correct (as it works when running the exe outside VS2008).

The S3Dlog.txt final lines are (written by hand because on the other computer):
... Created Player 0
... <S3DStartUp><VE i="0" .......>....
... Registered AIModel 'Main'

Further, the Visual Studio Output contains this:
Load Runtime PakFile CRC Check success.
LoadPakFile CRC Check failed.
First-chance exception at 0x6905fae2 in MFCSampleApp.exe: 0xC0000005: Access violation reading location 0x610dd718

So this is really a serious problem, as it prevents me from debugging any ShivaSDK application.
More stranger is even that it worked once, but suddenly stopped working.

Well I was hoping that maybe someone might have had a similar issue already and is able to tell me what might be wrong.

Here my system infos:
Lenovo ThinkPad W500
Vista Business 32bit (6.0.6002 SP2 Build 6002)
Visual Studio 2008 Professional V9.0.21022.8
Microsoft .NET 3.5 SP1


Senior Boarder
Senior Boarder
Posts: 41
Location: Zurich, Switzerland

Re: ShivaSDK: MFCSampleApp crashes in Visual Studio  [SOLVED]

Postby Barnski » 07 Jul 2010, 09:36

Just to complete this thread with the reason for the crashes I found out:

Windows Vista Aero

Disable it to Windows Vista Basic in the Color Scheme Properties, and since then it works fine when running in MS Visual Studio.
Note that this problem does not exist when running the compiled exe outside VS!


PS: The reason why it seemed randomly to work was that sometimes I had Shiva Editor open, which causes Vista to go to Basic Color scheme mode... :roll:
Senior Boarder
Senior Boarder
Posts: 41
Location: Zurich, Switzerland

Return to Microsoft Windows