Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Mihulik on August 30, 2010, 02:14:55 PM
-
Hi,
I have a weird problem.
The game crashes when I want the game to be changed to the scene B.
However, it occurs only if the game is changed to the specific scene B. If the game is changed to another scene, it works well.
(http://img830.imageshack.us/img830/305/theproblem.jpg)
The script that changes to the scene B is:
#include "scripts\base.inc"
on "LeftClick"{
actor.GoToObject(this);
if(Game.IsItemTaken("flaming torch")){
Game.ChangeScene("scenes\Obzorye_Island-Svitava_Complex-Underground_corridor\Obzorye_Island-Svitava_Complex-Underground_corridor.scene");
}
else{
actor.Talk("inventory-08-special-04");
}
}
The scene-init script of the scene B is:
#include "scripts\base.inc"
Game.Interactive = false;
if(Game.PrevScene == "Obzorye_Island-Svitava_Complex-Main_hall"){
actor.SkipTo(458, 762);
actor.Direction = DI_UP;
actor.Active = true;
actor.Talk("inventory-08-special-02");
}
else if(Game.DebugMode){
actor.SkipTo(516, 723);
actor.Direction = DI_DOWN;
actor.Active = true;
actor.Talk("The scene has been chosen as the startup scene in the debug mode...");
}
Game.Interactive = true;
Moreover, when I set the scene B as the debug startup scene, it works well too.
I'm really confused. I'll be very glad if anyone give me advice :)
-
Hi,
I can't see anything wrong. Have you looked up the "wme.log" file in your game directory? Maybe the information there helps you to track down the failure.
Cheers, maze
-
Can you isolate the crash in some minimal project so that I can test it?
-
maze: The log is empty:-/ Nothing strange is written there respectively.
Mnemonic: When I go through the game in the normal (non-debug) mode, it works well. However, when I set the scene A as the debug startup scene and then I try to go to the scene B, it crashes. ???
-
Please do as Mnemonic said. Send him a minimal project that exhibits this behavior otherwise he can't test or reproduce it.
-
Well, I'll ask my teammates whether it'll mind them if I provide you a part of the game.
I don't know any reason why it should mind them but to be sure I'll ask them.
Then, if they don't mind, I'll provide you a test project :)
-
I found a almost systematic crash on Game.changeScene on my side. Perhaps it is similar
In my first scene, I have a very simple Window that I use to display the text on the top of the screen. There is only one control : a static
When I quit this Scene for another Scene. I unload the window ( either manually with Game.UnLoad before Game.Change Scene, either on Scene.ShutDown).
The result is that works perfectly under Windows XP. But under Windows 7 64 bits, sometimes the Game.ChangeScene crashed but not systematically. After several tests I've discovered that I can remove the crash foreever just while adding a comment before Game.LoadWindow .....
-
Well, I've asked my teammates and they've agreed. I could upload you the entire project but it'd be too uncomfortable for you to go through it.
So, I'll isolate the problem in a new project that will be as small as possible. Unfortunately, I'm quite busy today and tomorrow so, I should do it at the weekend :)
-
I've sent Mnemonic a PM with a link to download the project. So, we'll see :)
-
Oh that's a rather silly bug. It's caused by the debug display ("Scene: xxx (prev: yyy)"). This debug line is limited to 100 characters and your scene names are too long...
-
Oh :)
I thought it could be the reason of the problem but then I refused it because when I set the scene B as the debug startup scene, it was working...However, now I see why. Beucase the previous scene is an empty string then :)
-
I'm sorry for awaking this old topic but I'm wondering whether there is a way around the problem.
For example recompiling the engine with longer debug line...I could rename my scenes but I really do not want to.:-)
-
Yes, it needs to be recompiled. Can't think of any workaround other than renaming the scenes.
-
So, if I ask you for the sources because of changing that, will it by possible?:)
-
Sources are available to all (http://forum.dead-code.org/index.php?board=28.0) under LGPL3. Please read the license before you redistribute your own compile.
-
Thanks:-)
Mnemonic could you tell me which file affects the length of the debug text line?
Thank you:-)
-
AdGame.cpp, line 2270
-
Thanks for your so quick reply:)