Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on saving script #5620

Closed
batmanasb opened this issue Jul 10, 2016 · 10 comments
Closed

Crash on saving script #5620

batmanasb opened this issue Jul 10, 2016 · 10 comments
Assignees
Milestone

Comments

@batmanasb
Copy link

batmanasb commented Jul 10, 2016

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:

  1. Open any project
  2. Open any script
  3. Make any small change (ex: add/remove newline)
  4. Press ctrl-s to save script
  5. Repeat steps 3 and 4 until it crashes (usually within 5 saves)

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 ~ $

@DimaKiva
Copy link

I confirm.

@OniLink
Copy link

OniLink commented Jul 10, 2016

Can confirm. Arch Linux x64.

@akien-mga akien-mga added this to the 2.0 milestone Jul 10, 2016
@akien-mga
Copy link
Member

Damn :( I'm on it, will fix.

@akien-mga
Copy link
Member

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 ()

@akien-mga akien-mga self-assigned this Jul 10, 2016
@akien-mga
Copy link
Member

Looks like this triggers the bug: 257d370

akien-mga added a commit that referenced this issue Jul 10, 2016
@akien-mga
Copy link
Member

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).

@OniLink
Copy link

OniLink commented Jul 10, 2016

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.

@batmanasb
Copy link
Author

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!

@aaronfranke
Copy link
Member

@akien-mga Any reason not to just mark it as 2.0.5 so that there isn't 4 version numbers?

@vnen
Copy link
Member

vnen commented Sep 18, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants