BetterPortals

BetterPortals

1M Downloads

BetterPortals crash on server

CammiePone opened this issue ยท 3 comments

commented

So, it took a lot of effort tracking back this crash to BetterPortals, but I finally managed to do so. I'm not entirely sure why it's happening, as the crash and the log don't give me what other mod is causing the incompatibility with BetterPortals. The log tipped me off to it being BetterPortals, and after removing the mod, the crash stopped happening entirely. As soon as I'm able to extract the older logs, I'll add that to this (as I'm currently on mobile). I would've posted this earlier, but I'd forgotten to ^^;

Crash:
https://pastebin.com/fGjvyV0j

commented

Does this happen reliably? Or more generally, when does it happen and how can one reproduce it?

The crash is something to do with entity tracking (i.e. the server deciding which entities are close to some client and therefore which get synced with that client). Just based on the crash report, I've got no idea which mod might cause it and I don't see any mod which is already known to cause such issues.
Please try to remove all unrelated third-party mods (I'd guess.

commented

As far as I can tell, it might be creatures targeting you through the portals? They always seemed random, but they also always happened when someone was near a portal. Specifically Aether Legacy portals. I'm finally on my PC, so here's the log:
https://pastebin.com/ixMvmCs8

I've also looked through all the other coremods (aside from Farseek, as I don't understand scala very well (same goes for kotlin)), and I didn't see them making a hook into the entity tracker, but I could have missed something, since I'm not very familiar with coremodding.

commented

So, I accidentally stumbled across an easily reproducible and identically looking crash while working on the TravelHuts portals.
The issue basically boils down to the fact that loading chunks can be unsafe while in a certain context (e.g. the code called in response to a player tracking an entity). Previously, when a portal came into view of a player, BP actively loaded the chunk of its remote portal because it was required to link them together on the client.
With same-world portals (as is the case for TravelHuts), this can easily lead to an error looking exactly like the one in your crash. I cannot think of a situation where the same thing can happen with different-world portals but I would not be surprised if there was one, especially given multiple players.
Anyhow, I've removed all non-essential chunk loading (most of it was no longer required with BP 0.3 anyway), so there's a good chance that this issue is now fixed.

For reference: f305d90

TLDR: If you've got the time, please give BP 0.3 a try and close this issue if it's fixed or reply if it isn't.