Page 1 of 1

[0.16.15] Modded Items Not Removed From Rockets In-Flight

Posted: Tue Jan 09, 2018 7:34 pm
by can00336
It seems that once a mod is removed from a save that has modded rocket_launch_products that the rockets in-flight do not have their modded items removed and thus cause a crash.
Quickly destroying the rockets in-flight via command before they can trigger the on_rocket_launched event prevents the crash from ever occuring.
modded_rocket_error.jpg
modded_rocket_error.jpg (36.88 KiB) Viewed 701 times
Edit: I forgot to mention that the modded rocket_launch_products were also added to the tracked_items via add_tracked_item at an earlier point in time.

Re: [0.16.15] Modded Items Not Removed From Rockets In-Flight

Posted: Tue Jan 09, 2018 7:36 pm
by Loewchen
Post save and mod where this can be observed please.

Re: [0.16.15] Modded Items Not Removed From Rockets In-Flight

Posted: Tue Jan 09, 2018 7:39 pm
by can00336
Neither the save nor the mod are publicly available for various reasons as the save is Xterminator's Sending Supporters to Space series save and the mod contains thousands of people's real names.
If the devs really need the mod and/or save for some reason, they can DM me or Xterminator for them.

Re: [0.16.15] Modded Items Not Removed From Rockets In-Flight

Posted: Tue Jan 09, 2018 7:57 pm
by can00336
The following change to \data\core\lualib\silo-script.lua seems sufficient to fix the bug:

Code: Select all

*** 137,143 ****
    local force = rocket.force
    local any_tracked = false
    for k, tracked_item in pairs (global.silo_script.tracked_items) do
!     if rocket.get_item_count(tracked_item) > 0 then
        any_tracked = true
        break
      end
--- 137,143 ----
    local force = rocket.force
    local any_tracked = false
    for k, tracked_item in pairs (global.silo_script.tracked_items) do
!     if tracked_item.valid and rocket.get_item_count(tracked_item) > 0 then
        any_tracked = true
        break
      end

Re: [0.16.15] Modded Items Not Removed From Rockets In-Flight

Posted: Tue Jan 09, 2018 8:55 pm
by Klonan
Thanks for the report,

This is fixed for the next release