Wintermute Engine Forum

Wintermute Engine => Bug reports => Topic started by: metamorphium on August 14, 2008, 10:55:29 PM

Title: Desktop crash in WME
Post by: metamorphium on August 14, 2008, 10:55:29 PM
Hi Mnemonic,

I've found and replicate (and already workaround) desktop crash. I don't know if it can be fixed but it's the one which has been sent to you by email.

I've a script which has vaguely something like this:

Code: WME Script
  1. this.AttachScript("scenes\salia3\scr\HoleGame.script");
  2.                
  3. while (!Salia3WreckFound)
  4. {
  5.   Sleep(1000);
  6. }
  7.                        
  8. this.DetachScript("scenes\salia3\scr\HoleGame.script");
  9. while (this.IsScriptRunning("scenes\salia3\scr\HoleGame.script")) Sleep(50);
  10.  

Now in the attached script is a loop:

Code: WME Script
  1. while (true)
  2. {
  3.   {
  4.       if (Game.MouseX < 1000 && Game.MouseX >= 15)
  5.           e.X = Game.MouseX;       
  6.        
  7.         if (Game.MouseY < 740 && Game.MouseY >= 15)
  8.           e.Y = Game.MouseY;
  9.     }
  10.     Sleep(80);  
  11. }
  12.  

In another script is ending condition for the first script. But if you try to detach script while the loop is active, wme desktop crashes. Workaround in my case was to substitute
while(true) for while(!Salia3WreckFound).

Just wanted you to know...