My game won't run under Vista - any tips?

BlitzMax Forums/BlitzMax Programming/My game won't run under Vista - any tips?

John Pickford(Posted 2008) [#1]
My game has been developed on an XP machine and it turns out it won't run at all under Vista. It just crashes out apparently.

I'm using BMAX+ B3D SDK

Any ideas about what to look for? Are there any taboo commands?

JP


ImaginaryHuman(Posted 2008) [#2]
I noticed some other game demos which would not run at all under vista. Not sure why, I hope someone has some ideas.


MGE(Posted 2008) [#3]
I've seen lots of probs using OpenGL in Vista, what about DirectX in your game?


GfK(Posted 2008) [#4]
Saving of data is a huge problem - in vista it needs to go in a specific place. I do this with SHGetSpecialFolderLocation() API - the path you want is CSIDL_COMMON_APPDATA if you need game data shared between Windows accounts, or CSIDL_LOCAL_APPDATA if you want the data available to the current user only.

Code:
?Win32
Extern "win32"
	Function SHGetSpecialFolderLocation(hwndOwner, nFolder, pIdl:Byte  Ptr)
End Extern
?

Const CSIDL_DESKTOP = $0
Const CSIDL_INTERNET = $1
Const CSIDL_PROGRAMS = $2
Const CSIDL_CONTROLS = $3
Const CSIDL_PRINTERS = $4
Const CSIDL_PERSONAL = $5
Const CSIDL_FAVORITES = $6
Const CSIDL_STARTUP = $7
Const CSIDL_RECENT = $8
Const CSIDL_SENDTO = $9
Const CSIDL_BITBUCKET = $A
Const CSIDL_STARTMENU = $B
Const CSIDL_DESKTOPDIRECTORY = $10
Const CSIDL_DRIVES = $11
Const CSIDL_NETWORK = $12
Const CSIDL_NETHOOD = $13
Const CSIDL_FONTS = $14
Const CSIDL_TEMPLATES = $15
Const CSIDL_COMMON_STARTMENU = $16
Const CSIDL_COMMON_PROGRAMS = $17
Const CSIDL_COMMON_STARTUP = $18
Const CSIDL_COMMON_DESKTOPDIRECTORY = $19
Const CSIDL_APPDATA = $1A
Const CSIDL_PRINTHOOD = $1B
Const CSIDL_LOCAL_APPDATA = $1C
Const CSIDL_ALTSTARTUP = $1D
Const CSIDL_COMMON_ALTSTARTUP = $1E
Const CSIDL_COMMON_FAVORITES = $1F
Const CSIDL_INTERNET_CACHE = $20
Const CSIDL_COOKIES = $21
Const CSIDL_HISTORY = $22
Const CSIDL_COMMON_APPDATA = $23

Function GetSpecialFolder:String(folder_id) 
	Local  idl:TBank = CreateBank(8) 
	Local  pathbank:TBank = CreateBank (260) 
	If SHGetSpecialFolderLocation(0,folder_id,BankBuf(idl)) = 0		
		SHGetPathFromIDList PeekInt( idl,0), BankBuf(pathbank)
		Return String.FromCString(pathbank.Buf()) + "\"
	EndIf
End Function


Further, if you want every user account to be able to access saved data, then the folder you create needs to be given full access to everyone, otherwise only the folder creator will be able to write to it (although everyone can read from it).

Grey Alien posted a complete solution to the latter a while ago. [edit] *LINK*.

One more thing - there have been Vista problems in the past relating to OpenGL and ATI cards, and also some Intel chipsets. The latest drivers for my Intel GMA X3100 fixed the problem but I'm not sure what the current situation is with ATI (but there was certainly widespread buggeration with Catalyst 7.2 drivers).


Canardian(Posted 2008) [#5]
Update your graphics card drivers, that is often also a reason for crashes with BlitzMax (OpenGL) related programs.


Stu_ovine(Posted 2008) [#6]
All reports so far on our games have been down to Graphic driver issues (OpenGl)


Russell(Posted 2008) [#7]
Raise your hand if you love Vista....

Didn't think so.

Russell


Reactor(Posted 2008) [#8]
It's new and there are bound to be driver issues. There was with XP, and every Windows before it.


H&K(Posted 2008) [#9]
And when does it stop being "New" then?

@ John, I have no idea, but Ill assume that you have good failure to find file handleing, so.... Im going to guess that it is the drivers, or something really stupid, like the Icon doesnt have access to the exe


John Pickford(Posted 2008) [#10]
It's been reported by several people. The game just doesn't run at all. It exits right away.

I can't be asking people to update drivers.


TomToad(Posted 2008) [#11]
I just recently had the problem where a program I developed on my Vista machine would not work on another person's Vista machine while I was using DirectX drivers. Switched to OpenGL and it worked fine. Not sure what video card she has.


Retimer(Posted 2008) [#12]
Have an option to switch graphics drivers. Maybe even an option to turn off certain settings that might be causing the issue. Debug logging!

Time


Stu_ovine(Posted 2008) [#13]
>I can't be asking people to update drivers.

Why not ? You would ask them to have the correct amount of RAM and minimum system specification...........


GaryV(Posted 2008) [#14]
He is using B3D SDK, how can OpenGL be the issue?


John Pickford(Posted 2008) [#15]
Okay I've updated the drivers and it made no difference.

I've also made it save data in the proper directory using the above code. No difference.

It crashes with an unhandled exception error.

I tried Naked War on the same machine (a pure B3D game) and it works perfectly. It even saves all its files in its own folder without any problem.

My new game (BMAX+B3D SDK) isn't happy.

I'm completely stumped about what to look for.


Dreamora(Posted 2008) [#16]
Do you have Vista or Vista64?
The later will have significant problems with 32Bit DLLs thanks to a broken 32Bit DLL emulation layer. MS knows of that problem but from what they mentioned so far, this won't be solved until the next Windows Successor.


John Pickford(Posted 2008) [#17]
32bit Vista as far as I know.

This isn't just on my wife's laptop. Several testers have reported the game won't run on their Vista machines. As far as I know, it isn't working on any Vista setup.


Dreamora(Posted 2008) [#18]
And they are all running the game as administrator with disabled UAC?


John Pickford(Posted 2008) [#19]
No clue. I've tried the various options on the laptop with no luck.


John Pickford(Posted 2008) [#20]
It seems to crash with the first loadtexture command. It isn't returning 0 it's actually crashing out.


Knotz(Posted 2008) [#21]
John,

Just a hunch, but could this be related to the bbLoadAnimTexture bug I reported 3 months ago?

If so, try changing the directory you're loading from.

link (not visible to everyone): http://www.blitzbasic.com/Community/posts.php?topic=75581


John Pickford(Posted 2008) [#22]
I found it. It seems I had a longstanding bug where I was using a wrong value for texture flags. For some reason it was working perfectly on XP but crashing on Vista.

My cubic environment map seems to have stopped working though - possibly due to the laptop chipset.


Gabriel(Posted 2008) [#23]
Cube environment maps will often fail if they're on a texture layer other than zero. I reported it years ago ( well, for B3D, not the SDK specifically ) but it was always ignored. If you're only using additive blending then putting the cube map on texture layer 0 seems to resolve the problem.


John Pickford(Posted 2008) [#24]
Ah right. I'm using it on layer 1. It works on my main PC but not on the Vista laptop.


GaryV(Posted 2008) [#25]
Do you have Vista or Vista64?
The later will have significant problems with 32Bit DLLs thanks to a broken 32Bit DLL emulation layer. MS knows of that problem but from what they mentioned so far, this won't be solved until the next Windows Successor.
Dreamora, do you have any links about this issue? I am getting reports from Vista 64 bit users with some DLLs I wrote and I can't replicate the problem.


Dreamora(Posted 2008) [#26]
If you use google you will find them in tousands.
Potentially even a few which describe why and in which cases it happens and how to make your 32bit DLLs compatible to it (unless they break the expanded security system, in that case there is no way beside making the user use their brain and upgrade to XP64 again instead of downgrading to Vista64)

Vista64 has a new 32Bit emulation layer for DLL which works in a way that makes it incompatible to various 32Bit DLLs. To my knowledge Microsoft plans to redo that, but I highly doubt that it will happen to Vista but more to Windows Server 2008 and the next Desktop Windows.


GaryV(Posted 2008) [#27]
Thanks. A few DLLs I made with VC++ 6.0 have been extremely problematic. *shakes head*


Dreamora(Posted 2008) [#28]
Did you program them cleanly?
No byte assumptions for memory allocation, always sizeof(typename) etc?

but yeah VC 6 might be a little critical, nobody uses that 10 year old thing anymore today as VC++ Express is freely available.