ReikaKalseki / Reika_Mods_Issues

The issue tracker for all of my mods - RotaryCraft, its addons, ChromatiCraft, and everything else.
46 stars 14 forks source link

[CC V29e] Crash Exception ticking world | Monument Completion Ritual? #2797

Open TheNodop opened 3 years ago

TheNodop commented 3 years ago

Now I can load and (theoretically) play in a world with Satisforestry, thank you very much.

But sadly during exploration I got a CTD and now the world can't be opened anymore.

I'm not sure about the cause, top of crash-report says: "java.lang.NullPointerException: Exception ticking world at Reika.ChromatiCraft.Auxiliary.Structure.Worldgen.BurrowStructure$2.onTilePlaced(BurrowStructure.java:192)"

https://pastebin.com/wv10YNu8

The client log says something about the monument completion ritual at line 433 (I needed to remove the first 5000 lines as pastebin would not allow me to post so much.) https://pastebin.com/DaPut0XA

ReikaKalseki commented 3 years ago

There are no relevant mentions of the monument. Your issue is some kind of crash generating the new burrows. What was the terrain like in the area (in particular, weird things like void holes)?

TheNodop commented 3 years ago

I recreated the world to take a look. Should a pink birch forest generate about 10-20 blocks higher then surrounding biomes? (First time with Satisforesty) Only normal looking Biomes around, a Rainbow Forest, a magic Forest from Thaumcraft, Extreme Hill and a normal forest. When flying into the forest the crash happened again. But everything looked fine.

This are the "new" files, most likely not useful: Crash-Report: https://pastebin.com/PkpukdTt Crash-Part from latest.log: https://pastebin.com/VNVs71RF Crash-Part from fml-client-latest.log: https://pastebin.com/X8r98asK

I took a few screenshots of the area around were it happened: https://imgur.com/a/7PSXMJw

Hope this helps, anything else I can help you with?

ReikaKalseki commented 3 years ago

Should a pink birch forest generate about 10-20 blocks higher then surrounding biomes?

Yes. https://i.imgur.com/mitdbho.jpg https://i.imgur.com/7bllbTx.jpg https://i.imgur.com/6aqnehN.jpg

As for your crash, it is because placing a given block type somehow did not create its TileEntity. Aside from the placement attempt being out of bounds (ie y < 0 or > 255), that is impossible (setting the block also creates the TE, assuming no mods interfere in that process). It is basically another form of the issue in #2758.

This is why I asked about the terrain around it; usually this kind of thing is the result of the baseline y value the structure is placed at (itself determined based on topSolidOrLiquidBlock at that x/z coord) being around zero, usually because of attempting to generate in a thin superflat or void world.

TheNodop commented 3 years ago

Thank you for the in depth explanation.

Is there a way to disable the (New) burrows from generating? Then I could recreate the World again and Check the chunks that actually make the Game crash. Giving you my seed would probably not help since you dont have my Mods and configs setup.

ReikaKalseki commented 3 years ago

No, there is no way to disable CC structures, because any such method would be abused during pack design by those who do not realize the effects of what they are doing.

ReikaKalseki commented 3 years ago

OK, I added a lot of new debugging and safety code, which means that it should both not crash and give more useful information.

TheNodop commented 3 years ago

I recreated the world with the new release, now it does not crash. :) But I could not find anything suspicious in the area, nothing out of the ordinary. The logs are also not saying anything (useful). Sorry I could not provide useful information.

Thank you for all the fixes.

TheNodop commented 3 years ago

I'm glad this isn't closed, yet. Everything worked fine until I left my world and joined it again.. It crashed with an ArrayOutOfBounds Error: https://pastebin.com/wwrSfwMZ (I know this does not mention your mods.)

As you most likely know that the elecCore Mod is not the culprit here and it is just the last thing mentioned before the ArrayOutOfBounds happened. So I checked the log before this one and here once again the MonumentCompletionRitual is mentioned, but this time with the "ClientDisconnectionFromServerEvent": https://pastebin.com/VMz0K3yx

Once again I removed the first 30k lines of the logs because they are irrelevant. (I do not know where the log-spam comes from but I can fix that later..)

ReikaKalseki commented 3 years ago

No, the ServerHelper thing is their doing: https://github.com/Elecs-Mods/ElecCore/blob/1.7.10/src/main/java/elec332/core/server/ServerHelper.java#L295

They - in their error handling, ironically - made an invalid assumption about the world name and threw a separate exception. That error handling was itself catching the monument error.

That monument error is itself triggered by a Forge error, where the server/client distinction is not working properly. I need to redesign my system to work around this.

I recreated the world with the new release, now it does not crash. :) But I could not find anything suspicious in the area, nothing out of the ordinary.

Generate a large area of terrain - are you not seeing any chat or log messages about structure generation encountering errors?

TheNodop commented 3 years ago

