[boskid][2.0.42] CombinatorPrototype::*_light runtime crash with ommitted optional properties

This subforum contains all the issues which we already resolved.
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

[boskid][2.0.42] CombinatorPrototype::*_light runtime crash with ommitted optional properties

Post by Stringweasel »

What
All combinators prototypes have optional lights that can be defined. If you don't define them in your prototype then the game loads fine as you would expect. Placing these combinators are also fine, but as soon as there's activity it causes a crash.

Code: Select all

C:\Users\build\AppData\Local\Temp\factorio-build-MZwlx4\src\Graphics\SpriteDrawOrder.cpp(111): SpriteDrawOrder::setup
C:\Users\build\AppData\Local\Temp\factorio-build-MZwlx4\src\Graphics\DrawQueue.cpp(1032): DrawQueue::drawScaled
C:\Users\build\AppData\Local\Temp\factorio-build-MZwlx4\src\CircuitNetwork\Behaviors\CombinatorControlBehavior.cpp(84): CombinatorControlBehavior::draw
C:\Users\build\AppData\Local\Temp\factorio-build-MZwlx4\src\Entity\DeciderCombinator.cpp(57): DeciderCombinator::draw
C:\Users\build\AppData\Local\Temp\factorio-build-MZwlx4\src\Graphics\EntityRenderer.cpp(414): EntityRenderer::prepareRow
C:\Users\build\AppData\Local\Temp\factorio-build-MZwlx4\src\Graphics\EntityRenderer.cpp(299): EntityRenderer::threadJob
C:\Users\build\AppData\Local\Temp\factorio-build-MZwlx4\src\Util\WorkerThread.cpp(71): WorkerThread::loop
...
59.136 Error SpriteDrawOrder.cpp:113: Invalid sprite reference. Sprite: <EMPTY> {x = 0, y = 0, w = 0, h = 0}, 0x0000022302321130
Expected behaviour
If the optional property is ommited then it should fail on game load. Or the game should handle it correctly at runtime - which is my preference if possible
Expected behaviour
Game didn't fail to load without the lights defined, and instead crashes to desktop when trying to draw the combinator light.
Attachments
factorio-current.log
(9.79 KiB) Downloaded 11 times
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3754
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][2.0.42] CombinatorPrototype::*_light runtime crash with ommitted optional properties

Post by boskid »

Your bug report is highly misleading because the crash has nothing to do with *_light properties on the prototype. Based on the stack trace, it looks to be related to `activity_led_sprites` and i was able to reproduce this crash and it is now fixed for 2.0.43. I was unable to reproduce any crashes if the *_light properties were missing.
Post Reply

Return to “Resolved Problems and Bugs”