After a file has been cropped and stored in the cropcache any future `icon_size = ` referencing the same file seem to not be enforced or checked.
- disable all mods, after restart close the game
- delete the crop-cache.dat
- launch the game
- install https://mods.factorio.com/mod/Krastorio2
- install the not-space-exploration mod
- restart
- did you get "The given sprite rectangle (left_top=0x0, right_bottom=128x128) is outside the actual sprite size (left_top=0x0, right_bottom=64x64)"?
- no: quit the game, delete the crop-cache.dat, start the game again
- yes:
- restart several times to confirm the error is repeatable
- disable the not-space-exploration mod
- restart
- enable the not-space-exploration mod
- notice the error is gone
- (to seemingly force the error to always appear in such cases, enable the runtime-sprite-reload "the rest" option and restart the game)
(note that despite these "reproduction" steps you might still have a super small chance that whatever magic or race condition is happening behind the scenes might give you varying results, but these steps should get you the best shot at it)
expected behavior: for the icon_size on icons (and sizes on equipment, etc) to check with the crop cache that the "user provided size" matches each time there is a new reference to that sprite instead of silently rolling with it, leading modders into a false sense of security that their prototypes are stable and valid.
[2.0.58] invalid icon sizes sometimes get ignored because of the crop cache
[2.0.58] invalid icon sizes sometimes get ignored because of the crop cache
- Attachments
-
- factorio-current.log
- (4.58 KiB) Downloaded 7 times
-
- not-space-exploration_0.0.1.zip
- (1.49 KiB) Downloaded 16 times