Operating system or device - Godot version:
Linux Mint 18 x64
Godot 2.0.4 Stable (Linux 64) (download from site)
Issue description (what happened, and what was expected):
The editor randomly crashes when I save a script. It happens only with old projects made in 2.0.3. I tried 2.0.3 again and confirmed that the issue is only on 2.0.4. Also, it seems to only occur when using the hotkey (ctrl+s) to save the script. I haven't gotten it to crash when using the menu to save (File > Save). I made a new project in 2.0.4 and the issue went away, but when I tried moving over all my important files (*.tscn and *.png) the issue came back. The Control.tscn and Control.gd was made in 2.0.4 and all I did was try and edit and save Control.gd while having Control.tscn open, and it crashed again, even though I haven't even touched the old files from the 2.0.3 project, but before moving over the old files, it worked just fine. I think the issue has something to do with the *tscn files from 2.0.3.
Steps to reproduce:
Link to minimal example project (optional but very welcome):
game.zip
Terminal Output (No actual error messages appeared, but it crashed very time)
batmanasb@MintySuitcase ~ $ /home/batmanasb/MEGA/Godot/Godot2.0/Godot_v2.0.4_stable_x11.64
OPENING: /home/batmanasb/MEGA/Godot/Projects/Rogue Voyage/game (::home::batmanasb::MEGA::Godot::Projects::Rogue Voyage::game)
VBoxContainer: 136,100
batmanasb@MintySuitcase ~ $ bind toptions
TextureButton: 16,-4
Label: 289,63
HBoxContainer: 70,27
settings changed
^C
batmanasb@MintySuitcase ~ $ /home/batmanasb/MEGA/Godot/Godot2.0/Godot_v2.0.4_stable_x11.64
OPENING: /home/batmanasb/MEGA/Godot/Projects/Rogue Voyage/game (::home::batmanasb::MEGA::Godot::Projects::Rogue Voyage::game)
VBoxContainer: 136,100
bind toptions
batmanasb@MintySuitcase ~ $ settings changed
No completion
^C
batmanasb@MintySuitcase ~ $
I confirm.
Can confirm. Arch Linux x64.
Damn :( I'm on it, will fix.
Backtrace from a crash when saving a level with a tileset:
Also saving modified external resource: res://sprites/tileset.tres
Thread 1 "Godot_v2.0.4_st" received signal SIGSEGV, Segmentation fault.
0x00000000015a3b0a in __dynamic_cast ()
(gdb) bt
#0 0x00000000015a3b0a in __dynamic_cast ()
#1 0x0000000000ba6e58 in EditorDirDialog::_item_collapsed(Object*) ()
#2 0x000000000092a8a4 in MethodBind1<Object*>::call(Object*, Variant const**, int, Variant::CallError&) ()
#3 0x00000000013a453e in Object::call(StringName const&, Variant const**, int, Variant::CallError&) ()
#4 0x00000000013fd961 in MessageQueue::_call_function(Object*, StringName const&, Variant const*, int, bool) ()
#5 0x00000000013fdbea in MessageQueue::flush() ()
#6 0x0000000000c57887 in SceneTree::input_event(InputEvent const&) ()
#7 0x000000000041a4f8 in InputDefault::parse_input_event(InputEvent const&) ()
#8 0x0000000000413694 in OS_X11::handle_key_event(XKeyEvent*, bool) ()
#9 0x0000000000413b91 in OS_X11::process_xevents() ()
#10 0x00000000004142c0 in OS_X11::run() ()
#11 0x0000000000410709 in main ()
Looks like this triggers the bug: https://github.com/godotengine/godot/commit/257d3706777bed2f07003f53435144f48707d020
Fixed by 5184b21. Could you guys try the 2.0 branch to confirm that the issue is fixed, and that there are no other regressions? I've also put a pre-compiled version of Linux x64 here: http://download.tuxfamily.org/godotengine/2.0.4/godot.x11.tools.64_hotfix.zip (built on Mageia 6).
That seems to have fixed it on my end, I tried editing + saving a script about 20 or so times and it never crashed once.
Just tried my project that was crashing nearly instantly (first or second save), and it hasn't crashed in the last 30 or so saves! Great work!
@akien-mga Any reason not to just mark it as 2.0.5 so that there isn't 4 version numbers?
@aaronfranke I think you are a couple of years too late... I mean, by this point this is only history, no need to touch it.
Most helpful comment
That seems to have fixed it on my end, I tried editing + saving a script about 20 or so times and it never crashed once.