Terrain trouble
by Anders Jacobsen · in Torque Game Engine · 12/05/2004 (12:27 am) · 9 replies
When I enter the mission editor and go to the sky object and click on expand media tab, Torque crashes...
Here's the console output
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.
Loading compiled script common/editor/EditorGui.cs.
Loading compiled script common/editor/WorldEditorSettingsDlg.gui.
Loading compiled script common/editor/TerrainEditorVSettingsGui.gui.
TerrainEditor::attach: no TerrainBlock objects found!
common/editor/EditorGui.cs (2105): Unable to find object: 'Terrain' attempting to call function 'getHeightfieldScript'
common/editor/EditorGui.cs (2495): Unable to find object: 'Terrain' attempting to call function 'setHeightfieldScript'
common/editor/EditorGui.cs (2495): Unable to find object: 'Terrain' attempting to call function 'setHeightfieldScript'
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
Terraformer::terrainData - TerrainBlock 'terrain' not found.
Heightfield::eval:0 General
Terraformer::terrainData - TerrainBlock 'terrain' not found.
common/editor/EditorGui.cs (2495): Unable to find object: 'Terrain' attempting to call function 'setHeightfieldScript'
Heightfield::eval:0 General
Terraformer::terrainData - TerrainBlock 'terrain' not found.
common/editor/EditorGui.cs (2495): Unable to find object: 'Terrain' attempting to call function 'setHeightfieldScript'
common/editor/EditorGui.cs (1364): Unable to find object: 'Terrain' attempting to call function 'getTextureScript'
Obj: AudioDefault3d -
Obj: AudioClose3d -
Obj: AudioClosest3d -
Obj: AudioDefaultLooping3d -
Obj: AudioCloseLooping3d -
Obj: AudioClosestLooping3d -
Obj: Audio2D -
Obj: AudioLooping2D -
Obj: takeme -
Obj: CrossbowFireSound -
Obj: CrossbowFireEmptySound -
Obj: Observer -
Obj: DefaultTrigger -
Obj: Drone - Vehicles
Obj: ShipWeapImage -
Obj: ShipWeap2Image -
Loading compiled script common/editor/editorRender.cs.
MissionAreaEditor::onWake: no TerrainBlock object.
Could not locate texture: fps/data/terrains/grassland/grass
Could not locate texture: fps/data/terrains/grassland/grass
Could not locate texture: fps/data/terrains/grassland/grass
Could not locate texture: fps/data/terrains/grassland/grass
Could not locate texture: fps/data/terrains/grassland/grass
The debugger led me to guiinspector.cc on line 280.
I don't know how to fix this, help?!
Also if importance. I do not use terrains.
Here's the console output
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.
Loading compiled script common/editor/EditorGui.cs.
Loading compiled script common/editor/WorldEditorSettingsDlg.gui.
Loading compiled script common/editor/TerrainEditorVSettingsGui.gui.
TerrainEditor::attach: no TerrainBlock objects found!
common/editor/EditorGui.cs (2105): Unable to find object: 'Terrain' attempting to call function 'getHeightfieldScript'
common/editor/EditorGui.cs (2495): Unable to find object: 'Terrain' attempting to call function 'setHeightfieldScript'
common/editor/EditorGui.cs (2495): Unable to find object: 'Terrain' attempting to call function 'setHeightfieldScript'
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
Terraformer::terrainData - TerrainBlock 'terrain' not found.
Heightfield::eval:0 General
Terraformer::terrainData - TerrainBlock 'terrain' not found.
common/editor/EditorGui.cs (2495): Unable to find object: 'Terrain' attempting to call function 'setHeightfieldScript'
Heightfield::eval:0 General
Terraformer::terrainData - TerrainBlock 'terrain' not found.
common/editor/EditorGui.cs (2495): Unable to find object: 'Terrain' attempting to call function 'setHeightfieldScript'
common/editor/EditorGui.cs (1364): Unable to find object: 'Terrain' attempting to call function 'getTextureScript'
Obj: AudioDefault3d -
Obj: AudioClose3d -
Obj: AudioClosest3d -
Obj: AudioDefaultLooping3d -
Obj: AudioCloseLooping3d -
Obj: AudioClosestLooping3d -
Obj: Audio2D -
Obj: AudioLooping2D -
Obj: takeme -
Obj: CrossbowFireSound -
Obj: CrossbowFireEmptySound -
Obj: Observer -
Obj: DefaultTrigger -
Obj: Drone - Vehicles
Obj: ShipWeapImage -
Obj: ShipWeap2Image -
Loading compiled script common/editor/editorRender.cs.
MissionAreaEditor::onWake: no TerrainBlock object.
Could not locate texture: fps/data/terrains/grassland/grass
Could not locate texture: fps/data/terrains/grassland/grass
Could not locate texture: fps/data/terrains/grassland/grass
Could not locate texture: fps/data/terrains/grassland/grass
Could not locate texture: fps/data/terrains/grassland/grass
The debugger led me to guiinspector.cc on line 280.
I don't know how to fix this, help?!
Also if importance. I do not use terrains.
#2
I forgot to mention that I'm using the "Star Rendering" resource also. But it seems it might be tied in with the non existant terrain textures, which I presume would be defined in there also (The "media").
The reason I went into that editor was to enable star rendering and
define the data file. I've worked around this problem by editing it manually.
Since the rest of the editor works fine it's not a very big issue for me.
But it'd be nice if it worked 100% without crashing.
12/06/2004 (12:13 am)
Yes, I've removed the terrain properly. The problem only arises when I hit the "media" button in the editor.I forgot to mention that I'm using the "Star Rendering" resource also. But it seems it might be tied in with the non existant terrain textures, which I presume would be defined in there also (The "media").
The reason I went into that editor was to enable star rendering and
define the data file. I've worked around this problem by editing it manually.
Since the rest of the editor works fine it's not a very big issue for me.
But it'd be nice if it worked 100% without crashing.
#3
12/07/2004 (8:54 pm)
Are you sure your initPersistFields data for the object is correct?
#4
Hehe, I have no clue :)
Where do I check that, and what should it be?
12/08/2004 (3:52 am)
What's that?!Hehe, I have no clue :)
Where do I check that, and what should it be?
#5
12/08/2004 (9:05 am)
There's a method on every scriptable object in Torque, in the C++ code, called initPersistFields, which defines all the fields and groups in that object. If you had a bad field definition, that might explain the problem.
#6
I'm not using terrains. I've removed it from the .mis file so... yeah. weird.
Everything works just fine except the mission editor which chokes when I try to expand the "media" list.
I'm pretty certain it'd still crash even if I used vanilla source and removed terrain.
12/08/2004 (10:05 am)
Uhm, yeah... I don't understand how that would make the editor try load up terrain textures and stuff tho...I'm not using terrains. I've removed it from the .mis file so... yeah. weird.
Everything works just fine except the mission editor which chokes when I try to expand the "media" list.
I'm pretty certain it'd still crash even if I used vanilla source and removed terrain.
#7
12/08/2004 (10:49 am)
Well, what I'm getting at is that if you added a field to the sky and it wasn't set up quite right, that would explain why you get a crash when you expand the Media tab on the sky.
#8
01/31/2005 (6:59 am)
Ok thanks, I'll check it out. Even though thinks work fine as long as I stay out of that section in the editor, I'll have a look and attempt to fix that, as it's quite useful to have a "bug free" world editor ;)
#9
02/07/2005 (4:13 pm)
This can happen when you try to make two groups in initPersistFields that have the same name. or possibly if you start a group header without ending it.
Torque Owner Jason "fireVein" Culwell
I opened stronghold.mis in the FPS Starter Kit using notepad, and removed the following block:
new TerrainBlock(Terrain) { rotation = "1 0 0 0"; scale = "1 1 1"; detailTexture = "~/data/terrains/details/detail1"; terrainFile = "./stronghold.ter"; squareSize = "8"; bumpScale = "1"; bumpOffset = "0.01"; zeroBumpScale = "8"; position = "-1024 -1024 0"; locked = "true"; };I loaded up the mission(which no longer had terrain), and changed some of the sky parameters and everything seemed to work fine for me.
-Jase