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

Godot randomly crashing when opening TileSet Editor #23672

Closed
mateusfccp opened this issue Nov 12, 2018 · 21 comments
Closed

Godot randomly crashing when opening TileSet Editor #23672

mateusfccp opened this issue Nov 12, 2018 · 21 comments

Comments

@mateusfccp
Copy link
Contributor

mateusfccp commented Nov 12, 2018

Not fixed by #21015, #23578, although the issues are similar.

Godot version:
v3.1.alpha.custom_build.37c5aa1
v3.1.alpha.custom_build.a2e4eb7

OS/device including version:

Arch Linux up-to-date
Kernel 4.18.16-arch1-1-ARCH
Happens both using Intel® HD Graphics 520 (Skylake GT2) and GeForce 940M (driver 410.66)

Issue description:
When trying to open TileSet editor through "Open Editor" button, Godot crashes. If opened through dropdown menu "Edit", as stated by @Liangdi, it won't crash.

Steps to reproduce:

  1. Open Godot
  2. Create a blank project
  3. Create a 2D Scene
  4. Add a TileMap child to it
  5. On the TileMap properties, create a new TileSet and click on it
  6. Click on "Open Editor"
  7. Click elsewhere to close TileMap properties and repeat step 6 until the engine crashes

On my case, there's something about 2/3 chance to crash and 1/3 to not crash and open.

Crash log:

(gdb) handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x37e00) [0x7ffff6652e00] (??:0)
[2] /usr/bin/godot() [0x187750d] (/home/mateusfccp/Downloads/godot-git/src/godot/./core/set.h:573)
[3] /usr/bin/godot() [0x1878501] (/home/mateusfccp/Downloads/godot-git/src/godot/scene/gui/base_button.cpp:157)
[4] /usr/bin/godot() [0x188209c] (/home/mateusfccp/Downloads/godot-git/src/godot/./core/reference.h:267)
[5] /usr/bin/godot() [0x280ba90] (/home/mateusfccp/Downloads/godot-git/src/godot/./core/variant.h:415)
[6] /usr/bin/godot() [0x280d293] (/home/mateusfccp/Downloads/godot-git/src/godot/core/object.cpp:885)
[7] /usr/bin/godot() [0x184d45e] (/home/mateusfccp/Downloads/godot-git/src/godot/./core/variant.h:415)
[8] /usr/bin/godot() [0x184e856] (/home/mateusfccp/Downloads/godot-git/src/godot/./core/reference.h:267)
[9] /usr/bin/godot() [0x184c35b] (/home/mateusfccp/Downloads/godot-git/src/godot/./core/reference.h:267)
[10] /usr/bin/godot() [0x184c175] (/home/mateusfccp/Downloads/godot-git/src/godot/./core/reference.h:267)
[11] /usr/bin/godot() [0x187128c] (/home/mateusfccp/Downloads/godot-git/src/godot/./core/reference.h:267)
[12] /usr/bin/godot() [0x280d40c] (/home/mateusfccp/Downloads/godot-git/src/godot/core/object.cpp:?)
[13] /usr/bin/godot() [0x280d1fb] (/home/mateusfccp/Downloads/godot-git/src/godot/core/object.cpp:869)
[14] /usr/bin/godot() [0x1818c82] (/home/mateusfccp/Downloads/godot-git/src/godot/scene/main/scene_tree.cpp:262)
[15] /usr/bin/godot() [0x1819dc5] (/home/mateusfccp/Downloads/godot-git/src/godot/scene/main/scene_tree.cpp:418)
[16] /usr/bin/godot() [0x45cd8b] (/home/mateusfccp/Downloads/godot-git/src/godot/./core/reference.h:267)
[17] /usr/bin/godot() [0x44bc3a] (/home/mateusfccp/Downloads/godot-git/src/godot/./core/reference.h:267)
[18] /usr/bin/godot() [0x450f31] (/home/mateusfccp/Downloads/godot-git/src/godot/platform/x11/os_x11.cpp:2819)
[19] /usr/bin/godot(main+0x96) [0x4441c6] (/home/mateusfccp/Downloads/godot-git/src/godot/platform/x11/godot_x11.cpp:56)
[20] /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7ffff663f223] (??:0)
[21] /usr/bin/godot() [0x44406e] (??:?)
-- END OF BACKTRACE --
@mateusfccp mateusfccp changed the title TileSet Editor randomly crashes Godot randomly crashing when opening TileSet Editor Nov 12, 2018
@groud groud added this to the 3.1 milestone Nov 12, 2018
@Liangdi
Copy link
Contributor

