Problems running TorqueCombat & TankBuster
by Chris Covington · in Torque X 2D · 01/10/2007 (12:49 am) · 7 replies
Since there are really no useful tutorials for Torque X yet, I thought that I would take a look at the sample projects provided. Well, I have tried and simply cannot get either the TorqueCombat or the TankBuster samples to run. Both build without issue, but I get "InvalidOperationException was unhandled" errors when they first start up:
TorqueCombat: errors out on the "base.Draw(gameTime)" portion of the Draw function (TorqueCombatGame.cs).
TankBuster: errors out on the "new Game().Run()" portion of the Main function (Game.cs).
Unfortunately, I am at a loss as to what the problem is and how to fix it. I thought maybe it was a graphics card problem (the screens for both games briefly appear before crashing), but it looks like it has shader model 3.0 support (ATI Mobility Radeon X1400). Anyone have any thoughts?
TorqueCombat: errors out on the "base.Draw(gameTime)" portion of the Draw function (TorqueCombatGame.cs).
TankBuster: errors out on the "new Game().Run()" portion of the Main function (Game.cs).
Unfortunately, I am at a loss as to what the problem is and how to fix it. I thought maybe it was a graphics card problem (the screens for both games briefly appear before crashing), but it looks like it has shader model 3.0 support (ATI Mobility Radeon X1400). Anyone have any thoughts?
#2
TankBuster fails on line 46 of Game.cs and TorqueCombat fails on line 340 of TorqueCombatGame.cs. Both solutions are unchanged from the initial templates. I do not have a previous beta GSE installation that could be causing problems, though I do have Visual Studio 2003 and TGB Pro installed concurrently.
01/10/2007 (1:03 pm)
I listed the points of failure in the first post. Debug and release fail in the same way. :)TankBuster fails on line 46 of Game.cs and TorqueCombat fails on line 340 of TorqueCombatGame.cs. Both solutions are unchanged from the initial templates. I do not have a previous beta GSE installation that could be causing problems, though I do have Visual Studio 2003 and TGB Pro installed concurrently.
#3
ATI = A Trashy Idea? ;)
01/10/2007 (7:32 pm)
Run in debug mode, and when it pops the error up, expand into it to see the culprit. Either do that or go to xml view, copy it, and paste it into here so we can see what's up.ATI = A Trashy Idea? ;)
#4
at Microsoft.Xna.Framework.Graphics.VertexBuffer.CopyData[T](Int32 offsetInBytes, T[] data, Int32 startIndex, Int32 elementCount, Int32 vertexStride, UInt32 options, Boolean isSetting)
at Microsoft.Xna.Framework.Graphics.VertexBuffer.SetData[T](Int32 offsetInBytes, T[] data, Int32 startIndex, Int32 elementCount, Int32 vertexStride, SetDataOptions options)
at GarageGames.Torque.GUI.VertexManager._Unlock(VertexPool& pool, PCTTBN[]& data, Int32 startIndex, Int32 elementCount)
at GarageGames.Torque.GUI.VertexManager.Unlock(Int32 poolNum, PCTTBN[]& data, Int32 startIndex, Int32 elementCount)
at GarageGames.Torque.GUI.DrawUtil.BitmapStretchSR(String texture, RectangleF dstRect, RectangleF srcRect, BitmapFlip flipMode)
Still looks like it could be a hardware problem (e.g. incompatible back buffer settings).
Believe me, I would much rather have an Nvidia card, but you pretty much get stuck with whichever card the laptop manufacturers use.
01/10/2007 (9:32 pm)
Completely missed the stack trace portion of the exception information panel. Looks like it is failing during a vertex buffer copy operation. Top five calls on the stack (same for both programs):at Microsoft.Xna.Framework.Graphics.VertexBuffer.CopyData[T](Int32 offsetInBytes, T[] data, Int32 startIndex, Int32 elementCount, Int32 vertexStride, UInt32 options, Boolean isSetting)
at Microsoft.Xna.Framework.Graphics.VertexBuffer.SetData[T](Int32 offsetInBytes, T[] data, Int32 startIndex, Int32 elementCount, Int32 vertexStride, SetDataOptions options)
at GarageGames.Torque.GUI.VertexManager._Unlock(VertexPool& pool, PCTTBN[]& data, Int32 startIndex, Int32 elementCount)
at GarageGames.Torque.GUI.VertexManager.Unlock(Int32 poolNum, PCTTBN[]& data, Int32 startIndex, Int32 elementCount)
at GarageGames.Torque.GUI.DrawUtil.BitmapStretchSR(String texture, RectangleF dstRect, RectangleF srcRect, BitmapFlip flipMode)
Still looks like it could be a hardware problem (e.g. incompatible back buffer settings).
Believe me, I would much rather have an Nvidia card, but you pretty much get stuck with whichever card the laptop manufacturers use.
#5
My initial thought was hardware or driver issues, and that trace just reconfirms it some more. You said you do have the latest drivers for that card?
Do you have the .net 2.0 framework installed?
Install the service pack for vc#.net 2005 just in case (shouldn't be the issue at all, but doesn't hurt)
Can you run any semi-newer games at all on your laptop (not ones you've built, but anything on the market)?
01/11/2007 (8:25 am)
Depends on if the card is in a bay or not. i either build my own (wish we had more options on BYO) or go with laptops with a bay graphics card.My initial thought was hardware or driver issues, and that trace just reconfirms it some more. You said you do have the latest drivers for that card?
Do you have the .net 2.0 framework installed?
Install the service pack for vc#.net 2005 just in case (shouldn't be the issue at all, but doesn't hurt)
Can you run any semi-newer games at all on your laptop (not ones you've built, but anything on the market)?
#6
01/11/2007 (3:26 pm)
I tried the service pack with no luck, but I did find the problem. It seems that I was still running the debug version of the DirectX runtime from a previous project. Once I switched it to the retail runtime, all of the samples worked fine.
Torque Owner Ben R Vesco