Page 1 of 1

[Rseding91] Re: [0.14.22] Issues with blueprints on ungenerated chunks

Posted: Fri Feb 24, 2017 3:46 am
by NiftyManiac
This bug has been a pain to track down.
Sometimes when blueprints are placed, certain trees are not marked for deconstruction, and robots end up hovering over the un-placeable tiles indefinitely. I've attached two autosaves, saved by a headless server five minutes apart. The outcome is visible in the second save, and you should be able to reproduce it by launching the earlier autosave in headless mode and waiting ~5 minutes (maybe more just to be sure). If I launch it normally (and provide no input besides moving the camera around in god mode) the issue seems to be gone. (see the top-center of the factory). The used mods are in the mod-pack attached here.
  • The blueprints are being placed via the Recursive Blueprints mod. The mod simply calls build_blueprint, so I don't think it's the culprit. The rest of the blueprint is built fine with deconstruction orders.
  • It's not a matter of deconstruction orders being cancelled after half an hour, as evident by the two autosaves being 5 minutes apart. The blueprint is placed and the bug caused within that time.
  • The missing deconstruction order is well within the construction area.
  • I can't reliably reproduce it. The factory is autonomous, so I run into this issue with some frequency since I'm letting it run 24/7, but there doesn't seem to be any clear cause. Most of the time the exact same blueprint is placed fine in the middle of forest and everything deconstructs properly.
  • The saves I attached only seem to reproduce the bug in headless mode with no connected players, but I've had several people report the same issue to me running normally. I have no idea why this would make a difference.
I'd really love to find out the cause of this!

Re: [0.14.22] Trees not being deconstructed, sometimes

Posted: Fri Feb 24, 2017 8:01 am
by Rseding91
Deconstruction orders time out after a hour of no robot getting to them - which means you don't have enough robots.

It's changed in 0.15 to be 5 hours but still if you have an outstanding order for that much time and no robot has gotten to it then the underlying problem is: you need more robots.

Re: [0.14.22] Trees not being deconstructed, sometimes

Posted: Fri Feb 24, 2017 5:32 pm
by NiftyManiac
With all due respect I don't think you fully read my report: I explicitly said that that's not the issue here. Within the span of 5 minutes robots try to place a blueprint and get stuck.

The saves attached are 5 minutes apart. I have plenty of robots.

Re: [0.14.22] Trees not being deconstructed, sometimes

Posted: Fri Feb 24, 2017 8:00 pm
by Rseding91
NiftyManiac wrote:With all due respect I don't think you fully read my report: I explicitly said that that's not the issue here. Within the span of 5 minutes robots try to place a blueprint and get stuck.

The saves attached are 5 minutes apart. I have plenty of robots.
Can you reproduce it without the mods?

Re: [0.14.22] Issues with blueprints on ungenerated chunks

Posted: Fri Feb 24, 2017 9:52 pm
by NiftyManiac
In writing this post, I figured out the issue! It's pretty esoteric.
Summary: If a blueprint is placed on an ungenerated chunk, tree deconstruction won't happen properly. This could happen in an unmodded game when placing a blueprint that extends past the generated region. This will also happen in modded games when calling "build_blueprint" in a way as to place blueprints on ungenerated chunks.

Updated the post title to be more useful. To reproduce, just make a blueprint of a really long stretch of rail and place it near the edge of your generated map.

Suggested fix: check to make sure that all chunks within the bounds of a blueprint are generated before placing it, and generate them if needed. The performance impact of generating a bunch of chunks should be expected if you're working with blueprints that big.

I'll forgive you if you decide this isn't the most high priority bug :). Still a bug though, I would think. For me, it's an issue since I'm working on factories that expand without player intervention, which means chunks aren't automatically generated by player movement

Re: [Rseding91] Re: [0.14.22] Issues with blueprints on ungenerated chunks

Posted: Fri Feb 24, 2017 11:45 pm
by Yoyobuae
Use radars maybe? Don't they explore chunks causing them to be generated?

Re: [Rseding91] Re: [0.14.22] Issues with blueprints on ungenerated chunks

Posted: Sat Feb 25, 2017 12:16 am
by NiftyManiac
Yoyobuae wrote:Use radars maybe? Don't they explore chunks causing them to be generated?
Yes, that's how I plan to solve this issue for GreyGoo. This thread is about the bug though.

Re: [Rseding91] Re: [0.14.22] Issues with blueprints on ungenerated chunks

Posted: Wed Mar 22, 2017 2:53 pm
by Rseding91
I looked into this and I don't think it's worth changing how the base game handles building blueprints in unregenerate chunks.

If you want to do it in a mod just make sure the chunks are generated first.

Re: [Rseding91] Re: [0.14.22] Issues with blueprints on ungenerated chunks

Posted: Wed Mar 22, 2017 5:05 pm
by Kane
NiftyManiac wrote:
Yoyobuae wrote:Use radars maybe? Don't they explore chunks causing them to be generated?
Yes, that's how I plan to solve this issue for GreyGoo. This thread is about the bug though.
Can vanilla place blueprints outside of the mod? if not it really is not a bug but rather mod bug that should generate the chunks. But if some how vanilla can automate placing of Blueprints then yeah it would be its fault.

Re: [Rseding91] Re: [0.14.22] Issues with blueprints on ungenerated chunks

Posted: Wed Mar 22, 2017 6:55 pm
by Optera
Is there even a limit to the size of Blueprints in vanilla?
My Solar Array blueprint is almost a chunk big, so I think it's entirely possible even for vanilla games to have blueprints reaching into ungenerated chunks.

Re: [Rseding91] Re: [0.14.22] Issues with blueprints on ungenerated chunks

Posted: Thu Mar 23, 2017 9:35 pm
by Kane
Optera wrote:Is there even a limit to the size of Blueprints in vanilla?
My Solar Array blueprint is almost a chunk big, so I think it's entirely possible even for vanilla games to have blueprints reaching into ungenerated chunks.
I'm not 100% sure but I'm pretty sure the character actually explorers a bit more then shown. But if this ends up being a legit bug and issue without trying make it into a issue I'm sure they will look into resolving it.

Re: [Rseding91] Re: [0.14.22] Issues with blueprints on ungenerated chunks

Posted: Thu Mar 23, 2017 11:24 pm
by Rseding91
Kane wrote:
Optera wrote:Is there even a limit to the size of Blueprints in vanilla?
My Solar Array blueprint is almost a chunk big, so I think it's entirely possible even for vanilla games to have blueprints reaching into ungenerated chunks.
I'm not 100% sure but I'm pretty sure the character actually explorers a bit more then shown. But if this ends up being a legit bug and issue without trying make it into a issue I'm sure they will look into resolving it.
It could happen in the base game if you explore fast enough but I don't consider it worth fixing as it's not a simple fix and the "broken" state doesn't cause it to crash - it just does something you don't fully want.

Re: [Rseding91] Re: [0.14.22] Issues with blueprints on ungenerated chunks

Posted: Wed Apr 12, 2017 5:49 pm
by ssilk
It would be pretty enough to disallow placing blueprints in that case, perhaps with a message "cannot place blueprints on undiscovered land". IMHO that is also something, that could be used to cheat, if allowed.