Liangdi commented Nov 13, 2018

some backtrace:

handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x385c0) [0x7fdb38abc5c0] (??:0)
[2] Set<BaseButton*, Comparator<BaseButton*>, DefaultAllocator>::front() const (/home/liangdi/git/github/godot/./core/set.h:573)
[3] BaseButton::_unpress_group() (/home/liangdi/git/github/godot/scene/gui/base_button.cpp:46)
[4] BaseButton::_gui_input(Ref) (/home/liangdi/git/github/godot/scene/gui/base_button.cpp:157)
[5] MethodBind1<Ref >::call(Object*, Variant const**, int, Variant::CallError&) (/home/liangdi/git/github/godot/./core/method_bind.gen.inc:729 (discriminator 12))
[6] Object::call_multilevel(StringName const&, Variant const**, int) (/home/liangdi/git/github/godot/core/object.cpp:779 (discriminator 1))
[7] Object::call_multilevel(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/liangdi/git/github/godot/core/object.cpp:886)
[8] Viewport::_gui_call_input(Control*, Ref const&) (/home/liangdi/git/github/godot/scene/main/viewport.cpp:1446 (discriminator 2))
[9] Viewport::_gui_input_event(Ref) (/home/liangdi/git/github/godot/scene/main/viewport.cpp:1784 (discriminator 3))
[10] Viewport::input(Ref const&) (/home/liangdi/git/github/godot/scene/main/viewport.cpp:2488 (discriminator 2))
[11] Viewport::_vp_input(Ref const&) (/home/liangdi/git/github/godot/scene/main/viewport.cpp:1227)
[12] MethodBind1<Ref const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/liangdi/git/github/godot/./core/method_bind.gen.inc:729 (discriminator 12))
[13] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/liangdi/git/github/godot/core/object.cpp:945 (discriminator 1))
[14] Object::call(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/liangdi/git/github/godot/core/object.cpp:870)
[15] SceneTree::call_group_flags(unsigned int, StringName const&, StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/liangdi/git/github/godot/scene/main/scene_tree.cpp:262)
[16] SceneTree::input_event(Ref const&) (/home/liangdi/git/github/godot/scene/main/scene_tree.cpp:418 (discriminator 6))
[17] InputDefault::_parse_input_event_impl(Ref const&, bool) (/home/liangdi/git/github/godot/main/input_default.cpp:414)
[18] InputDefault::parse_input_event(Ref const&) (/home/liangdi/git/github/godot/main/input_default.cpp:260)
[19] OS_X11::process_xevents() (/home/liangdi/git/github/godot/platform/x11/os_x11.cpp:1997 (discriminator 3))
[20] OS_X11::run() (/home/liangdi/git/github/godot/platform/x11/os_x11.cpp:2819)
[21] /home/liangdi/git/github/godot/bin/godot.x11.tools.64(main+0xbb) [0x1135431] (/home/liangdi/git/github/godot/platform/x11/godot_x11.cpp:56)
[22] /lib64/libc.so.6(__libc_start_main+0xf3) [0x7fdb38aa8413] (??:0)
[23] /home/liangdi/git/github/godot/bin/godot.x11.tools.64(_start+0x2e) [0x11352be] (??:?)
-- END OF BACKTRACE --

When click on "Open Editor"
selection_100

Godot crashed;

But click the drop down menu "Edit" is ok
selection_099

@mateusfccp
Copy link
Contributor Author

mateusfccp commented Nov 13, 2018

@Liangdi I can confirm that opening through "Edit" on dropdown won't crash here.

