[0.12.30] [kovarex] Crash when clearing modded blueprint item

This subforum contains all the issues which we already resolved.
Lilly
Inserter
Inserter
Posts: 49
Joined: Mon Apr 11, 2016 6:42 pm
Contact:

[0.12.30] [kovarex] Crash when clearing modded blueprint item

Post by Lilly »

Description:
Clearing a blueprint item that doesn't have 'item_to_clear' set, crashes the game.

Expected result:
Any of the following:
  • Display a message stating that the blueprint cannot be cleared.
  • Clear the blueprint without using an item.
  • Throw an error stating that 'item_to_clear' is not set while loading the mod
It would be nice if modders can specify that a blueprint item cannot be cleared or specify that clearing doesn't use any items.

Reproduction scenario:
  1. Install the attached mod.
  2. Start a new game (the mod will provide some additional starting items, including the 'broken blueprint' item).
  3. Place an object (for example, a wooden-chest or burner-inserter).
  4. Use the 'broken blueprint' item (signal B icon) to create a blueprint.
  5. Try to clear the blueprint by right-clicking it. This crashes the game.
Stacktrace:

Code: Select all

#0  0x7fedc62282f0 in ?? at ??:0
#1  0xdfed68 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) at ??:?
#2  0x52622c in LocalisedString::LocalisedString(LocalisedString const&) at /usr/include/c++/5/bits/stl_vector.h:655
#3  0x547a59 in std::vector<LocalisedString, std::allocator<LocalisedString> >::vector(std::vector<LocalisedString, std::allocator<LocalisedString> > const&) at /usr/include/c++/5/bits/stl_vector.h:320
#4  0x547cbe in LocalisedString::LocalisedString(LocalisedString const&) at /tmp/factorio-muYlK6/src/Util/LocalisedString.hpp:14
#5  0x99c212 in void std::vector<LocalisedString, std::allocator<LocalisedString> >::_M_emplace_back_aux<LocalisedString const&>(LocalisedString const&) at /usr/include/c++/5/ext/new_allocator.h:120
#6  0x78d329 in _S_construct<LocalisedString, const LocalisedString&> at /usr/include/c++/5/bits/alloc_traits.h:256
#7  0x6d427c in construct<LocalisedString, const LocalisedString&> at /usr/include/c++/5/bits/alloc_traits.h:402
#8  0xa46ff5 in _M_emplace_back_aux<const LocalisedString&> at /usr/include/c++/5/bits/vector.tcc:416
#9  0x6d3488 in LocalisedString::LocalisedString(std::string const&, LocalisedString const&) at /tmp/factorio-muYlK6/src/Util/LocalisedString.cpp:122
#10 0x7523b4 in GameActionHandler::clearBlueprint(InputAction const&, Controller*) at /tmp/factorio-muYlK6/src/GameActionHandler.cpp:739 (discriminator 4)
#11 0xd5851f in GameActionHandler::actionPerformed(InputAction const&) at /tmp/factorio-muYlK6/src/GameActionHandler.cpp:206 (discriminator 4)
#12 0x7fedc7d876aa in InputHandler::flushActions(bool) at /tmp/factorio-muYlK6/src/Input/InputHandler.cpp:41
#13 0x7fedc62f9e9d in flushActions at /tmp/factorio-muYlK6/src/Input/InputHandler.cpp:34
Workaround:
Specify an unobtainable dummy item as 'item_to_clear' and use 'to know that it's impossible' as the item's name. When trying to clear such a blueprint it gives the message: "You need to know that it's impossible to clear this blueprint.".
Attachments
bugmod.zip
Bug reproduction mod
(1.92 KiB) Downloaded 173 times
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5328
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.12.30] Crash when clearing modded blueprint item

Post by Klonan »

Thank you for the report

Can reproduce, with the provided mod,
https://gfycat.com/UnacceptableIdealisticHornedtoad

The item_to_clear node doesn't exist
Crash report
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.12.30] [kovarex] Crash when clearing modded blueprint item

Post by kovarex »

Fixed for 0.12.31
Post Reply

Return to “Resolved Problems and Bugs”