173generator

173generator

17.8k Downloads

regenchunks throws null pointer in latest (v2.3)

kurisubrooks opened this issue · 35 comments

commented

While using regenchunks in the latest version, 2.3, the following error gets thrown to the console:

[01:41:27 INFO]: Reading world region data...
[01:41:29 WARN]: [173generator] Task #202214 for 173generator v2.3-7-g0d0ef6d generated an exception
java.lang.NullPointerException
        at com.github.barteks2x.b173gen.BiomeRegen$Task.run(BiomeRegen.java:144) ~[?:?]
        at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java:53) ~[craftbukkit-1.8.jar:git-Bukkit-33d5de3]
        at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:349) [craftbukkit-1.8.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:668) [craftbukkit-1.8.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:284) [craftbukkit-1.8.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:609) [craftbukkit-1.8.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:517) [craftbukkit-1.8.jar:git-Bukkit-33d5de3]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_40]
commented

I'm trying to use regenchunks again, but the console gives no response.
I restarted the server after the first regenchunks, so I no longer have the log.

commented

How big is your world?
Before doing anything it will try to find all generated chunk loactions in the world.
I will send you version with more debug logging. It should give me more information. For me regenerating biomes works.

commented

The world is pregenerated to a 2500 radius. About 400mb in total.

commented

That's big world. I think it doesn't respond because it takes a lot of time to find all the regions. I'm working on fixing it.

commented

Thanks. Didn't happen in the older version, peculiar.

commented

The only possible reason I see is that the world generator isn't initialized yet. Is there message like this in log:
[173generator] 173generator enabled for world, world seed: [seed]
?

commented

I think it works now. Here is new version:
https://dl.dropboxusercontent.com/u/54602353/b173gen-2.3-9-gef26d14.jar
Note: I almost completely rewritten this code, backup your world before using it.
If it doesn't work:
Upload log (pastebin). If you use spigot - in spigot.yml set debug option to true and then upload logs/latest.log.

commented

I also changed usage of this command. New usage:
/173generator regenbiomes world=worldName maxTickMillis=time
default maxTickMillis: 10. The higher value the more lag when regenerating biomes, but faster biome regeneration
when uting it as player it will use the world you are in if not specified.

commented

173generator regenbiomes world=world
[14:08:16 INFO]: World "world" is not initialized. It's most likely result of error during initialization.

This also happens whilst in-game, and on the console.

commented

I'm afraid now I can't even get it to work.. (Can't find the log from before)

173generator regenchunks world=world_creative maxTickMillis=10

[17:03:05 INFO]: /173generator regenbiomes [world=worldname] [maxTickMillis=number] - regenerate biomes in world [worldname] with [number] of milliseconds per tick for regenerating biomes. If using from console world must be specified. Default maxTickMillis is 10.
commented

The whole log would be useful. It's logs/latest.log.

commented

The server's been restarted since then, i'm going through them but .. well, still looking

commented

I tested this plugin with bukkit and spigot. both seem to work correctly. Are you using multiverse or other multi world plugin?

commented

I do have Multiverse currently enabled, yes.

commented

Here is the log:

[02:57:46] [Server thread/INFO]: Starting minecraft server version 1.8
[02:57:46] [Server thread/INFO]: Loading properties
[02:57:47] [Server thread/INFO]: Default game type: SURVIVAL
[02:57:47] [Server thread/INFO]: Generating keypair
[02:57:47] [Server thread/INFO]: Starting Minecraft server on ####
[02:57:47] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-33d5de3 (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)
[02:57:48] [Server thread/INFO]: [dynmap] Loading dynmap v2.1-SNAPSHOT-1091
[02:57:48] [Server thread/INFO]: [dynmap] version=git-Bukkit-33d5de3 (MC: 1.8)
[02:57:48] [Server thread/INFO]: [dynmap] inhabitedTicks field not found - inhabited shader not functional
[02:57:48] [Server thread/INFO]: [dynmap] Mod Support API available
[02:57:48] [Server thread/INFO]: [WorldEdit] Loading WorldEdit v6.0;3342-78f975b9
[02:57:48] [Server thread/INFO]: [CraftBook] Loading CraftBook v3.8-SNAPSHOT:3803-e037f90,master
[02:57:48] [Server thread/INFO]: [WorldBorder] Loading WorldBorder v1.8.3
[14:07:47] [Server thread/INFO]: [173generator] Loading 173generator v2.3-9-gef26d14
[14:07:47] [Server thread/INFO]: 1.8-R0.1-SNAPSHOT
git-Bukkit-33d5de3 (MC: 1.8)
[14:07:47] [Server thread/INFO]: [Multiverse-Core] Loading Multiverse-Core v2.4-b527
[14:07:47] [Server thread/INFO]: [173generator] Enabling 173generator v2.3-9-gef26d14
[14:07:47] [Server thread/INFO]: /Users/Kurisu/Minecraft/plugins
[14:07:47] [Server thread/INFO]: [dynmap] Enabling dynmap v2.1-SNAPSHOT-1091
[14:07:47] [Server thread/INFO]: [dynmap] Using Bukkit Permissions (superperms) for access control
[14:07:47] [Server thread/INFO]: [dynmap] Web interface permissions only available for online users
[14:07:47] [Server thread/INFO]: [dynmap] Mod Support processing completed
[14:07:48] [Server thread/INFO]: [dynmap] Loaded 23 shaders.
[14:07:48] [Server thread/INFO]: [dynmap] Loaded 82 perspectives.
[14:07:48] [Server thread/INFO]: [dynmap] Loaded 14 lightings.
[14:07:49] [Server thread/INFO]: [dynmap] Web server started on address ####
[14:07:49] [Server thread/INFO]: [dynmap] version 2.1-SNAPSHOT-1091 is enabled - core version 2.1-SNAPSHOT-2032
[14:07:49] [Server thread/INFO]: [dynmap] Loaded 2 maps of world 'world'.
[14:07:49] [Server thread/INFO]: [dynmap] Loaded 2 maps of world 'world_nether'.
[14:07:49] [Server thread/INFO]: [dynmap] Loaded 2 maps of world 'world_the_end'.
[14:07:49] [Server thread/INFO]: [dynmap] Loaded 2 maps of world 'world_creative'.
[14:07:49] [Server thread/INFO]: [dynmap] Loaded 40 pending tile renders for world 'world_creative'
[14:07:49] [Server thread/INFO]: [dynmap] Enabled
[14:07:49] [Server thread/INFO]: [WorldEdit] Enabling WorldEdit v6.0;3342-78f975b9
[14:07:49] [Server thread/INFO]: WEPIF: Using the Bukkit Permissions API.
[14:07:49] [Server thread/INFO]: [WorldEdit] Using com.sk89q.worldedit.bukkit.adapter.impl.Spigot_v1_8_R1 as the Bukkit adapter
[14:07:49] [Server thread/INFO]: [CraftBook] Enabling CraftBook v3.8-SNAPSHOT:3803-e037f90,master
[14:07:50] [Server thread/INFO]: [CraftBook] Loading persistent data from YAML!
[14:07:50] [Server thread/WARN]: [CraftBook] Failed to initialize mechanic: Chairs. Make sure you have ProtocolLib!
[14:07:50] [Server thread/INFO]: [CraftBook] Enumerating chunks for self-triggered components...
[14:07:50] [Server thread/INFO]: [CraftBook] 256 chunk(s) for 4 world(s) processed (3ms elapsed)
[14:07:51] [Server thread/INFO]: [CraftBook] CraftBook v3.9 Beta 4 is the latest version available, and the updatability of it is: UPDATE_AVAILABLE. You currently have version CraftBook v3.9 Beta 4 installed.
[14:07:51] [Server thread/INFO]: [WorldBorder] Enabling WorldBorder v1.8.3
[14:07:51] [Server thread/INFO]: [WorldBorder] [CONFIG] Using elliptic/round border, knockback of 3.0 blocks, and timer delay of 5.
[14:07:51] [Server thread/INFO]: [WorldBorder] [CONFIG] Border-checking timed task started.
[14:07:51] [Server thread/INFO]: [WorldBorder] [CONFIG] World "world" has border radius 2500 at X: 3.0 Z: -11.0
[14:07:51] [Server thread/INFO]: [WorldBorder] [CONFIG] World "world_nether" has border radius 1500 at X: 0.0 Z: 0.0
[14:07:51] [Server thread/INFO]: [WorldBorder] [CONFIG] World "world_creative" has border radius 500 at X: 0.0 Z: 0.0
[14:07:51] [Server thread/INFO]: [WorldBorder] [CONFIG] Successfully hooked into DynMap for the ability to display borders.
[14:07:51] [Server thread/INFO]: [WorldBorder] For reference, the main world's spawn location is at X: 3.0 Y: 64.0 Z: -11.0
[14:07:51] [Server thread/INFO]: [Multiverse-Core] Enabling Multiverse-Core v2.4-b527
[14:07:51] [Server thread/INFO]: [Multiverse-Core] - Version 2.4-b527 (API v14) Enabled - By Rigby, fernferret, lithium3141 and main--
[14:07:51] [Server thread/INFO]: [AllPay] - Version 10.0 - using only an item based economy for Multiverse-Core v2.4-b527
[14:07:51] [Server thread/INFO]: [Multiverse-Core] Loading World & Settings - 'world' - Env: NORMAL - Type: NORMAL & seed: #### & generator: 173generator
[14:07:52] [Server thread/INFO]: [Multiverse-Core] Loading World & Settings - 'world_nether' - Env: NETHER - Type: NORMAL & seed: ####
[14:07:53] [Server thread/INFO]: [Multiverse-Core] Loading World & Settings - 'world_the_end' - Env: THE_END - Type: NORMAL & seed: ####
[14:07:54] [Server thread/INFO]: [Multiverse-Core] Loading World & Settings - 'world_creative' - Env: NORMAL - Type: NORMAL & seed: #### & generator: 173generator
[14:07:54] [Server thread/INFO]: [Multiverse-Core] 4 - World(s) loaded.
[14:07:54] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
[14:07:54] [Server thread/INFO]: CONSOLE: �[0;32;1mReload complete.�[m
[14:07:54] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 14510ms behind, skipping 290 tick(s)
[14:08:03] [Server thread/INFO]: /173generator regenbiomes [world=worldname] [maxTickMillis=number] - regenerate biomes in world [worldname] with [number] of milliseconds per tick for regenerating biomes. If using from console world must be specified. Default maxTickMillis is 10.�[m
[14:08:11] [Server thread/INFO]: Unknown command argument: world�[m
[14:08:16] [Server thread/INFO]: World "world" is not initialized. It's most likely result of error during initialization.�[m
[14:08:31] [Server thread/INFO]: World "world" is not initialized. It's most likely result of error during initialization.�[m
commented

Can you send me the whole log? (remove world seed from it)
For me this error doesn't occur and it's a bit weird.
Do you have multiple worlds? Other plugins that may cause issues?

commented
[Server thread/INFO]: CONSOLE: �[0;32;1mReload complete.�[m

Using /reload isn't a good idea. It may cause memory leaks and other weird issues. I don't even know if my plugin is compatible with it.

commented

Mm, so that may be the problem?Because the command doesn't work at all now. It just returns with the command usage. 

commented

As I said, /reload causes many weird isssues. After reloading something weird happens with my plugin, I'm not sure why. I will see what I can do to fix it. And it's not only this plugin that has problems with /reload.

commented

The usage error was after a restart, with no reloads before that. I think it's because of the world name "world_creative"

commented

World name shouldn't cause any issies unless it contains spaces.

commented

It looks like bukkit doesn't create new world generators after reload.

commented

Maybe. I don't know too much of how Bukkit works with plugins, so i'm not really much use to you :)

commented

It seems to be bukkit/multiverse bug. To use world generator in default world (the world specified in server.properties) you always need entry in bukkit.yml. Add this to bukkit.yml:
worlds:
--world_name:
----generator: 173generator
replace "-" with spaces

commented

That is what is currently in bukkit.yml

commented

There is nothing I can do to fix it. See this issue.
I will add some warning when player attempts to use reload command.

commented

Sounds good then. Thanks :)

commented

Does it work correctly after restart?

commented

I'll check now.

commented

No, i'm still getting:

173generator regenchunks world=world_creative

[18:20:38 INFO]: /173generator regenbiomes [world=worldname] [maxTickMillis=numb
 console world must be specified. Default maxTickMillis is 10.
commented
regenchunks

use

regenbiomes
commented

regenbiomes

[18:23:41 INFO]: Unknown command. Type "help" for help.
commented

the whole command is:
173generator regenbiomes world=world_name

commented

whoops ¯_(ツ)_/¯

173generator regenbiomes world=world_creative

[18:25:34 INFO]: /173generator regenbiomes [world=worldname] [maxTickMillis=numb
 console world must be specified. Default maxTickMillis is 10.
[18:25:34 INFO]: Stage 1/2. Reading world region data...
[18:25:34 INFO]: Stage 2/2. Regenerating biomes...
[18:25:34 INFO]: Generating biomes progress: 1/20 (5.0%)
[18:25:58 INFO]: Generating biomes progress: 2/20 (10.0%)
[18:26:02 INFO]: Generating biomes progress: 3/20 (15.0%)
[18:26:02 INFO]: Generating biomes progress: 4/20 (20.0%)
[18:26:20 INFO]: Generating biomes progress: 5/20 (25.0%)
[18:26:24 INFO]: Generating biomes progress: 6/20 (30.0%)
[18:26:28 INFO]: Generating biomes progress: 7/20 (35.0%)
[18:26:28 INFO]: Generating biomes progress: 8/20 (40.0%)
[18:26:32 INFO]: Generating biomes progress: 9/20 (45.0%)
[18:26:32 INFO]: Generating biomes progress: 10/20 (50.0%)
[18:26:32 INFO]: Generating biomes progress: 11/20 (55.0%)
[18:26:59 INFO]: Generating biomes progress: 12/20 (60.0%)
[18:27:05 INFO]: Generating biomes progress: 13/20 (65.0%)
[18:27:22 INFO]: Generating biomes progress: 14/20 (70.0%)
[18:27:27 INFO]: Generating biomes progress: 15/20 (75.0%)
[18:27:27 INFO]: Generating biomes progress: 16/20 (80.0%)
[18:27:31 INFO]: Generating biomes progress: 17/20 (85.0%)
[18:27:31 INFO]: Generating biomes progress: 18/20 (90.0%)
[18:27:34 INFO]: Generating biomes progress: 19/20 (95.0%)
[18:27:34 INFO]: Generating biomes progress: 20/20 (100.0%)
[18:27:34 INFO]: [173generator] Finished regenerating biomes.
[18:27:34 INFO]: Biomes regenerated successfully.
commented

Seems to be working. Thanks :)