DRY411S / Recycling-Machines

A factorio mod that adds Recycling Machines to the game. These disassemble products back into their original ingredients.
GNU General Public License v3.0
10 stars 2 forks source link

__ZRecycling__/data-final-fixes.lua:262: bad argument #1 to 'pairs' (table expected, got nil) #40

Closed totobest closed 7 years ago

totobest commented 7 years ago

Updated to latest version and now the mod fails to load.

   9.318 Loading mod ZRecycling 0.15.5 (data-final-fixes.lua)
   9.324 Error ModManager.cpp:957: Failed to load mod "ZRecycling": __ZRecycling__/data-final-fixes.lua:262: bad argument #1 to 'pairs' (table expected, got nil)
   9.326 Loading mod core 0.0.0 (data.lua)
   9.386 Checksum for core: 2985821474
   9.527 Error ModManager.cpp:957: Error in assignID, resource-category with name 'basic-solid' does not exist.

Source: starting-area (noise-layer).
   9.651 Loaded shader file D:/games/steamapps/common/Factorio/data/core/graphics/shaders/game.cso
   9.651 Loaded shader file D:/games/steamapps/common/Factorio/data/core/graphics/shaders/zoom-to-world.cso
   9.657 Initial atlas bitmap size is 16384
   9.658 Created atlas bitmap 192x5
   9.658 Created atlas bitmap 132x24
   9.839 Sprites loaded
   9.839 Convert atlas 132x24 to: trilinear-filtering 
   9.842 Custom inputs active: 0
   9.853 Factorio initialised
   9.853 Mods to disable:Failed to load mods: __ZRecycling__/data-final-fixes.lua:262: bad argument #1 to 'pairs' (table expected, got nil)

Mods to be disabled:
• ZRecycling
DRY411S commented 7 years ago

Thanks for the report.

Which version did you update from?

My mod expects that all recipes have ingredients AND something (a result) which is made from those ingredients.

Please say what mods you are using. You have a mod which has a recipe which has ingredients but no result.

This similar to a bug in factorio 0.13, which I did manage to fix, https://github.com/DRY411S/Recycling-Machines/issues/21

totobest commented 7 years ago

Actually, I'm using the 0.15.5 since July 22nd. It means the error occurs since I have updated another mod. It would be nice that ZRecycling tells which mod is the culprit though. I have a big list of mods and finding the bad one is a bit cumbersome.

Also, ZRecycling could ignore the faulty recipe and show a warning at the beginning of the game?

Mod list:

  1. Additional-Turret 0.1.8
  2. Bio_Industries 1.8.2
  3. DeepMine 0.1.3
  4. EndgameCombat 0.0.5
  5. EvoGUI 0.4.207
  6. FARL 1.1.7
  7. Factorissimo2 2.1.8
  8. Flare Stack 2.1.4
  9. Flow Control 3.0.2
  10. Geothermal 1.0.0
  11. Honk 2.1.3
  12. IncendiaryMunitions 0.3.0
  13. KS_Power 0.1.12
  14. Localized_Charging 1.1.0
  15. MIRV 0.1.1
  16. Nuclear Locomotives 1.1.2
  17. Orbital Ion Cannon 1.5.2
  18. PickerExtended 2.8.1
  19. Rampant 0.15.21
  20. SmartDisplayRedux 1.1.1
  21. SmartTrains 2.1.0
  22. Teleportation 0.15.7
  23. TheFatController 2.0.11
  24. TimeTools 1.0.29
  25. TurretDelay 1.0.2
  26. Turtle_Speed 0.2.2
  27. aai-vehicles-chaingunner 0.2.4
  28. aai-vehicles-flame-tumbler 0.2.3
  29. aai-vehicles-laser-tank 0.2.1
  30. advanced-logistics-system 0.5.1
  31. alien-biomes 0.2.7
  32. alien-space-science 0.0.4
  33. angelsaddons-warehouses 0.2.1
  34. angelsinfiniteores 0.6.11
  35. base 0.15.33
  36. bobassembly 0.15.7
  37. bobenemies 0.15.2
  38. boblibrary 0.15.8
  39. boblogistics 0.15.6
  40. bobmining 0.15.2
  41. bobpower 0.15.4
  42. bobvehicleequipment 0.15.2
  43. cncs_Sulfur_Mod 1.0.2
  44. core 0.0.0
  45. creative-mode 0.3.10
  46. data-raw-prototypes 0.3.1
  47. folk-shuttle 0.1.12
  48. helmod 0.5.7
  49. recursive-blueprints 0.15.10
  50. research-queue 1.5.1
  51. robotMiningSite 0.6.2
  52. rso-mod 3.3.11
  53. supportive-weapons 0.3.1
  54. upgrade-planner 1.4.10
  55. water-fix 0.2.1
DRY411S commented 7 years ago

Actually, I'm using the 0.15.5 since July 22nd. It means the error occurs since I have updated another mod.

It's possible then that one of the other mods could have a bug.

It would be nice that ZRecycling tells which mod is the culprit though. I have a big list of mods and finding the bad one is a bit cumbersome.

Also, ZRecycling could ignore the faulty recipe and show a warning at the beginning of the game?

It would be nice, I will explore whether it is possible to output the bad recipe into the log file during this bug fix.

Essentially the bug fix will be to ignore the recipe. The recipe that causes this error has no results, therefore there is nothing to put into the Recycling Machine

Mod list:

Wow! This may take some time to find and fix.

DRY411S commented 7 years ago

The problem is caused by the Supportive Weapons mod, which has a recipe with no results. This really doesn't make any sense.

{ allow_decomposition = false, category = "advanced-crafting", enabled = false, energy_required = 10, icon = "__supportive-weapons__/graphics/icons/tissue-leaching.png", ingredients = { { amount = 1, name = "supportive-weapons_dissolved-tissue", type = "item" }, { amount = 5, name = "sulfuric-acid", type = "fluid" } }, main_product = "", name = "supportive-weapons_tissue-leaching", order = "i[supportive-weapons]-a[tissue-leaching]", requester_paste_multiplier = 10, subgroup = "raw-material", type = "recipe" }

Before I fix this, I've raised an issue with the Supportive Weapons Mod author to see whether it's actually a bug in their mod.

DRY411S commented 7 years ago

A fix for this is in development for the next release, which will also include some new features and performance improvements.