How may I provide descriptive backtraces like yours? Mine just print (??:?)

@Zireael07
Copy link
Contributor

@mateusfccp You need to compile Godot from source, this should have debug symbols enabled.

@mateusfccp
Copy link
Contributor Author

mateusfccp commented Nov 13, 2018

@Zireael07 I compiled it from source through AUR (godot-git). Is there any specific flag I have to pass to include debug symbols? It's being compiled with target=release_debug.

@Liangdi
Copy link
Contributor

Liangdi commented Nov 14, 2018

@Zireael07 I compiled it from source through AUR (godot-git). Is there any specific flag I have to pass to include debug symbols? It's being compiled with target=release_debug.

i just compiled with: scons p=x11 -j4
~~

@ghost
Copy link

ghost commented Nov 14, 2018

@Zireael07 I compiled it from source through AUR (godot-git). Is there any specific flag I have to pass to include debug symbols? It's being compiled with target=release_debug.

@mateusfccp I believe you're looking for target=debug.

@akien-mga
Copy link
Member

AUR strips debug info automatically, you have to modify the PKGBUILD to override that: https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces#Compilation_settings

@akien-mga
Copy link
Member

BTW, someone should tell the AUR godot-git maintainers that the desktop file, icon and LICENSE file are already provided in the upstream source, they don't need to make their own.

@mateusfccp
Copy link
Contributor Author

@akien-mga This worked for me.

I've updated my issue to include a new backtrace with working debug symbols.

@akien-mga
Copy link
Member

I managed to trigger it using the steps to reproduce of the OP on 3.1 alpha 4 on Linux. It didn't crash right away but instead the editor froze, and Godot kept one CPU core busy at 100% until I killed it manually. Sounds like some kind of infinite (or very long) loop.

@nazgum
Copy link

nazgum commented Jan 11, 2019

I'm still getting this on the Beta 3.1, clicking "Open Editor" causes crash fairly regularly (am in Linux)

handle_crash: Program crashed with signal 11 Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues [1] /lib/x86_64-linux-gnu/libc.so.6(+0x41100) [0x7fabb677c100] (??:0) [2] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x15dd6da] (<artificial>:?) [3] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x161d698] (??:?) [4] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x109f586] (??:?) [5] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x20e8b65] (??:?) [6] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x20a2f51] (??:?) [7] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x1672768] (<artificial>:?) [8] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x16864e1] (<artificial>:?) [9] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x1687374] (??:?) [10] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x16874ae] (<artificial>:?) [11] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0xada066] (??:?) [12] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x20e87c3] (??:?) [13] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x20a2fd5] (??:?) [14] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x15ffc13] (??:?) [15] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x1671a87] (??:?) [16] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x938951] (??:?) [17] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0xa03ae1] (<artificial>:?) [18] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x7a7d8c] (??:?) [19] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fabb675f09b] (??:0) [20] /home/nazgum/Apps/godot/godot-v3.1-beta1() [0x7b5fae] (??:?)

@nazgum
Copy link

nazgum commented Jan 20, 2019

Just tested with the 2nd beta and is still happening; clicking "Edit Tileset" button from the inspector sometimes crashes.

Linux, Ubuntu, currently testing with an Intel Integrated GPU, but saw same crashes with nvidia.

@nazgum
Copy link

nazgum commented Jan 22, 2019

Seems I am able to narrow this down for when this happens:

If I am editing one tileset in the new tileset editor, and make a change (such as adding a new single tile), then have it still open I switch to a different scene or tilemap, and try to click "Edit Tileset" on that one, it crashes every time.

@nazgum
Copy link

nazgum commented Jan 23, 2019

Slight correction, after I save a tileset in the new editor, it also crashes if I simply swap my view to a different node then come back to the same tileset and click "Edit Tileset"; so something happens after saving the tileset and then trying to reopen the tileset editor that is causing the crash.

(by saving the tileset i mean as a .tres resource, and clicking the disk icon and going to save)

@MarianoGnu
Copy link
Contributor

