Crash Bug 3.6.3 - GUI Editor

Scripts and codes that enhances or changes the GUI in the engine.
5 posts Page 1 of 1
Steve_Yorkshire
Posts: 248
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Wed Feb 11, 2015 12:01 am
Keep getting a crash/lockup in the new 3.6.3. Stock code. Open GUI editor up and then close twice and it all crashes.
Note: not an issue in 3.6.2.

To reproduce method 1:
Start a level, start GUI editor (F10), close it, reopen GUI editor (F10), close it again and crash/lock.
The error which loops into eternity.
To reproduce method 2:
At MainMenu open GUI Editor, close it, open it again and close aghain and crash/lock.
To reproduce method 3:
Open GUI Editor once, then exit and quit Torque. Lots of errors but T3D will quit before it locks.

The error which loops to crash:
tools/guiEditor/scripts/guiEditorCanvas.ed.cs (223): Unknown command delete.
  Object (4479) MenuBuilder
The script: tools/guiEditor/scripts/guiEditorCanvas.ed.cs
/// Called before onSleep when the canvas content is changed
function GuiEditCanvas::onDestroyMenu(%this)
{
   if( !isObject( %this.menuBar ) )
      return;

   // Destroy menus      
   while( %this.menuBar.getCount() != 0 )
      %this.menuBar.getObject( 0 ).delete();//yorks - here be dragons!
   
   %this.menuBar.removeFromCanvas();
   %this.menuBar.delete();
}
Suggest:
Image

Bonus Suggestion:
A dedicated bug forum for checking stuff might be useful.
Steve_Yorkshire
Posts: 248
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Wed Feb 11, 2015 12:56 am
Looks like MenuBuilder is getting added on the 2nd time GUI Editor is opened - for reasons unknown to god nor nature. :roll:

Also note if you do get to quit before it crashes you get the errors:
tools/base/menuBar/menuBuilder.ed.cs (157): Unknown command removeFromMenuBar.
  Object (4359) MenuBuilder
I made a really crappy workaround which really needs a proper fix:
/// Called before onSleep when the canvas content is changed
function GuiEditCanvas::onDestroyMenu(%this)
{
   if( !isObject( %this.menuBar ) )
      return;

   // Destroy menus      
   while( %this.menuBar.getCount() != 0 )
      //%this.menuBar.getObject( 0 ).delete();//yorks out
   {//yorks in start
      %menu = %this.menuBar.getObject( 0 );
      %canDelete = isMethod(%menu.getClassName(), delete);
      if(%canDelete)
         %menu.delete();
      else
      {
         echo("\c2error removed " @ %menu);
         %this.menuBar.remove(%menu);
      }
   }//yorks in end

   %this.menuBar.removeFromCanvas();
   %this.menuBar.delete();
}
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Wed Feb 11, 2015 11:09 pm
Thanks for the detective work. That's kind of bizarre. So some item/s added to the menu in the GUI editor actually can't be deleted?
rlranft
Posts: 298
Joined: Thu Feb 05, 2015 3:11 pm
 
by rlranft » Thu Feb 12, 2015 3:12 am
Technically, they can be deleted - they just don't implement the delete() console method, so you can't delete them... :mrgreen:
LukasPJ
Site Admin
Posts: 379
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Tue Feb 17, 2015 11:09 am
Moved to the 'GUI' forum.
5 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest