Closed blurymind closed 8 years ago
Ok this is my mistake. The archive contains the actual creature project file, not the exported data. But if you set an archive without a proper exported json file for the file - it crashes the entire engine - which is pretty harsh. :)
It would also be nice if we could navigate to the file, but I guess that would create more work for you
In fact typing anything in the file box will crash godot, so the user has to always paste the name of the file. In often cases this could lead to a crash, because I like to keep the assets in a subfolder
Sync up and try again. Just checked in a fix. Now it doesn't crash if the incorrect name was typed in. Create a new CreatureGodot object and give it a go.
nice! thank you. I will recompile and give it a try asap.
Btw, it only works for exported jsons or zipped jsons. Error checking for other files will take more time. Sorry.
does it still crash godot if I start typing the path manually?
Since there is no way to navigate to the file, a lot of people who keep their animations in a subfolder might do this:
type res://myAnimationsFolder/
then paste the name of the file at the end of the line
But now when you start typing, you wont go as far as 're...' before it crashes the whole editor.
Its not the worst thing - but definitelly a big gotcha that deserves a warning.
That is very strange, I am experiencing no such crash at all on Windows. Is this a Linux editor issue? I do not control the textbox UI code, that is all up to Godot. What does your error console print?
I need to check it again - but it might be a linux specific one - in which case I will forward it to godot devs for more info.
I just double checked again on Windows. I can keep typing in the textbox with a totally bogus filename without any crashes.
Also, what is your print out in your console before the crash?
For example, I am currently typing in a bogus file called "test" that does not exist, I get the following printout:
settings changed CreatureGodot::load_json() - Loading file: test CreatureGodot::load_json() - ERRROR! Could not load file: test
But no crashes. Godot Editor runs just fine.
when I type res:// and hit enter godot crashes with this error:
CreatureGodot::load_json() - Loading file: /home/owl/INSTALL/godot/creature2dExample/
LoadCreatureJSONData() - Error parsing JSON!
CreatureGodot::load_json() - Finished loading file: /home/owl/INSTALL/godot/creature2dExample/
godot.x11.tools.64: modules/creaturegodot/gason/gason.h:85: JsonNode* JsonValue::toNode() const: Assertion `getTag() == JSON_TAG_ARRAY || getTag() == JSON_TAG_OBJECT' failed.
I will try it with the fixes in a bit. still recompiling
That is very strange, did you sync up and rebuild the latest changes?
not yet, I am compiling it now
ok tested it!
I confirm that your last commit has fixed the issue. Now when I type a wrong directory or path, it just gets erased from the input box. That was an awesome and qucik fix. :+1:
Sounds great, please remember to sync and finish compiling before testing :)
Cheers
thank you for the awesome plugin and for the fixes.
the lichlord file here is the log :
Not sure if this applies to windows builds too, but this crashes godot! Specifying any invalid path or path to a file that doesnt satisfy creature's node will kill godot entirely.