Game Development Community

Error of Datablock Editor.

by Olexiy Kravchuk · in Torque 3D Professional · 04/27/2014 (12:35 pm) · 15 replies

Hello, everyone! I apologize in advance if my post is not defined in that section, but more appropriate, I could not find, and I apologize if somewhere in my post will be found not quite right or unclear of speech addition, it's because I'm still pretty hard to translate from my native language into English and vice versa, (ask if that is not clear).
What about the theme of this post ...
Bug manifested itself when I was working in an empty template of the game and tried to create using "data block editor" new object instance of "ShapeBaseImageData" which I wanted afterwards attached to the hand of the character. For this I entered as usual to the tab "new" double-clicked on "ShapeBaseImageData", appeared the usual dialog, I type the name of the new instance, and click "Create", (I want to emphasize that I did not select any objects created before the same "ShapeBaseImageData" type to a new object copied from there, own fields, I just tried to create a completely clean, object with fields by default) but after clicking "create", a new data block was not created, instead, in the tab "existing" at the bottom, instead of the newly founded data block, attached to the directory "ShapeBaseImageData" appeared empty directory, which was called "DatablockEditorTree", and the window "data Block", under, window "library data block" was completely empty ... Here are these 11 data blocks, that ones marked-"fatalERROR", is such that provokes the collapse of the program, the other 9 are simply not available for creating clean and work ...

/*AITurretShapeData - fatalERROR*/
/*FlyingVehicleData*/
/*HoverVehicleData*/
/*ParticleEmitterData*/
/*PhysicsShapeData*/
/*RigidShapeData*/
/*SFXFMODProjectData*/
/*ShapeBaseImageData*/
/*TurretShapeData  -  fatalERROR*/
/*VehicleData*/
/*WheeledVehicleData*/


I ask experienced people to explain to me the situation, why it happen, and how to act in this case, so that I could finally understand the problem and continue my way as quickly as possible.

PS I count on community interest in solving this problem, thank you all in advance.

#1
04/27/2014 (11:27 pm)
Hey Olexiy, thanks for the detailed description. We do like bug reports to be as concise as possible. Is it fair to say this this is the part that describes the exact issue you're having?
Quote:For this I entered as usual to the tab "new" double-clicked on "ShapeBaseImageData", appeared the usual dialog, I type the name of the new instance, and click "Create", (I want to emphasize that I did not select any objects created before the same "ShapeBaseImageData" type to a new object copied from there, own fields, I just tried to create a completely clean, object with fields by default) but after clicking "create", a new data block was not created, instead, in the tab "existing" at the bottom, instead of the newly founded data block, attached to the directory "ShapeBaseImageData" appeared empty directory, which was called "DatablockEditorTree", and the window "data Block", under, window "library data block" was completely empty
In general, we like to see bug reports with a simple and clear list of steps that we can follow to reproduce the bug. I'll give this a go soon and see if I can reproduce the problem you're seeing!

