[0.13.6][posila] crash when adding sprite-button for entity w/o icon

This subforum contains all the issues which we already resolved.
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

[0.13.6][posila] crash when adding sprite-button for entity w/o icon

Post by prg »

Code: Select all

/c game.player.gui.center.add{type="sprite-button", sprite="entity/rocket-silo-rocket"}

Code: Select all

   0.000 2016-07-08 16:56:44; Factorio 0.13.6 (build 23136, linux64, alpha)
   0.000 Operating system: Linux
   0.000 Program arguments: "/home/prg/Downloads/factorio-0.13/bin/x64/./factorio" "" 
   0.000 Read data path: /home/prg/Downloads/factorio-0.13/data
   0.000 Write data path: /home/prg/Downloads/factorio-0.13
   0.000 Binaries path: /home/prg/Downloads/factorio-0.13/bin
   0.009 Graphics options: [FullScreen: false] [VSync: false] [UIScale: 100%] [MultiSampling: OFF] [Graphics quality: normal] [Video memory usage: all] [Light scale: 100%] [Screen: 0] [DXT: auto]
   0.079 Available display adapters: 4
   0.079  [0]: resolution 1280x1024px at [2304,0]
   0.079  [1]: resolution 1024x768px at [0,0]
   0.079  [2]: resolution 1280x1024px at [1024,0]
   0.079  [3]: resolution 1280x1024px at [3584,0]
   0.079 Create display on adapter 0. Size 1280x720 at position [0, 134].
   0.176 Initialised OpenGL:[0] GeForce GTX 660/PCIe/SSE2; driver: 4.5.0 NVIDIA 367.27
   0.176     Video memory size (dedicated/total available/current available): 2048/2048/1403 MB
   0.248 Loading mod core 0.0.0 (data.lua)
   0.250 Loading mod base 0.13.6 (data.lua)
   0.312 Checksum for core: 714099156
   0.312 Checksum for mod base: 1855085279
   0.621 Initial atlas bitmap size is 16384
   0.624 Created atlas bitmap 16384x6507
   0.626 Created atlas bitmap 4096x4088
   0.627 Created atlas bitmap 4096x4088
   0.628 Created atlas bitmap 4096x3988
   0.628 Created atlas bitmap 4096x968
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
   5.600 Sprites loaded
   5.600 Convert atlas 4096x4088 to: compressed 
   6.278 Convert atlas 4096x4088 to: compressed 
   6.875 Convert atlas 4096x3988 to: compressed 
   7.321 Convert atlas 4096x968 to: trilinear-filtering 
   7.343 Loading sounds...
   8.551 Custom inputs active: 0
   8.574 Factorio initialised
  13.695 Info Scenario.cpp:127: Map version 0.13.6-0
  13.732 Checksum for script /home/prg/Downloads/factorio-0.13/temp/currently-playing/control.lua: 900459546
  16.739 Error CrashHandler.cpp:183: Received SIGSEGV
  17.267 Warning Logger.cpp:360: Symbols.size() == 16, usedSize == 10
Factorio crashed. Generating symbolized stacktrace, please wait ...
  17.781 Warning Logger.cpp:360: Symbols.size() == 15, usedSize == 9
#0  0x7ce13b in CrashHandler::writeStackTrace() at /tmp/factorio-EAM95S/src/Util/CrashHandler.cpp:84
#1  0x7ce3b4 in CrashHandler::SignalHandler(int) at /tmp/factorio-EAM95S/src/Util/CrashHandler.cpp:188
#2  0x7f4f0f0fe270 in ?? at ??:0
#3  0xd4b7e1 in _draw_tinted_rotated_scaled_bitmap_region at /tmp/factorio-EAM95S/libraries/Allegro/src/bitmap_draw.c:78
#4  0x5719e2 in al_draw_tinted_scaled_rotated_bitmap_region at /tmp/factorio-EAM95S/libraries/Allegro/src/bitmap_draw.c:234
#5  0xc1fdc3 in GuiRenderer::render() const [clone .isra.66407] at /tmp/factorio-EAM95S/src/Graphics/ImageDrawOrder.cpp:67
#6  0xc8c2ef in renderNotOptimised at /tmp/factorio-EAM95S/src/Graphics/ImageDrawOrder.cpp:72
#7  0x7f4f0f0eb620 in render at /tmp/factorio-EAM95S/src/Graphics/GuiRenderer.cpp:49
#8  0x40a459 in MainLoop::run(boost::filesystem::path const&, boost::filesystem::path const&, bool, bool, bool, std::string const&, boost::filesystem::path const&, MainLoop::HeavyMode, unsigned int) [clone .constprop.68487] at /tmp/factorio-EAM95S/src/GlobalContext.cpp:793
  17.781 Error CrashHandler.cpp:85: Map tick at moment of crash: 141
  17.781 Error Util.cpp:77: Unexpected error occurred. You can help us to solve the problem by posting the contents of the log file on the Factorio forums.
This only seems to happen for entities that don't have an icon defined.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
posila
Factorio Staff
Factorio Staff
Posts: 5341
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.13.6][posila] crash when adding sprite-button for entity w/o icon

Post by posila »

Thanks for the report. Fixed for 0.13.7

LuaGuiElement::add won't create sprite-button and will return nil, when invalid sprite path is passed. Also writing invalid sprite path to LuaGuiElement::sprite won't do anything.
posila
Factorio Staff
Factorio Staff
Posts: 5341
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.13.6][posila] crash when adding sprite-button for entity w/o icon

Post by posila »

Had to change it again for 0.13.8.
"entity/rocket-silo-rocket" will create button with empty sprite.
You can use LuaGui::is_valid_sprite_path to check if there is some sprite.
Post Reply

Return to “Resolved Problems and Bugs”