Page 1 of 1

[kovarex] [16.12] Crash with custom blueprints on "TransportBeltConnectable::drawStartingPiece"

Posted: Mon Jan 01, 2018 7:51 pm
by staviq
As per Rseding91's request, i'm opening a fresh bug report, because previous thread got long and confusing. Old thread there: viewtopic.php?f=11&t=55085

There is reproducible bug, where game can be crashed trough lua, in either TransportBeltConnectable::drawStartingPiece TransportBelt::updateRotationPoint or Wall::draw,
If a belt or a wall is placed by robots, trough a blueprint, from a custom blueprint.

Steps to reproduce:

1. Install only one mod, https://mods.factorio.com/mods/mickael9/cut-and-paste, and update "factorio_version" to 0.16, add icon_size when necessary.
2. Start fresh sandbox game, enable cheats and all research.
3. Get a power armor, portable fusion reactor, personal roboport and a bunch of construction robots.
4. Build a setup like here, belt must be full before you continue

Image

5. Spawn the player, put the power armor on so you can use robots.
6. Unlearn all the research

7. Proceed as in the video ( there was a pause because game didnt crash right away this time so i was surprised, but it just started doing weird things with belts, and it crashed eventually after i stopped recording. ):

https://youtu.be/6ElgWvMHPYE

You can see the weirdness goin on.


Similarly, the crash can be reproduced using the same custom blueprint mod on stone walls, when building them close together. Wall segments should connect but they don't and the game crashes.

Re: [kovarex] [16.12] Crash with custom blueprints on "TransportBeltConnectable::drawStartingPiece"

Posted: Tue Jan 02, 2018 4:26 pm
by kovarex
Thanks for the report, it is fixed for the next release.

The problem was, that the mod didn't mark the ghost with "expires = true", and ghost with 0 time to live was created which was then cleared during the setup.
I changed in a way, that non-expiring ghost will just not be created in this situation (which will cause script error).

Re: [kovarex] [16.12] Crash with custom blueprints on "TransportBeltConnectable::drawStartingPiece"

Posted: Tue Jan 02, 2018 7:23 pm
by staviq
kovarex wrote:Thanks for the report, it is fixed for the next release.

The problem was, that the mod didn't mark the ghost with "expires = true", and ghost with 0 time to live was created which was then cleared during the setup.
I changed in a way, that non-expiring ghost will just not be created in this situation (which will cause script error).

Thanks !

Re: [kovarex] [16.12] Crash with custom blueprints on "TransportBeltConnectable::drawStartingPiece"

Posted: Tue Jan 02, 2018 7:28 pm
by kovarex
I also changed, that the expires has default value false as it is what people want 99% of the case, so the mod should work out of the box.