Sorry I can't answer while you're awake, I live in europe. I will assign numbers to the different things so that my comment is a bit more structured.

  1. So my rookie understanding of the error was not entirely correct. Removing elecCore(and DeepResonance) does not solve this. Do you know of a way to work around this or do I just need to wait until you find a work around? I would really like to play a bit of RC/CC over easter.

  2. Regarding the burrow generation: I managed to trigger some burrow-stuff. Got a chat-message that something was logged. But pastebin tells me the log is offensive so I need to use another service this time. (Removed ~30k lines, again.) https://controlc.com/d3195e22 I teleported to [603/604, 55, -1313] as mentioned in the log, it was plain old stone. But the chunks right next to it looked a bit awkward: 2021-03-31_16 43 18 (The torches mark the coordinates from above)

  3. During logout the same MonumentCompletionRitual-Error as in my earlier comment happened. Due to that I recreated the world a bunch of times, the error did not show all the time, only on the second (out of five) tries.

  4. Also my latest.log is now spamming this, but I don't suppose this has something to do with this/your mods. _"[Server thread/ERROR]: Couldn't save chunk; already in use by another instance of Minecraft? net.minecraft.world.MinecraftException: The save is being accessed from another location, aborting at net.minecraft.world.storage.SaveHandler.func_75762c(SaveHandler.java:90) ~[ayq.class:?][...]"

ReikaKalseki commented 3 years ago

(4) is indeed not my doing, but it might explain why you are having the issues in (2) and not me (or apparently much of anyone else).

Looking at your log, the errors do not make much sense. The error is logged now, but here is the relevant bit: https://pastebin.com/raw/Jv2UcgGS

Nothing out of the ordinary for its world area, and yet placing furnaces at 604, 55, -1313 (and a copy at x=603) fails to create the TileEntity. I can think of no "valid" reason why this should happen, but world errors due to multi-loading may indeed be a potential one. (Especially given that the similar poison rocks crash reported by @Zsashas could also be caused by that, given he has the same save concurrency issue).

There actually is a DAPI system to help track that; add the -DragonAPI_enable_ASM_SAVEOPEN JVM flag, and look for mentions of ASMCalls.trackSaveHandleStart; you will see what is opening save handles and when.

(1) and (3) are fixed for the next release, but noone else seems to have reported this issue, making me a little reticent to push an eighth minor version for it, especially given that this time like six other mods would need to update. Are you able to play at all, or does it crash constantly?

TheNodop commented 3 years ago
  1. I added the flag in MultiMC but no mentions of the ASMCalls[...] in latest.log or fml-client-latest.log (Probably my fault)

  2. Then I decided to just reinstall my Instance, copy mods out and back in.. you probably know the drill. Narrowed it down to BiblioCraft, Carpenter's Blocks, Catwalks (Which is not included in @Zsashas 's log), HEXCraft and Tainted-Magic. No log-spam, but still errors on worldsave/load (Same MonumentCompletionRitual Stuff) Added Carpenters, Catwalks and Tainted because I used them before. Problem occured again.. Removed Carpenters.. No more logspam and I can save and reenter a world! TL;DR: Carpenters Blocks somehow created big problems. WTF! (Carpenter's Blocks v3.3.8.2 - MC 1.7.10)

2.1 TheMonumentCompletionRitualError still occurs on save&exit but does not seem to corrupt the world.

(3. Btw. I always need to resize my window after launch to actually see something as mentioned in Issue #2606 , DAPI does not fix that automatically / With Optifine it does not work at all.)

So it seems like I will now be able to play without any game-breaking problems. I generated a large Area of land and got no more errors and could even exit and reenter the world.

ReikaKalseki commented 3 years ago

DAPI does not fix that automatically / With Optifine it does not work at all.)

Only some people even get the error, and optifine is going to have compat issues with my render pipeline changes unless you get exactly the right version.

TheNodop commented 3 years ago

So I am getting the save is accessed from another location again, even without Carpenter's. Can you explain to me what I need to do to use the "-DragonAPI_enable_ASM_SAVEOPEN" and where I find the info afterwards? Simply putting it into the JVM-Arguments (of MultiMC) did not work or I do not know where to find the logs. Tried to read the code in the SaveOpen.java class of DragonAPI but that wasn't very helpful. :(

ReikaKalseki commented 3 years ago

All that patch does is add a Thread.dumpStack() every time a save handle is created. The output will be in your standard MC log.

TheNodop commented 3 years ago

I managed to get the JVM-Argument to work: https://pastebin.com/QUVdHYEp Again, with my limited knowledge this does not tell me much. Can you see something useful in that Stack?

Edit: I tested BOP-World-Type (because the Stack uses it). In a default World the error does not happen. But in a BOP World it happens.

Edit²: Yep, it must be BOP and it seems like I just did not choose that world-type while testing with carpenters. Sorry. Superflat and Amplified work, too. I do not have any other (non default MC) Generators installed. But maybe something in your code has a problem with them? Or BOP is at fault, I do not know.

I also want to say that this looks a bit awkward and maybe the hanging leaves from Enderforest trees should get a maximum length. 2021-04-03_10 55 54

ReikaKalseki commented 3 years ago

I do not do anything based on world type BOP.

ReikaKalseki commented 3 years ago

This issue has been hopefully at least somewhat mitigated for the next release.