Pixelmon Mod - Bug tracker

I have a multi-threaded lighting mod which keeps saying pixelmon is using something on a wrong thread. not a bug

Ticket description:
Pixelmon - Version 1.12.2-7.0.6 Forge 2768

[18:12:04] [World Spawner/WARN] [Phosphor]: Something (likely another mod) has attempted to modify the world's state from the wrong thread!
This is *bad practice* and can cause severe issues in your game. Phosphor has done as best as it can to mitigate this violation, but it may negatively impact performance or introduce stalls.
In a future release, this violation may result in a hard crash instead of the current soft warning. You should report this issue to our issue tracker with the following stacktrace information.
(If you are aware you have misbehaving mods and cannot resolve this issue, you can safely disable this warning by setting `enable_illegal_thread_access_warnings` to `false` in Phosphor's configuration file for the time being.)
java.lang.IllegalAccessException: World is owned by 'Server thread' (ID: 333), but was accessed from thread 'World Spawner' (ID: 342)
at me.jellysquid.mods.phosphor.mod.world.lighting.LightingEngine.acquireLock(LightingEngine.java:204) ~[LightingEngine.class:?]
at me.jellysquid.mods.phosphor.mod.world.lighting.LightingEngine.processLightUpdatesForType(LightingEngine.java:185) ~[LightingEngine.class:?]
at me.jellysquid.mods.phosphor.mod.world.lighting.LightingEngine.processLightUpdates(LightingEngine.java:162) ~[LightingEngine.class:?]
at net.minecraft.world.chunk.Chunk.handler$onGetLightSubtracted$zzn000(Chunk.java:2717) ~[axw.class:?]
at net.minecraft.world.chunk.Chunk.func_177443_a(Chunk.java) ~[axw.class:?]
at net.minecraft.world.World.func_175699_k(World.java:668) ~[amu.class:?]
at com.pixelmonmod.pixelmon.api.spawning.conditions.SpawnCondition.fits(SpawnCondition.java:167) ~[SpawnCondition.class:?]
at com.pixelmonmod.pixelmon.api.spawning.SpawnInfo.fits(SpawnInfo.java:97) ~[SpawnInfo.class:?]
at com.pixelmonmod.pixelmon.api.spawning.AbstractSpawner.getSuitableSpawns(AbstractSpawner.java:84) ~[AbstractSpawner.class:?]
at com.pixelmonmod.pixelmon.api.spawning.AbstractSpawner.getWeightedSpawnInfo(AbstractSpawner.java:110) ~[AbstractSpawner.class:?]
at com.pixelmonmod.pixelmon.api.spawning.archetypes.algorithms.selection.LocationWeightedAlgorithm.calculateSpawnActions(LocationWeightedAlgorithm.java:40) ~[LocationWeightedAlgorithm.class:?]
at com.pixelmonmod.pixelmon.spawning.PlayerTrackingSpawner.lambda$getSpawns$0(PlayerTrackingSpawner.java:143) ~[PlayerTrackingSpawner.class:?]
at com.pixelmonmod.pixelmon.api.spawning.SpawnerCoordinator$Processor.run(SpawnerCoordinator.java:104) [SpawnerCoordinator$Processor.class:?]
at java.util.TimerThread.mainLoop(Unknown Source) [?:1.8.0_211]
at java.util.TimerThread.run(Unknown Source) [?:1.8.0_211]

Comments

#18479 Posted by XpanD » 04 Jun 2019 02:54

Thanks for the report.

I asked the team about this, and was told that this is an issue on Phosphor's end -- accessing lighting asynchronously (which is what Pixelmon is doing) is safe, but Phosphor wants all that running off of a single thread. This could potentially even be dangerous, as it could get lighting updates locked behind the spawning system if anything's taking too long.

Closing this ticket!

Ticket details

  • Ticket ID: 13802
  • Project: Pixelmon Mod
  • Status: Not a bug
  • Component: Error
  • Project version: 7.x.x
  • Priority: Normal
  • Severity: Normal
  • Forge/Sponge: 1.12.2 - 14.23.5.2838
  • What else would be useful to know?: (unknown)
  • Assigned to: XpanD
  • Reported by: P3rf3ctXZer0 (Send PM)
  • Reporter's tickets: (List all tickets)
  • Reported on: 03 Jun 2019 18:19
  • Ticket last visited by: Katzyn on 03 Jan 2022 21:26
JOIN THE TEAM