Integrated Dynamics

Integrated Dynamics

88M Downloads

[Crash] UnsupportedOperationException: Cannot request ModelData refresh outside the owning thread: Thread[#1,Render thread,10,main]

pietro-lopes opened this issue ยท 7 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

Steps to reproduce the problem:

Posted here but looks like the origin of the issue is here on ID

Expected behaviour: ID shouldn't be changing their block entity data from the wrong thread


Versions:

  • This mod: 1.25.2-1061
  • Minecraft: 1.21.1
  • Mod loader version: Neoforge 21.1.115

Log file: https://gnomebot.dev/paste/mclogs/dx4Yxvf

commented

Thanks for reporting!

commented

Looks like it has been fixed in ExtremeReactors2 :-)

commented

Looks like it has been fixed in ExtremeReactors2 :-)

Yes, but other modders said this issue is on ID.
Extreme Reactors patched this on their side as a hotfix.
I think you should consider fixing it.

commented

I see, I'll have a look at it later.

commented

Just looked into this, and ID is simply calling BlockEntity.setChanged, which is a safe method to call server-side.
So this is not a problem in ID. (unless there's some other issue that is not mentioned in the crashlog)

commented

It's not being called on the server side. The provided stack trace shows that setChanged is indirectly called from one of your models on the chunk meshing thread, which is on the client. This is not a good thing as other mods won't be expecting neighbor updates to be fired on a worker thread rather than the main client thread. Actually, I can't remember off the top of my head if setChanged should be invoked on a client at all, but it definitely shouldn't be invoked from a chunk meshing thread.

commented

Oh wait, I misinterpreted the crashlog and missed line 32. I'll need to look into this some more... Thanks @embeddedt!