Several troubles with Torque X 2D. Please help!
by Brandon Roberts · in Torque X 2D · 11/18/2009 (9:52 am) · 12 replies
Hello everyone,
I am having a few issues with Toque X and XNA, maybe its just me but any help on any of these issues would be greatly appreciated. So let me begin:
Issue 1: I know I am not the only person that noticed on PC when I minimize the game or it loses focus the game then halts or crashes and when I minimize and restore i am stuck with a purple screen. Anyone know why and/or how this can be fixed?
Issue 2: When ever I try to run my game on the Xbox I deploy from Visual Studio and I receive a series of "There is no source code available for the current location." message boxes and after going through about 15-20 of them the game will finally run on the Xbox with no trouble from there on out. I thought I followed the steps correctly for making a Xbox version of my game but again maybe its just me and if anyone can tell me more about those message boxes and if there is a way to get the game to run on its own? (I can't seem to run the game without running it from Visual Studio even though there is a copy on the Xbox. I have tried this with a basic XNA game and it worked out fine but when Torque is involved its completely different.)
Also issue 1 isn't a problem when it comes to a pure XNA game. Please, any help would be awesome =]
Sorry if this is a lot for one post, this is honestly my first forum post in history lol
I am having a few issues with Toque X and XNA, maybe its just me but any help on any of these issues would be greatly appreciated. So let me begin:
Issue 1: I know I am not the only person that noticed on PC when I minimize the game or it loses focus the game then halts or crashes and when I minimize and restore i am stuck with a purple screen. Anyone know why and/or how this can be fixed?
Issue 2: When ever I try to run my game on the Xbox I deploy from Visual Studio and I receive a series of "There is no source code available for the current location." message boxes and after going through about 15-20 of them the game will finally run on the Xbox with no trouble from there on out. I thought I followed the steps correctly for making a Xbox version of my game but again maybe its just me and if anyone can tell me more about those message boxes and if there is a way to get the game to run on its own? (I can't seem to run the game without running it from Visual Studio even though there is a copy on the Xbox. I have tried this with a basic XNA game and it worked out fine but when Torque is involved its completely different.)
Also issue 1 isn't a problem when it comes to a pure XNA game. Please, any help would be awesome =]
Sorry if this is a lot for one post, this is honestly my first forum post in history lol
#2
I am using Visual Studio 2008, XNA 3.1, Torque X 2D Builder 3.1, Windows 7.
The project is just a 2D side-scroller game mainly and based of the platformer kit.
11/18/2009 (10:41 am)
Well number one is my biggest concern right now.I am using Visual Studio 2008, XNA 3.1, Torque X 2D Builder 3.1, Windows 7.
The project is just a 2D side-scroller game mainly and based of the platformer kit.
#3
I have set TXB compatibility options to run as Administrator because without that sometime the behaviour is quite strange: have you set it the same way? and... did you uninstall the Creators' Club version?
11/18/2009 (10:54 am)
Your config is exactly like mine: VS2008 (I use the Team version), XNA 3.1 and TX 3.1 (TXB exe version 1.1.5.0) all on Windows 7 (Ultimate).I have set TXB compatibility options to run as Administrator because without that sometime the behaviour is quite strange: have you set it the same way? and... did you uninstall the Creators' Club version?
#4
Issue 2: 'no source code at location' - the game is crashing and the VS is catching it. You don't want this happening at all - find out what's crashing yr game and fix it, instead of continuing/ignoring the crash. This is why you can't run it without running from VS - it is only running from VS because VS is catching the errors and allowing you to ignore them; xbox won't catch them so the program will just crash.
11/18/2009 (11:21 am)
Issue 1: I've given a fix for the purple screen in this thread www.garagegames.com/community/forums/viewthread/104691Issue 2: 'no source code at location' - the game is crashing and the VS is catching it. You don't want this happening at all - find out what's crashing yr game and fix it, instead of continuing/ignoring the crash. This is why you can't run it without running from VS - it is only running from VS because VS is catching the errors and allowing you to ignore them; xbox won't catch them so the program will just crash.
#5
and I really was looking for a concrete explanation for the messages in VS, which finally thanks to you I got. Now to go try it out and see what happens. I'll reply back with results.
Giuseppe I also have TXB running as Administrator but I don't have the Creator's Club version installed at all. I am running Win7 Ultimate as well with the Team version of VS2008.
11/18/2009 (3:38 pm)
Duncan thanks a lot for your replies. I did run into that thread the other day but I guess the information didnt process the first look around =Pand I really was looking for a concrete explanation for the messages in VS, which finally thanks to you I got. Now to go try it out and see what happens. I'll reply back with results.
Giuseppe I also have TXB running as Administrator but I don't have the Creator's Club version installed at all. I am running Win7 Ultimate as well with the Team version of VS2008.
#6
in ProcessTick.
Should I have rebuilt with TXB as well before running it again or would the rebuild in VS be enough?
11/18/2009 (7:50 pm)
So I gave your fix a try and I must be doing something wrong because I cant seem to get it to work. I made the changes in the TorqueEngine source and I copied over the new 2D framework dll to the common files folder since my game is pointed to those dll's. I get a null reference exception from the start. It points to this line 'Profiler.Instance.StartBlock("T2DSceneCamera.ProcessTick");'in ProcessTick.
Should I have rebuilt with TXB as well before running it again or would the rebuild in VS be enough?
#7
11/18/2009 (10:06 pm)
Sorry, can't help there - I always have the engine source compiled in with each project rather than compiling a DLL to share between them.
#8
11/19/2009 (3:26 pm)
I applied the fixes Duncan suggested and they seem to work fine. Thanks a lot. I am not using TextureCube or RenderTarget but wouldn't these classes also be affected when the device resets?
#9
11/19/2009 (3:45 pm)
The default behaviour in xna is for RenderTargets to be cleared anyway as soon as any other render target is used - so they are in effect having their content invalidated every frame anyway.
#10
The workaround we found was to change the inner code of assert.fatal to console.writeline or something. Then it worked...
You may also wrap all "Debug.Assert" of your game code with
#if !XBOX
..your code
#endif
as Debug.Assert also causes the Xbox game to crash. Hope it helps.
11/20/2009 (6:26 pm)
I also tried to fix the "There is no source code available for the current location" error, but never found what I was doing wrong. Frustrated about it, we discovered the problem always happened when TorqueEngine called an Assert.Fatal on Xbox - on Windows it would work fine.The workaround we found was to change the inner code of assert.fatal to console.writeline or something. Then it worked...
You may also wrap all "Debug.Assert" of your game code with
#if !XBOX
..your code
#endif
as Debug.Assert also causes the Xbox game to crash. Hope it helps.
#11
Just to clarify, when VS breaks on an assert and says 'no source' is available, all that it means is that the precise place where VS is breaking is not one that you have the source code for. But, if you look at the call stack you can go to the last place in the call stack where you had source code. You shouldn't need to change wrap your asserts in conditional XBOX preprocessor logic.
I would not recommend disabling Asserts - they are there for a reason! I would also not recommend using console.writeline() to debug xbox as you typically won't get any output from it in the output window. It's better to use Debug.Writeline().
11/20/2009 (7:48 pm)
"Debug.Assert also causes the Xbox game to crash" - I should hope so! That's what it is there for :)Just to clarify, when VS breaks on an assert and says 'no source' is available, all that it means is that the precise place where VS is breaking is not one that you have the source code for. But, if you look at the call stack you can go to the last place in the call stack where you had source code. You shouldn't need to change wrap your asserts in conditional XBOX preprocessor logic.
I would not recommend disabling Asserts - they are there for a reason! I would also not recommend using console.writeline() to debug xbox as you typically won't get any output from it in the output window. It's better to use Debug.Writeline().
#12
02/09/2010 (6:43 pm)
I was having the no source code problem as well, some of my component schemas were referencing template names that either no longer existed or had been changed, I changed the xml from oldtemplatename to newtemplate name and it worked on the xbox, not sure why the old template names were kept in the xml though.
Associate Giuseppe De Francesco
DFT Games Ltd
I'm not experiencing any of those issues (well... untrue... #1 happens with Torque X 3D). Can you post more details about your environment and projects?