And don't worry, we all have that "dark forest" experience for some time when we start with Torque (as I'm sure we do with any other game engine). Glad to hear you're making some progress though!
#2
04/28/2014 (8:14 am)
Thanks for the quick feedback!
Yes it is about this problem I tell. I apologize for so many letters on, I will try to cut a lot in future posts.
PS I'm looking forward to your findings after your investigations, in this direction.
#3
04/30/2014 (9:50 am)
Do not want to seem pushy, but I got a feeling that the problem was a bit forgotten and abandoned, for several days no answers, but the question is still relevant work at least for me, if to you not difficult to tell me something that will give me hope the fact that the problem can be resolved in the foreseeable future date?
#4
05/04/2014 (5:07 pm)
Sorry Olexiy, I've had a busy week or two with assignments and haven't had time to look into it. Unfortunately I can't give you an ETA- Torque is run on community contributions so someone will have to step up and fix it once we identify the bug.
#5
05/05/2014 (11:54 am)
I very much hope that in the near future correction of these errors happen. Because I can not imagine how it is to work when you can not use some of the most sought-after, data blocks.
PS with no patience, waiting for the good news.
#6
05/05/2014 (1:11 pm)
I never ran into this, but then again I usually create my datablocks directly in script....
#7
05/07/2014 (10:52 am)
Hello Richard, it looks like a way out, I'll try to create a script using your method by hand.
PS but I still think it makes sense to fix this errors, because it may cause more consequences in the future date.
#8
05/07/2014 (11:05 am)
Its hard to tell from the description, but it kind of sounds like Olexiy encountered the creating managed datablocks from unmanaged datablocks issue. We shipped this as a known issue back in the commercial release of either 1.1 or 1.2. The problem is that when creating datablocks in the datablock editor they are managed by the editor. If a managed datablock is created based on an unmanaged one (inheriting from it), you end up with a chicken and egg scenario. This will result in the newly created managed datablock not being loaded on subsequent runs. The best solution we had for this was we added second loading attempt for the managed datablocks to load any that would fail to load before when its parent wasn't loaded. Sometimes this still slips through though and unfortunately had to fall into the try not to do that category.

Again, not sure if that is what Olexiy is running into here, but it sounds similar.
#9
06/14/2014 (6:44 pm)
Scott, he mentioned that he wasn't creating the datablock with any inherited values - he wanted a completely fresh start.

Olexiy, unfortunately what's going on here is that ShapeBaseImageData cannot be created from scratch. It's very frustrating. If you try to create a ShapeBaseImageData from scratch and then check the console, you'll see a line like this:
<input> (0): preload failed for Tester: Bad Datablock from server.
This is because the datablock actually fails to be created due to having empty fields.

I'm not sure what the proper fix here is. Obviously this is very poor behaviour.

Is it the editors' fault, for not providing any way to fill in essential values before the datablock is created? For example, the dialog with the name entry field could provide the ability to add critical members that are required for datablock creation. In fact, I thought TGE used to do this.

Or is it the engine's fault for not permitting an empty datablock?

Created #696.
#10
06/16/2014 (12:41 pm)
I think that this problem is quite easy to fix, just initialized in the class constructor directly in C + + code in the required fields beforehand by default, and to realize the way to change them through the script if it is suitable for re-editing.
I'm very insecure but trying to understand the source code of the engine, maybe in the future I'll try to get results if nobody does not outpace me, but so far it's too hard for me, I don `t know the entire structure of the engine and how it relates to this script, I have more questions than answers, and I long time not worked with C + +, mostly different kinds of scripts, therefore hardly will happen in the near future date.
#11
06/16/2014 (5:30 pm)
I think one of the main problems is that the image doesn't have a shape file, which is a hard default to fill in - if your game doesn't have that particular hardcoded shape file then it will fail anyway. And it's really not great to require developers to provide default shape files on hardcoded paths.

I think a decent solution would be to allow empty datablocks.
#12
06/17/2014 (8:35 am)
But if the problem is only to specify the directory of the file in which the 3D shape. it turns out that that field is initialized by the simplest reference "string" type what keeps us from, inscribed in the constructor defaults to "NONE" or "" emptiness? and even if there is something, is possible to create primitive like soother into the kernel directory? And use it as the default for all similar cases? like use "NO material" for the missing textures?
#13
06/17/2014 (3:30 pm)
I'll have to look into the code - I think it's likely that the shape file parameter defaults to "" or NULL, but there's probably an explicit check for it in ShapeBaseImageData::preload or ::onAdd. And probably lots of unckeched uses of the shape file or shape instance in later code. I'll see what I can find out...
#14
06/18/2014 (10:00 am)
I would like to mention one more moment of thought which I consider this is a problem that can not be in "ShapeBaseImageData" it may be in the class from which this and the other classes are derived, and have inherited the same problem, collectively, from one ancestor .
#15
11/12/2016 (6:34 am)
A fix about this issue github.com/GarageGames/Torque3D/pull/1828