Does not run on Vista!

Discuss about Blockout II from Jean-Luc, post your feature requests etc.
Post Reply
User avatar
Herc
Posts: 174
Joined: Sun May 20, 2007 12:54 pm

Re:Does not run on Vista!

Post by Herc »

thanks for the bug-report!
i think that will be fixed soon.
Michael
Posts: 4
Joined: Sun Jan 13, 2008 7:52 am

Re:Does not run on Vista!

Post by Michael »

Any updates? I\'m getting the same error code on Vista.

I\'ve built the code and tried to debug, but the error seems to occur in D3DTools library. Is the code for this library downloadable? I saw GPL and was expecting this code to be available, but can\'t find it anywhere on this site. Is the code really under GPL?
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:Does not run on Vista!

Post by jlp_38 »

Hi,

Unfortunately i don\'t have a Vista installed. I got the DVD and i think i will set up a machine soon. Anyway the D3DTools is not on sourceforge because the source of this lib is not really clean yet. I\'m afraid that the error does not come from this lib. According to the error message it\'s rather a real D3D error but may be I\'m wrong. I wrote this lib 5 years ago !
You can get the source from here:
http://zelda38.free.fr/D3DTools.rar

A next release will come soon with Vista issue fixed (i hope) and a new AI player.

Let you informed...
Michael
Posts: 4
Joined: Sun Jan 13, 2008 7:52 am

Re:Does not run on Vista!

Post by Michael »

It\'s nice to have the code. Here is the fix, it was a simple typo.

In MenuGrid.cpp, line 190, you create the vertex buffer. I\'ve no idea what it is - never programmed 3d, but MSDN says the first parameter is the size of the buffer, you pass \"4 * sizeof(FACEVERTEX)\". Next line you lock this buffer, and pass lock range of size \"24 * sizeof(FACEVERTEX)\" which is beyond the buffer size - so Lock() fails.

I\'m not sure what is the right size, but it is clear the program uses more than 4 vertices. So I modified CreateVertexBuffer call to ask for 24 structures as well, and the game started successfully.

Apparently, Vista is more strict about parameter validation, and what could be a cause of random crashes later on under ealier OS, fails early now.<br><br>Post edited by: Michael, at: 2008/01/14 14:22
Michael
Posts: 4
Joined: Sun Jan 13, 2008 7:52 am

Re:Does not run on Vista!

Post by Michael »

I\'ve also added the screen resolution that I use - 1600x1200, I can share the diff, although these changes are trivial.
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:Does not run on Vista!

Post by jlp_38 »

Great news, Hope we can fix the issue without i have to set up a Vista.
I see that there is other parameters in MenuGrid.cpp which are not correct. The correct parameters should be:

MenuGrid.cpp:189

Code: Select all

  hr = pd3dDevice->CreateVertexBuffer(4 * sizeof(FACEVERTEX), 
            D3DUSAGE_DYNAMIC, FACEVERTEX_FORMAT, D3DPOOL_DEFAULT, &redVbf);
  if(FAILED(hr)) return hr;

  hr = redVbf->Lock(0, 4 * sizeof(FACEVERTEX), (BYTE **) &pVertices, 0);
  if(FAILED(hr)) return hr;
MenuGrid.cpp:218

Code: Select all

  hr = pd3dDevice->CreateIndexBuffer(6 * sizeof(WORD), 0, D3DFMT_INDEX16,
		                                   D3DPOOL_DEFAULT, &redIdx);
  if(FAILED(hr)) return hr;

  hr = redIdx->Lock(0, 6 * sizeof(WORD), (BYTE**) &pIndices, 0);
  if(FAILED(hr)) return hr;
Could you try this and let me know if it works ?

I\'ll add also the 1600x1200 in the next release

Thanks for your effort :)<br><br>Post edited by: jlp_38, at: 2008/01/14 20:41
Michael
Posts: 4
Joined: Sun Jan 13, 2008 7:52 am

Re:Does not run on Vista!

Post by Michael »

Well, yes - it works, I did not realize that pVertices is modified in line 245 - you are correct, only 4 elements are needed. Works great!
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:Does not run on Vista!

Post by jlp_38 »

Thanks Michael for testing :)
Will be fixed in the next release...
jlp_38
Posts: 264
Joined: Tue Jun 26, 2007 9:09 am

Re:Does not run on Vista!

Post by jlp_38 »

Hi,

I compiled a release that should work on Vista.
This to wait for the next release. You can download
this release from here.
Just replace the .exe file.
Let me know if you get new problem.

Have fun :)
Post Reply