Game Development Community

Critical Bug: GUI Save/Reopen Corrupts Project

by Jordan Parsons · in Torque 3D Professional · 08/04/2009 (12:21 am) · 3 replies

**WARNING BEFORE TESTING**
Trying to replicate this bug will render your current project useless and you will no longer be able to open it by any means (that I've found so far). Test this on a new project - you've been warned.

What I did?
- Created new project
- Loaded 'newMission' mission
- Pressed F10 to go into GUI Editor (EditorGui.ed.gui was the default GUI I was editing at the time)
- Added a new GuiIconBtnCtrl to the "Level" tab (by means of copy/paste from the "System" GuiIconBtnCtrl
- Saved 'EditorGui.ed.gui' as 'EditorGui.ed.gui' (no change)
- Pressed F10 to get out of GUI and the project crashes.

What I've done since?
I performed 2 tests - the one you see above which now prevents me from opening that project and another test which involved saving the changes to 'EditorGui.ed2.gui' instead of 'EditorGui.ed.gui'. This allows me to keep working on the project and other GUI's except now when I try to load 'EditorGui.ed2.gui' (File > Open from file...) it crashes. It seems the original out-of-the-box 'EditorGui.ed.gui' doesn't like changes to it and if you make changes to it, save them off, and try to run your project it will crash it and render it useless.

Like I said, the only other way around corrupting your project is to rename it to something else, but I'm still unable to make changes to the stock GUI's without this happening upon loading the GUI I changed.

#1
08/04/2009 (12:37 am)

You can't really work with EditorGui like that. It's a very special GUI that is mostly composed dynamically from individual GUIs. Lots of native code will connect to the functionality here.

BTW, the GUI Editor has received quite some attention in the upcoming release. As a minor thing, it will also now toggle into editing PlayGui instead of EditorGui.
#2
08/04/2009 (1:54 am)
Ok, thanks for the info. Any good direction or tips you could give me on what to do and what to stay away from when editing the EditorGui (other than don't edit it..ahh..come on...I know you were thinking it! ;))?

Before I was rudely interrupted by the EditorGui, I was working on a primitive shape editor within Toque that I think would be helpful in creating basic shapes that could be linked together - similar to Constructor in a way, or more so 3DS Max. I'd like to release it as a resource eventually and the EditorGui would be the perfect place for it (unless I just create a popup/console-based editor).
#3
08/04/2009 (9:14 am)

I'd recommend working on your GUI in isolation and adding it to EditorGui in script code. The editor has a number of hooks that could be used. You could, for example, create a new editor plugin for your functionality. Simply look at the existing plugins. It's not too difficult.

In the new GUI editor you also have the option to save isolated GUIs within the tree, but even then I'd recommend working on your GUI in isolation.