Page 1 of 1

[0.16.51] Crash with mod

Posted: Sat Nov 17, 2018 8:11 pm
by darkfrei
Get a crash on mod creating, may come from fish, that has only one picture (vanilla has two pictures, but second was not used):

Code: Select all

local pictures = 
  {
    {
      filename = mod_name..'/graphics/entities/'..file_name,
      scale = 4,
      priority = "extra-high",
      width = 5,
      height = 8
    }
  }
  
fish.pictures = pictures
2018-11-17 20_39_41-Factorio 0.16.51.png
2018-11-17 20_39_41-Factorio 0.16.51.png (223.66 KiB) Viewed 3424 times
last part of factorio-current.log
Dump:

Re: [0.16.51] Crash with mod

Posted: Sat Nov 17, 2018 8:35 pm
by darkfrei
So, I can reproduce it:
2018-11-17 21_33_19-Factorio 0.16.51.png
2018-11-17 21_33_19-Factorio 0.16.51.png (103.8 KiB) Viewed 3416 times

Re: [0.16.51] Crash with mod

Posted: Sat Nov 17, 2018 8:39 pm
by posila
It is crashing at drawing shadow layer, so probably not fish. Does it crash with the latest version of the mod you released to mod portal?

Re: [0.16.51] Crash with mod

Posted: Sat Nov 17, 2018 9:10 pm
by darkfrei
On the same place I can't reproduce when the fish's picture was doubled.

Code: Select all

local fish = data.raw.fish.fish
local file_name = 'fish.png'
local pictures = 
  {
    {
      filename = mod_name..'/graphics/entities/'..file_name,
      scale = 4,
      priority = "extra-high",
      width = 5,
      height = 8
    },
    {
      filename = mod_name..'/graphics/entities/'..file_name,
      scale = 4,
      priority = "extra-high",
      width = 5,
      height = 8
    }
  }
  
fish.pictures = pictures

Re: [0.16.51] Crash with mod

Posted: Sat Nov 17, 2018 9:11 pm
by darkfrei
posila wrote: Sat Nov 17, 2018 8:39 pm It is crashing at drawing shadow layer, so probably not fish. Does it crash with the latest version of the mod you released to mod portal?
No, it comes only on the fish.

Re: [0.16.51] Crash with mod

Posted: Sat Nov 17, 2018 10:40 pm
by posila
Thanks for the report.
The problem was missing migration when number of variations of fish sprite changed, so it was trying to draw sprite that doesn't exist.

Fixed for 0.17