Skip to content

Segfaults in release (opt) template built with GCC 6 #4623

Closed
@vnen

Description

@vnen

Compiling Godot for release gives consistent SIGSEGV signal when running some of the demos. It seems to be related to the resource loader based on what I get from backtraces.

This is what I get in master with the GUI drag and drop demo (I get an identical BT in other GUI demos, such as input mapping and translation):

(gdb) where
#0  0x0000000000594937 in DVector<String>::resize(int) ()
#1  0x00000000011fdd8c in ResourceInteractiveLoaderBinary::parse_variant(Variant&) ()
#2  0x00000000011fc669 in ResourceInteractiveLoaderBinary::parse_variant(Variant&) ()
#3  0x00000000011ff94b in ResourceInteractiveLoaderBinary::poll() ()
#4  0x000000000122692a in ResourceFormatLoader::load(String const&, String const&, Error*)
    ()
#5  0x00000000012260b9 in ResourceLoader::load(String const&, String const&, bool, Error*)
    ()
#6  0x0000000000429ff3 in Main::start() ()
#7  0x000000000040d0ed in main ()

I went as far as 37af8b4 and still get the same thing, even with a clean build. At that point, the 2d platformer also raises a similar error:

(gdb) where
#0  0x00000000005cdeea in DVector<String>::resize(int) ()
#1  0x000000000109eac9 in ResourceInteractiveLoaderXML::parse_property(Variant&, String&)
    ()
#2  0x000000000109d17c in ResourceInteractiveLoaderXML::parse_property(Variant&, String&)
    ()
#3  0x00000000010a3de7 in ResourceInteractiveLoaderXML::poll() ()
#4  0x00000000010f546a in ResourceFormatLoader::load(String const&, String const&) ()
#5  0x00000000010f4c95 in ResourceLoader::load(String const&, String const&, bool) ()
#6  0x000000000046f70b in GDParser::_parse_expression(GDParser::Node*, bool, bool) ()
#7  0x00000000004719c7 in GDParser::_parse_and_reduce_expression(GDParser::Node*, bool, bool, bool) ()
#8  0x00000000004741f0 in GDParser::_parse_class(GDParser::ClassNode*) ()
#9  0x0000000000476438 in GDParser::_parse(String const&) ()
#10 0x0000000000476767 in GDParser::parse(String const&, String const&, bool, String const&) ()
#11 0x000000000042191e in GDScript::reload() ()
#12 0x0000000000433e07 in ResourceFormatLoaderGDScript::load(String const&, String const&)
    ()
#13 0x00000000010f4c95 in ResourceLoader::load(String const&, String const&, bool) ()
#14 0x000000000046f70b in GDParser::_parse_expression(GDParser::Node*, bool, bool) ()
#15 0x000000000046eabd in GDParser::_parse_expression(GDParser::Node*, bool, bool) ()
#16 0x00000000004719c7 in GDParser::_parse_and_reduce_expression(GDParser::Node*, bool, bool, bool) ()
#17 0x0000000000472230 in GDParser::_parse_block(GDParser::BlockNode*, bool) ()
#18 0x0000000000473ff9 in GDParser::_parse_class(GDParser::ClassNode*) ()
#19 0x0000000000476438 in GDParser::_parse(String const&) ()
#20 0x0000000000476767 in GDParser::parse(String const&, String const&, bool, String const&) ()
#21 0x000000000042191e in GDScript::reload() ()
#22 0x0000000000433e07 in ResourceFormatLoaderGDScript::load(String const&, String const&)
    ()
#23 0x00000000010f4c95 in ResourceLoader::load(String const&, String const&, bool) ()
#24 0x00000000010a3f56 in ResourceInteractiveLoaderXML::poll() ()
#25 0x00000000010f546a in ResourceFormatLoader::load(String const&, String const&) ()
#26 0x00000000010f4c95 in ResourceLoader::load(String const&, String const&, bool) ()
#27 0x00000000010a3f56 in ResourceInteractiveLoaderXML::poll() ()
#28 0x00000000010f546a in ResourceFormatLoader::load(String const&, String const&) ()
#29 0x00000000010f4c95 in ResourceLoader::load(String const&, String const&, bool) ()
#30 0x000000000041ae8a in Main::start() ()
#31 0x000000000040ea2d in main ()

Is DVector<T>::resize() the culprit?

Also, the 2D platformer does not have such problem in current master, but it was updated to the new .tscn format, which may have mitigated the problem. So I guess this can be some compatibility breakage introduced somewhere, so old binary scenes don't load right. It certainly can be something else.

And I hope somebody else can reproduce this issue or I may have to burn my computer 👿

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions