Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CustomOreGen: Detected a possible infinite loop during bezier interpolation. Please report this error. #146

Open
Scratchman opened this issue Feb 23, 2016 · 11 comments

Comments

@Scratchman
Copy link

So, I'm reporting. http://pastebin.com/1EHpJk2c

There were 4 players on the server. Two of the players were on the main world, it's a pregenerated map without any ores.

The third player was on the mining dimension, we used the custom ore gen mod on this dimension to populate the ores, but the player was in an area of the map that was pregenerated 3 weeks ago and wasn't anywhere near new terrain.

The fourth player was in the nether in a new area that hadn;t been generated. Player 4 was the one that got disconnected and then this error was generated in the servers.log. We use COG in the nether too to generate nether quartz.

The error seems odd though because it mentions other mods that have nothing to do with the nether.

@lawremi
Copy link
Owner

lawremi commented Feb 23, 2016

Thanks for reporting it. This probably happened in the Nether. Magic Bees generates Infernal Hives there. Perhaps it placed a hive on the edge of a chunk, causing a block update and thus a chunk load in the adjacent chunk. Thus, there was recursive generation, but I'm not sure why that would break things. Without any steps to reproduce, not much more I can do for now. Will keep this as a record though.

@LemADEC
Copy link

LemADEC commented Mar 19, 2016

Remove farseek from your mods, it'll save you a lot of pains related to world generation.

@Scratchman
Copy link
Author

Actually, i had no problems at all from the streams mod. I've seen a few people mention that the streams mod causes lots of problems but i suspect that could be because of conflicts with other mods.

Streams generated just fine, even a couple of villages with streams going through them. I just wish that they would also generate on our mining dim since they make the landscape so interesting.

@LemADEC
Copy link

LemADEC commented Mar 21, 2016

Streams can generate up to 6000 blocks away from the initial chunks. Single player is manageable, multiplayer is next to impossible.

@Scratchman
Copy link
Author

I generated our servers current main world with the streams mod enabled and never saw any problems, streams look fine.
We used the WorldBorder plugin to pregen the world out to +/- 4000 blocks from spawn and never saw a problem with stream generation. I suspect any problems servers have had with streams was probably caused by how it interacts with other mods.

You can see a dynmap of our main world with streams at http://map.imaginescape.tk/

@theJ8910
Copy link

theJ8910 commented Jul 20, 2016

I didn't receive an error message, but while playing with CustomOreGen and a few other mods (including Farseek and Streams FWIW) in Singleplayer, the server thread would freeze and the game would be impossible to close gracefully. Usually this would happen when Mystcraft was profiling (generating chunks in the CONTROL dimension).

I inspected the process with the CPU sampler in JVisualVM and it showed that the server thread was spending the majority of its time inside of this function.

It appears that under certain circumstances, during bezier interpolation it can get stuck inside of the error compensation loop in the advance() function. I cloned the repository locally and removed the loop and this seems to have fixed the problem for me.

@LemADEC
Copy link

LemADEC commented Jul 20, 2016

Please share the CPU sampler results.

@theJ8910
Copy link

Here's a snapshot:
snapshot

@LemADEC
Copy link

LemADEC commented Jul 20, 2017

The Bezier interpolation fails to handle a derivation vector close or equal to 0 length.
This results in a normalized vector with NaN has components, leading to an endless loop.
There's probably an invalid parameter handling at the Vein level that triggers the issue.
For now, fixing the interpolationcontext class did solve the issue for us.

@lawremi
Copy link
Owner

lawremi commented Jul 20, 2017

Would you please provide the fix as a PR?

LemADEC added a commit to LemADEC/CustomOreGen that referenced this issue Jul 20, 2017
@LemADEC LemADEC mentioned this issue Jul 20, 2017
@LemADEC
Copy link

LemADEC commented Jul 20, 2017

there you go, it's only for 1.7.10, shouldn't be hard to port to 1.10+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants