pWn3d1337 / Techguns

Techguns mod for minecraft
https://minecraft.curseforge.com/projects/techguns
16 stars 4 forks source link

Crashes when a Mushroom Biome loads with global spawnweight set to 0 #132

Open Ghostrider231 opened 6 years ago

Ghostrider231 commented 6 years ago

This isn't much to say, but something worth pointing out because in the config, it says [range 0 ~ 10000].

Apparently the crash can be repeated by just simply entering/teleporting to any mushroom biome so as long i have the global spawnweight set to 0. (Doesn't matter if the world is new or existing)


Config Example

NO Crashes in the Mushroom biome

# Spawn weigth of Techguns NPCs in the Nether, determines how many TG npcs spawn [range: 0 ~ 10000, default: 300]
I:"Techguns Spawnweight NEther"=1

# Spawn weigth of Techguns NPCs, determines how many TG npcs spawn [range: 0 ~ 10000, default: 600]
I:"Techguns Spawnweight Overworld"=1

================

Crashes in the Mushroom biome

# Spawn weigth of Techguns NPCs in the Nether, determines how many TG npcs spawn [range: 0 ~ 10000, default: 300]
I:"Techguns Spawnweight NEther"=0

# Spawn weigth of Techguns NPCs, determines how many TG npcs spawn [range: 0 ~ 10000, default: 600]
I:"Techguns Spawnweight Overworld"=0

The Crash Report (Been cut down to the important parts)

---- Minecraft Crash Report ----

WARNING: coremods are present: Techguns Core (techguns-1.12.2-2.0.1.1.jar) Contact their authors BEFORE contacting forge

// Don't do that.

Time: 2/2/18 12:40 PM Description: Exception ticking world

java.lang.IllegalArgumentException at net.minecraft.util.WeightedRandom.func_76273_a(SourceFile:18) at net.minecraft.util.WeightedRandom.func_76271_a(SourceFile:37) at net.minecraft.world.WorldServer.func_175734_a(WorldServer.java:246) at net.minecraft.world.WorldEntitySpawner.func_77192_a(WorldEntitySpawner.java:127) at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:203) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:754) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666) at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524) at java.lang.Thread.run(Thread.java:745)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head -- Thread: Server thread Stacktrace: at net.minecraft.util.WeightedRandom.func_76273_a(SourceFile:18) at net.minecraft.util.WeightedRandom.func_76271_a(SourceFile:37) at net.minecraft.world.WorldServer.func_175734_a(WorldServer.java:246) at net.minecraft.world.WorldEntitySpawner.func_77192_a(WorldEntitySpawner.java:127) at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:203)

Stacktrace: at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:754) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666) at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524) at java.lang.Thread.run(Thread.java:745)

| State     | ID                | Version      | Source                        | Signature                                |
|:--------- |:----------------- |:------------ |:----------------------------- |:---------------------------------------- |
| UCHIJAAAA | minecraft         | 1.12.2       | minecraft.jar                 | None                                     |
| UCHIJAAAA | mcp               | 9.42         | minecraft.jar                 | None                                     |
| UCHIJAAAA | FML               | 8.0.99.99    | forge-1.12.2-14.23.1.2607.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
| UCHIJAAAA | forge             | 14.23.1.2607 | forge-1.12.2-14.23.1.2607.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
| UCHIJAAAA | techguns_core     | 1.12.2-1.0   | minecraft.jar                 | None                                     |
| UCHIJAAAA | mercurius_updater | 1.0          | MercuriusUpdater-1.12.2.jar   | None                                     |
| UCHIJAAAA | techguns          | 2.0.1.1      | techguns-1.12.2-2.0.1.1.jar   | None                                     |

Loaded coremods (and transformers): 

Techguns Core (techguns-1.12.2-2.0.1.1.jar) techguns.core.TechgunsASMTransformer GL info: ERROR RuntimeException: No OpenGL context found in the current thread.

pWn3d1337 commented 6 years ago

Seems like the random gets 0 as upper bound in this case and crashed then. I have to look into this.

momocow commented 6 years ago

Any progress of this problem?

I also met with this which caused my server crashed while I and my friends were in the Twilight forest.

philipjholm commented 6 years ago

I also wonder if there is any progress on this?

pWn3d1337 commented 6 years ago

No, this issue was posted in the 1.7 issue tracker which is dead.

I made a new issue in the 1.12 tracker and referenced it.