I cannot replicate this crash with the instructions providen by @nazgum
my guess is that this crash is related to the compiler and/or platform that you are compiling to (i'm using linux mint)
Could you please provide a minimum test project to reproduce it?

@MarianoGnu
Copy link
Contributor

I could hardly reproduce this bug, looks like somehow something is messed up with function pointers
image

@capnm
Copy link
Contributor

capnm commented Jan 25, 2019

I can confirm that in December it was broken, but now
6ad4f16 / Ubuntu 18.04 LTS
the UI seems to work (at least for simple tiles) without errors or crashes.

@nazgum
Copy link

nazgum commented Jan 25, 2019

Sorry to provide more info, I was exclusively trying to create Autotiles with 3x3 bitmask (minimal) - so perhaps it is tied with that.

After drawing some of the bitmask, I would save the tiles as a resource (Tiles.tres), then try opening another tileset to compare the bitmask (and see if I made a mistake), and when I do this, it crashes; always.

Linux Ubuntu 18.10, Intel GPU (also happened on Nvidia), still using Beta2

@capnm
Copy link
Contributor

capnm commented Jan 25, 2019

As MarianoGnu said, create a test project, otherwise it is hard to reproduce your crash.
You can try with my build from the current git tip 190125-godot.x11.opt.tools.64.7z

@akien-mga
Copy link
Member

Note that it's not only with the TileSet editor, other kinds of editors can trigger the same crash when clicking their "Open in Editor" toggle in the inspector (see e.g. #24630).

@capnm
Copy link
Contributor

capnm commented Jan 26, 2019

Good point. By pressing the Shader Editor button Godot crashed randomly. After loosing lot of unsaved work, I decided to preferably double-click the shader in the Filesystem Dock and forgot about it. It is still the case and easy to reproduce. You can e.g. try to open the shader in the test-project from #15617

Create a custom shader. Try to find the button in the Inspector;) and then 1-2x click on the button:

ERROR: free_custom_shader: Condition ' !custom_code_map.has(p_code_id) ' is true.
   At: drivers/gles3/shader_gles3.cpp:753.
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7ff67f00ff20] (??:0)
[2] void memdelete<RasterizerCanvas::Item::Command>(RasterizerCanvas::Item::Command*) (./core/os/memory.h:120)
[3] RasterizerCanvas::Item::clear() (servers/visual/rasterizer.h:1019 (discriminator 2))
[4] VisualServerCanvas::canvas_item_clear(RID) (servers/visual/visual_server_canvas.cpp:928)
[5] VisualServerRaster::canvas_item_clear(RID) (servers/visual/visual_server_raster.h:612)
[6] VisualServerWrapMT::canvas_item_clear(RID) (servers/visual/visual_server_wrap_mt.h:529)
[7] CanvasItem::_update_callback() (scene/2d/canvas_item.cpp:451)
[8] MethodBind0::call(Object*, Variant const**, int, Variant::CallError&) (./core/method_bind.gen.inc:56 (discriminator 4))
[9] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (core/object.cpp:945 (discriminator 1))
[10] MessageQueue::_call_function(Object*, StringName const&, Variant const*, int, bool) (core/message_queue.cpp:256)
[11] MessageQueue::flush() (core/message_queue.cpp:305)
[12] SceneTree::idle(float) (scene/main/scene_tree.cpp:529)
[13] Main::iteration() (main/main.cpp:1877)
[14] OS_X11::run() (platform/x11/os_x11.cpp:2986)
[15] bin/godot.x11.tools.64(main+0xdc) [0x1159e43] (platform/x11/godot_x11.cpp:56)
[16] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7ff67eff2b97] (??:0)
[17] bin/godot.x11.tools.64(_start+0x2a) [0x1159caa] (??:?)
-- END OF BACKTRACE --

Edit: I have to take that back, this crash was introduced in 973b68f
No crashes – only errors in yesterday's build:

...
ERROR: free_custom_shader: Condition ' !custom_code_map.has(p_code_id) ' is true.
   At: drivers/gles3/shader_gles3.cpp:743.

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

10 participants