Game Development Community

Empty filename, cannot load effect

by ManifestoGames · in Torque X 2D · 03/14/2008 (6:28 am) · 7 replies

Hello,

I'm dealing with the following problem: I'm running a game developed using TXB and sometimes a strange error occurs. I guess its related with the loading and unloading of different txscene's in the game. I'd already searched for a reference problem in the txscene (e.g. image not in the correct folder or image doesn't exist anymore) but I've discovered nothing.


www.cin.ufpe.br/~vvf/arquivos/manifesto/pizzaiolo_error.jpg

Could anyone help me?

Leonardo G.

#1
03/14/2008 (8:07 am)
Can you also post a few lines of code where this is happening? Did you mention that it happens after a scene is unloaded? I'm wondering if Torque X is clearing out too much during a scene level unload.

John K.
#2
03/14/2008 (10:29 am)
Hi,

I've said that it happens when a scene is loaded or unloaded because the error occurs exactly when the user is going from the game screen to the progress screen. In this step the game screen scene is unloaded and the progress screen is loaded. Accordingly with the error message (that is not so helpful) I think that the error is related to the load of the progress screen: the TXB couldn't find an effect (that we don't know the name).

I'm posting a better image with more information about the code, but as you can see in the error window the exception occurs in the Game.Main() method. Besides that, in the error stack trace there are no references to any game class. There are only references to the Torque library classes.

See image here.

Leonardo G.
#3
03/17/2008 (7:01 am)
Does anyone have ideas to solve this problem?

Leonardo G.
#4
03/17/2008 (9:03 am)
Actually, I have heard someone else mention a similar issue with levels being loaded and unloaded, but I have not had the bandwidth to track it down. Can you create a small sample Game that reproduces this problem and email to me (my address is listed on my profile page and my email can handle large attachments)? If so, I trace through the code and dig into the engine to see what's happening. I still get the sense that during a scene unload, Torque X is clearing out too much from memory - like deleting the camera and scene graph, which are still needed (and maybe not being created for the new level).

John K.
#5
03/17/2008 (11:47 am)
I'll try to create a small sample game, but it's not so easy. Besides that, I'm searching in code if I'm loading or unloading scenes in a wrong way (wrong order, loading a scene two or more times...).

Leonardo G.
#6
03/17/2008 (1:54 pm)
No, I really don't think it's something you're doing wrong. I've heard this before, but I haven't yet put together a test case to troubleshoot it. It really should be along the lines of TorqueSceneData.Load() and TorqueSceneData.Unload(). Your code is most likely correct, I just need a way to reproduce the problem to start the digging process.

John K.
#7
03/27/2008 (12:17 pm)
Have you already reproduced this problem? As I already said it's not easy to create a small sample game. I've changed the game structure to decrease the rate of load / unload of scenes. The problem already happens but it's not predictable.

Let me explain it better. In the game, I load some scenes over other loaded scenes. For example, in the main_scene (game level) I load the popup_window scene and the score_scene. Is there any problem in doing this? Is it possible to exist a relationship between this problem and the rate of load / unload of scenes (over other scenes)?

Leonardo G.