[posila] [1.1.35] Crash before startup mod dialogue! Sprite::registerToLoad

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

[posila] [1.1.35] Crash before startup mod dialogue! Sprite::registerToLoad

Post by eradicator »

This crash happens so early that the user has to manually remove the mod.
The "disable mods" dialogue is not shown!

Reproduction:
Download the savegame and sync mods.
Add vram saver (attached).
Crash during startup.

Probable cause:
Addition of frame_sequence to electric-energy-interface animation.
Attachments
eradicators-vram-saver_0.1.3.zip
(14.42 KiB) Downloaded 168 times
factorio-previous.log
(50.03 KiB) Downloaded 179 times
2021-06_TheSpaceFactory_Day0002.zip
(7.94 MiB) Downloaded 166 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [1.1.35] Crash before startup mod dialogue! Sprite::registerToLoad

Post by posila »

Thanks for the report.
Fixed for 1.1.36. It was because of using frame_sequence together with repeat_count, so that will work and do something.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [posila] [1.1.35] Crash before startup mod dialogue! Sprite::registerToLoad

Post by eradicator »

Nice!
posila wrote:
Mon Jun 28, 2021 6:16 pm
using frame_sequence together with repeat_count
Hm... the only meaningful mention of repeat_count is a wiki page quoting your answer from one of my request threads...

Looking at it again, I admittedely don't see how repeat_count is meaningful for anything but "forward-then-backward" where it presumably increases the time until the "turnaround point"?
posila wrote:
Sat May 16, 2020 8:09 pm
The actual lenght of the animation will then be lenght of the frame_sequence (times repeat_count, times two if run_mode is "forward-then-backward"). There is a limit for (actual) animation lenght of 255 frames, though.
Wait, does that mean that a "forward-then-backward" animation with repeat_count = 2 has a maximum allowed frame_sequence length of math.floor(255/4) == 63? And does that mean that "forward" and "backward" animations frame_sequence length limit is actually affected by repeat_count even though they repeat for infinity anyway?

(Just wondering what the effects would be of enforcing repeat_count = 1 to handle edge-cases with very long animations in the mod posted above.)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [1.1.35] Crash before startup mod dialogue! Sprite::registerToLoad

Post by posila »

repeat_count was added for cases where we have animation with layers ... and some layers can be just single sprite, but the layers have to match in frame_count, so repeat_count can be used to replicate short animation or single sprite to match frame count of longer animation (for example shadow of the steam turbine)

frame_sequence is the most powerful and on its own can achieve what run_mode and repeat_count can, and it's not really necessary or particularly useful to mix frame_sequence with repeat_count or run_mode... but I don't know if it is particularly useful to throw an error when such mixing occurs, especially at this stage of 1.1

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [posila] [1.1.35] Crash before startup mod dialogue! Sprite::registerToLoad

Post by eradicator »

Right, forgot about layers.
posila wrote:
Tue Jun 29, 2021 9:33 am
frame_sequence is the most powerful and on its own can achieve what run_mode and repeat_count can, and it's not really necessary or particularly useful to mix frame_sequence with repeat_count or run_mode... but I don't know if it is particularly useful to throw an error when such mixing occurs, especially at this stage of 1.1
So does that mean that 255 is the maximum for any combination? And this isn't allowed either:

Code: Select all

run_mode = "forward-then-backward"
frame_count = 200
frame_sequence = nil
repeat_count = nil
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
kirazy
Filter Inserter
Filter Inserter
Posts: 416
Joined: Tue Mar 06, 2018 12:18 am
Contact:

Re: [posila] [1.1.35] Crash before startup mod dialogue! Sprite::registerToLoad

Post by kirazy »

I'll also add that I use repeat_count to loop an animation for very-high animation playback speeds e.g. for Bob's pumpjacks with high numbers of speed modules so that the animation doesn't immediately reduce to a single frame. It had decent results.

Post Reply

Return to “Resolved Problems and Bugs”