BlueMonkMN's picture

Vista?

Some Vista users are reporting problems, and I'm not sure if it's related to OpenTK or my own code. So far I know one user has version 6.0.6000.16386 of opengl32.dll, and is reporting the following error:
Error Screenshot

My own version of opengl.dll (5.1.2600.2180) on Windows XP works fine (I assume that's the significant DLL here). Is there possibly a compatibility problem working with different versions of opengl32.dll? Or just an OS problem?

The game in question was the same one linked in my previous post:
http://sgdk2.enigmadream.com/support/TVSGDK2.zip
And the OpenTK code is based off of version 1166 from SubVersion.

(Edit: Also, what in the world is this "@" prefix I see on some of the parameters. I can't find any documentation on that for C#.)


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
BlueMonkMN's picture

1) I didn't realize that I hadn't included the OpenTK.Graphics namespace, so I had a hard time finding the GraphicsContext class. It works. I updated TVSGDKg.zip, though one might have trouble getting the new file if the old file is in the cache (that's why I usually rename each time I post).

2) So does the system automatically load the correct opengl32.dll (presumably the 64-bit version when compiled for AnyCPU) when OpenTK loads it?

the Fiddler's picture

2) Yes, this has been extensively tested and works (x64, x86 and AnyCPU).

djk's picture

It now runs on my two testing machines, both are 32bit, one XP Quatro FX 2500m and one Vista GeForce. Neither of them got past the GLContext creation the other day.

djk

Inertia's picture

Now it crashes at startup, I should probably mention that the system has only the Net 2.0 framework installed that shipped with VC# 2005. Other Net/OpenTK applications run fine.

The TVSGDK.exe runs in 64 bit mode, not 32.

Contents of Debug.log:

System.BadImageFormatException: Could not load file or assembly 'OpenTK, Version=0.9.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'OpenTK, Version=0.9.1.0, Culture=neutral, PublicKeyToken=null'
   at GameForm..ctor(GameDisplayMode mode, Boolean windowed, String title, Type initMapType, Type overlayMapType)
   at Project.Main()
 
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
BlueMonkMN's picture

When you say "The TVSGDK.exe runs in 64 bit mode, not 32." do you mean it functions correctly in 64-bit mode, but not in 32-bit mode, or it attempts to run in 64-bit mode instead of attempting to run in 32-bit mode?

Everything is compiled for x86 platform on .NET 2.0. I don't understand why there would still be errors. Do you have another version of OpenTK on your system that it might be finding in the GAC instead of in the local path or something?

Inertia's picture

A Process running in 32 bit mode (i.e. x86) under Vista64 has a remark "*32" next to the process name. This is not the case when running TVSGDK2g.zip's included executable (cannot load a VC#2008 solution with VC#2005 EE, so cannot build it without recreating your whole sln).
No OpenTK.dll is registered in the GAC and according to the debug log the app is picking the OpenTK.dll included in your archive (0.9.1.0), my guess is that something went wrong building the app for x86 and parts of the application still run in x64.

BlueMonkMN's picture

Apparently the ability to specify that a project compiles to x86 rather than AnyCPU is not exposed in Visual Studio Express. I can create a project that compiles for the x86 platform and it will target the x86 platform, but, unlike VS 2008, it doesn't show me that the platform name and actual platform are separate settings. So I was missing a line in the vcproj file. I'll recompile and post something new soon.

teichgraf's picture

Apparently the ability to specify that a project compiles to x86 rather than AnyCPU is not exposed in Visual Studio Express.

I don't have Express here right now, but maybe this helps:
http://cygon.nuclex.org/2006/07/02/debug-and-release-in-visual-c-express...

BlueMonkMN's picture

I fixed the csproj file and re-compiled as actual (I hope) x86-based code:
http://sgdk2.enigmadream.com/support/TVSGDK2h.zip

Inertia's picture

Works now, there's a "*32" tag next to the process' name. No exceptions, 2250fps in main menu, game has sound and is playable. Good job :)