Game Development Community

Problem with Mission Editor

by DavidRM · in Torque Game Engine · 07/01/2002 (11:48 am) · 5 replies

I'm getting this error whenever I try to start the Mission Editor:

common/editor/EditorGui.gui (0): Register object failed for object EWorldEditor.

My editor scripts are identical to the ones in the most recent HEAD (I've checked repeatedly). And my build is also created from the most recent HEAD.

I'm at a bit of a loss here. Any help pointing me in the correct direction would be appreciated.

-David
Samu Games

#1
07/01/2002 (1:06 pm)
Took a quick look at the WorldEditor onAdd method, and the only reason it should fail to register is if some bitmaps are missing... looking at the editorGui.gui file, it looks like it's trying to load these:

common/editor/SelectHandle.png
common/editor/DefaultHandle.png
common/edirot/LockedHandle.png

and then I believe there are some cursors loaded as well. If it couldn't load the cursors though, you should have a console warning.
#2
07/01/2002 (1:44 pm)
Unfortunately, that's the only log message I get on the topic:

Loading compiled script common/editor/cursors.cs.
Loading compiled script common/editor/editor.bind.cs.
Loading compiled script common/editor/ObjectBuilderGui.gui.
Loading compiled script common/editor/EditorGui.gui.
common/editor/EditorGui.gui (0): Register object failed for object EWorldEditor.
Loading compiled script common/editor/EditorGui.cs.
Loading compiled script common/editor/WorldEditorSettingsDlg.gui.
Loading compiled script common/editor/TerrainEditorVSettingsGui.gui.
common/editor/EditorGui.cs (230): Unable to find object: 'EWorldEditor' attempting to call function 'init'
Tab data: General^Tab_general^general_min_height^50^general_scale^300^general_water^0.000^general_centerx^0^general_centery^0 tab: Tab_general
Heightfield::eval:0  General
Heightfield::eval:0  General
Heightfield::eval:0  General
common/editor/EditorGui.cs (236): Unable to find object: 'Creator' attempting to call function 'init'
common/editor/EditorGui.cs (237): Unable to find object: 'EditorTree' attempting to call function 'init'
Loading compiled script common/editor/editorRender.cs.
common/editor/EditorGui.cs (686): Unable to find object: 'EWFrame' attempting to call function 'setVisible'
common/editor/EditorGui.cs (687): Unable to find object: 'EWMissionArea' attempting to call function 'setVisible'
common/editor/EditorGui.cs (688): Unable to find object: 'EWCreatorPane' attempting to call function 'setVisible'
common/editor/EditorGui.cs (689): Unable to find object: 'EWInspectorPane' attempting to call function 'setVisible'
common/editor/EditorGui.cs (651): Unable to find object: 'EWorldEditor' attempting to call function 'setVisible'
common/editor/EditorGui.cs (656): Unable to find object: 'EWorldEditor' attempting to call function 'makeFirstResponder'

Every other error message I get is obviously a direct result of the first one. And, therefore, not much help.

I've verified the path of the loaded images, and the paths of the cursors. They are correct, and like you said, it seems I would get a log message if there was a problem loading them.

I'd step through with the debugger...except that the error comes in the load of the compiled script, and so it's quite hard to track at what point it's failing.

Thanks.

-David
#3
07/01/2002 (2:31 pm)
Can you set a breakpoint in the WorldEditor::onAdd() method and find out why it's returning false? If the cursors and bitmaps are loading correctly, maybe it's the call the the Parent::onAdd() that's failing?
#4
07/01/2002 (3:06 pm)
Try copying fresh images over the three that Tim named. If those images exist and you're still getting the problem, it's usually a corrupted image. You'll get that from CVS, for example, if it hasn't been properly told to treat images as binary.
#5
07/01/2002 (3:14 pm)
Jeremy, I had just finished stepping through and watching the image loads fail...that's it exactly. The PNG images in the common/editor folder were corrupted. I copied them back out of the torque HEAD and it's working again.

Thanks, Tim, Jeremy!

-David