Genetics Reborn

Genetics Reborn

2M Downloads

[Bug/crash] Weird concurrent modification that occurs while tinkering with prestige.

Darkmega18 opened this issue ยท 7 comments

commented

https://paste.dimdev.org/exuyejuges.mccrash

This is the crash. But it has only occured to me when I've been tinkering roughly with prestige. In this case troubleshooting a bug that I detail relatively indepth over here

But it's something about on world tick events and light. Not sure if it could be related to the issue I'm having configuring and using prestige. but it's here.

Genetics reborn 1.28.
MC 1.12.2
Forge-14.23.5.2847

A list of mods and quite literally a pretty well perfect replication of my current mod set up is in my modpack, "Timeless Technician".

There is a copy of my log up until the point when vanilla fix kicked me out of the world to block the crash and produce the report on the issue on prestige's side.

commented

Roger that, I'll give it a shot and throw some prestige around and see if anything explodes.

commented

well good news, it's not reporting you as the issue anymore.

Bad news.
https://paste.dimdev.org/yuzonivoke.mccrash
it's still exploding, now just randomly. I just went and continued clearing and reacquiring items from my prestige set up for a minecraftian night time to see if anything happened and it eventually happened.

I'm not sure whats at fault now. Heres a log if you can discern anything from it. but it all just references minecraft related classes and stuff.
latest.log

commented

So to get a concurrent modification exception some other thread in MC is updating a tracked entity while the EntityTracker.tick() code is running. I don't see any clues in the forge source that would tell me what's going on. But here's some things I would try:

  1. Remove OptiFine, both this error and my error dealt with entities with light sources, and OptiFine re-does a lot of the lighting code.

  2. Are you using anything with fake players? like auto-clicking blocks?

  3. I can see from your log that your rewards from Prestige are processed in a different thread from the main server thread. In granting you the reward, the code may be making changes to a player entity while the server tick is processing. I think this is avoided with the addScheduleTask() function as part of the message processing, and I see them in some of the message handling of the Prestige mod, but if the author missed one, it might cause something like this. This would be something the mod author would need to check.

Hope this helps.

commented

I see, thank you for the detailed response. it's more than I usually get.

I HAVE been getting some weird light propagation issues in dark caves with optifine, but only time I've really had this crash in particular is possibly due to the processing of a lot of prestige rewards in one shot, since thats how I've been reproducing it.

so, yeah, It looks like I might have to try without optifine for a while and see if my PC can take it, but my PC is on the better side of getting to potato for the day and age, atleast maybe on ram which makes it so the ram related garbage collection lags and stuff makes the game pretty rough normally without it.

Nothing with fake players was active currently. But there are a few objects in the pack that would fit that description on several levels.

commented

The crash is inside the World class provided by Forge/Minecraft the line numbers do not line up with my snapshot, but I would guess that the error is a change to the living entity list while I am cycling through it looking for players/mobs.

I've modified the code to pull a single immutable entity list, which might fix the problem. Here's a dev build with the fix in it. If you can load this in place on your server and let me know if you still get the exception I would appreciate it.

https://drive.google.com/file/d/1ANKzxoVJCbv12HVwFmwQt1K_mbzuCccT/view?usp=sharing

commented

I'm going to close this ticket, but if you get any new information, feel free to re-open. I don't think this is directly related to the mod.

commented

only thing I can tell was that it was a hitch with using prestige command rewards too liberally. it doesn't occur anymore when I switched to using give rewards in the scripts. however I do get doubled items from it more consistently but it's since been figured as a prestige issue with how it was designed to work in it's original incarnation vs how I'm intending to use it. :V

could probably use that latest version with whatever fix you made being turned into a curseforge version with whatever you've been working on though. since I can't keep the changes that were made and update my pack without it being on curse forge. D: