Vampirism - Become a vampire!

Vampirism - Become a vampire!

16M Downloads

[Bug 1.14.4] Game won't go past 92% when starting up new world

DatrixTHLK opened this issue ยท 11 comments

commented

Hi TeamLapen ,

Versions

  • Minecraft: 1.14.4
  • Forge: 28.1.40
  • Vampirism: 1.6.0-alpha+20191006-1207

Issue Description

The issue in question is when I launch into the game minecraft and try to make a new game to try out your mod, The game loads to 91% and then freezes up and doesn't crash, just sits there. I took the time to narrow down which mod was causing the issue with the game not loading correctly and yours was the only one that did it.

Is there some form of API I need for your mod to work properly? I saw nothing in the relations tab saying I did, but I just wanted to make sure.

Reproduce Steps

  1. Launch Minecraft
  2. Select New game or New World
  3. Loading up the game to 92% then freezes up.

Additional Information

FML Report: https://gist.github.com/DatrixTHLK/e08644e06e05a6ae474befc0f5ccf944

commented

The issue I have still exists and if I remove Underground Biomes the error still exists. With just Vampirism it doesn't have any issues, but it's hard to tell where the error is coming from since when I last checked the mods were doing just fine with one another until I started up a new game again and then the issues started up again. I doubt it's the Java installation though.

commented

Unfortunately for us as pack authors forge doesn't cleanly crash when a non updated mod is used which makes for a very difficult process of eliminating or adding one mod at a time.

If you want a safe list of mods you can check out my The Adventures of Halk pack which includes vampirism, and I have loaded a single player world many times, and we have it running on the server.

commented

Ok, this very much sounds like a deadlock during chunk gen first reported by @gabizou.

So, found a fun deadlock that has no warning or detection: If a feature/biome calls IWorld.getWorld() and successively calls IWorld.getChunk, there's the potential for a complete deadlock of the world gen worker thread waiting on the main thread for the ServerChunkProvider to provide the chunk from the very same worker thread. The issue isn't so much visible in vanilla, because all features operate on the provided IChunk/IWorld instances, except when performing Entity spawns. Now, because an Entity being spawned can occur asynchronously, there's not many areas in vanilla that a world.getChunk would be sanitized (I mean how could it.... the Entity doesn't know that it's being spawned in a world generation worker thread), hell, even the Entity's world is still a valid ServerWorld instance, so world.isRemote wouldn't suffice. The issue is exasterbated by the fact that when the ServerChunkProvider then submits the request to get the chunk, on the join() call, the worker thread * that was generating the chunk* is now paarked until the main thread can provide that chunk, but the main thread waits for the generation to complete, thereby entering a deadlock.

if you're calling any entity methods during generation, then you have to see if there's any of the getworld.getchunk

This could be causing your issue. I went through Vampirism's code, but could not find any access like this. Unfortunately, it is very difficult to debug as I cannot reproduce it and there is no kind of error message. I will try to find a solution for it although I am not yet entirely convinced it is caused by Vampirism (alone).

Similar issue here: AtomicStryker/atomicstrykers-minecraft-mods#294

commented
commented

Didn't mean to close it yet.

However, I actually found one dangerous world access in the vampire barons spawn code. It is very likely that this caused your issues. Since it is rather unlikely that one spawns during world gen, I was not able to reproduce it.

If have uploaded a new version, pls check if it is working for you. I removed some other potentially dangerous things, but I don't know if I got everything.

For any modder reading this: (@Cheaterpaul)
Starting with 1.14 everything world related during world gen (e.g. in features) must use the provided IWorld instance and no other world object.
Since Entities are spawned in WorldEntitySpawner#performWorldGenSpawning this indirectly affects

  • MobEntity#canSpawn
  • MobEntity#onInitialSpawn
  • LivingSpawnEvent.CheckSpawn
  • EntityEvent#EnteringChunk (maybe)

Any calls that do not affect the world chunks should be fine, but it's probably better to only use the provided safe IWorld instance.

commented

I will check it out and get back with you on it. Thanks for the response. Appreciate it!

commented

It works now. I don't see any issues as of yet. Thanks again!

commented

I couldn't find your java arguments, did you give it over 6 gis of ram? This can happen if you don't give it enough ram.

commented

@maxanier 1.8.0-221 64bit Java is installed and so far it's not been corrupted since every other mod seems to work just fine and minecraft starts up as well. A datapack is a "mod" within a minecraft that will allow you to get items that you wouldn't normally get from mobs or items you get from mobs that rarely drop do more often, if I'm correct and I'm usually not...The only mod I can think of is All loot mod. Funny I don't know what a jdk.nashorn.internal.runtime.ECMAexception is, I've seen it though.

I'll go through my mods again and see what happens when I figure out which one doesn't get along with vampirism. I'll let you know when I find out

@ProsperCraft I gave it 6gigs since anymore than that will be unnecessary at least for my current system. I doubt this mod would go above that 6g limit since I normally have around 130 mods (including some game, and lighting optimizers seeing as Minecraft 1.14.4 isn't the best in terms of optimization nor are some of the mods for it.) Right now I only have 94 mods. I don't feel the need to go overboard. Thanks anyways though. It's possible the arguments could've been cut off after a certain point. Wouldn't know why unless gist has a hard-coded byte limit.

Edit: @maxanier It's not All Loot as I tested it with Vampirism and it worked just fine. I'll keep looking though.

Re-Edit: I found the mod that's causing all the issues and it's Underground Biomes. I'll make sure to give that FML log to the right person this time. Although all mods seem to cooperate now. x_x I don't get this at all.

Re-Edit Again: And now there is an error again. I may have a solution to the problem and it involves a mod I found on curseforge called Nashorn and it deals with EMCA Scripts, however, why a mod requires it or even makes mention of it is beyond me since the mod in question is for 1.12.x not 1.14.x. @Aang23

commented

Unfortunately, I cannot reproduce this with just Vampirism.

From the log file it seems like something is quite corrupted in your setup. Potentially a datapack?
There are also some strange jdk.nashorn.internal.runtime.ECMAException exceptions. What Java version are you using?
Maybe reinstall it

commented

The nashorn error I mentioned does not relate to a mod but to something internal to the Java installation (JDK/JRE) which is used by Forge. I am not sure if this is a error in Forge or somewhere else. But it probably does not directly affect the world preparation.

Can you clarify, does the issue still exist if you remove Underground Biomes?
And if so, does it also occur with just Vampirism