Modular Force Field Systems (MFFS)

Modular Force Field Systems (MFFS)

5M Downloads

Full Server Crash when player enters force field with anti-personnel modules

minxGit opened this issue ยท 5 comments

commented

When another player enters the range of the anti-personnel module (Configured as you would expect) they die and the server crashes.

When logging back in, the user has died & the server resumes as normal. If they return, once again, it crashes.

Partial Error Snipped:

Description: Ticking block entity

java.lang.AbstractMethodError: Method dev/su5ed/mffs/blockentity/InterdictionMatrixBlockEntity.getDisplayName()Lnet/minecraft/network/chat/Component; is abstract
	at dev.su5ed.mffs.blockentity.InterdictionMatrixBlockEntity.getDisplayName(InterdictionMatrixBlockEntity.java) ~[mffs-5.0-beta.17-all.jar%23646!/:5.0-beta.17] {re:classloading}
	at dev.su5ed.mffs.util.module.AntiPersonnelModule.onDefend(AntiPersonnelModule.java:34) ~[mffs-5.0-beta.17-all.jar%23646!/:5.0-beta.17] {re:classloading}
	at dev.su5ed.mffs.blockentity.InterdictionMatrixBlockEntity.applyAction(InterdictionMatrixBlockEntity.java:132) ~[mffs-5.0-beta.17-all.jar%23646!/:5.0-beta.17] {re:classloading}
	at dev.su5ed.mffs.blockentity.InterdictionMatrixBlockEntity.scan(InterdictionMatrixBlockEntity.java:118) ~[mffs-5.0-beta.17-all.jar%23646!/:5.0-beta.17] {re:classloading}
	at dev.su5ed.mffs.blockentity.InterdictionMatrixBlockEntity.tickServer(InterdictionMatrixBlockEntity.java:93) ~[mffs-5.0-beta.17-all.jar%23646!/:5.0-beta.17] {re:classloading}
	at dev.su5ed.mffs.block.BaseEntityBlock.lambda$getTicker$3(BaseEntityBlock.java:105) ~[mffs-5.0-beta.17-all.jar%23646!/:5.0-beta.17] {re:classloading}
	at net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity.m_142224_(LevelChunk.java:687) ~[server-1.19.2-20220805.130853-srg.jar%23793!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper.m_142224_(LevelChunk.java:780) ~[server-1.19.2-20220805.130853-srg.jar%23793!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.redirect$bmg000$redirectTick(MixinLevel.java:3538) ~[server-1.19.2-20220805.130853-srg.jar%23793!/:?]

Let me know what other information I can provide in order to best resolve this, in the mean time I will be seeking a solution as well! :)
crash-2023-06-26_01.29.18-server.txt

commented

The method it complains about is properly implemented in our code so this sort of error shouldn't be happening in the first place. This leads me to believe the it's caused by another mod's mixin, though the log doesn't mention an details on what classes were injected into. Try using binary search - removing half of installed mods at a time - to find the mod causing this issue.

Hi!

I managed to resolve the issue by introcing a title string variable to the InterdictionMatrixBlockEntity parent class and changed the problematic GetDisplayName references to said title,

For my specific mod configuration I have also implemented some additional fixes & changes to scan intervals to function in cooperation with the speed upgrade module within a limited range

I will isolate the mod on a test environment on its own, attempt to recreate any issues I've experienced with my full configuration and any of my patches that may still apply I will pop in pull requests,

I appreciate the work you are doing here,
Thanks a million!

commented

I return!

I created a blank test environment and installed mffs-5.0-beta.18-all.jar.

I have managed to recreate the server crash bug, attached is my full logs. Could it be I am missing a dependency or something to that affect? I am on Windows 11, that could also be a contributor.

I will double check my patch implementations and create pull requests as appropriate as soon as I am able, assuming this isn't an issue isolated to just myself :)

File: AntiPersonnelModule.js,

Origin Code:
player.displayClientMessage(ModUtil.translate("info", "interdiction_matrix.fairwell", interdictionMatrix.getDisplayName()), false);

Temporary Patch:

Added string:
String matrixName = "Interdiction Matrix";

Modified Line:
player.displayClientMessage(ModUtil.translate("info", "interdiction_matrix.fairwell", interdictionMatrix.matrixName), false);

crash-2023-06-27_00.22.12-server.txt
latest.log
debug.log

commented

Alright, I found out what the issue is. The method in question is inherited from 2 interfaces, one of which is a vanilla class. That causes the method implementation for that interface to be obfuscated, hiding it from the MFFS interface.

Try again using 5.0-beta.19, pushed it to CF now.

commented

Alright, I found out what the issue is. The method in question is inherited from 2 interfaces, one of which is a vanilla class. That

Hey!

Awesome. I may have potentially found an issue where cache does not remove modules from the Interdiction Matrix after they're removed by the player, I will put .19 on my test environment and double check, any other issues I find I'll do my best to attach any solutions I can as I discover them!

Once again, Thanks for the work! :)

commented

The method it complains about is properly implemented in our code so this sort of error shouldn't be happening in the first place. This leads me to believe the it's caused by another mod's mixin, though the log doesn't mention an details on what classes were injected into. Try using binary search - removing half of installed mods at a time - to find the mod causing this issue.