ME Requester

ME Requester

21M Downloads

Requester disconnecting after server restart

bcrotty opened this issue ยท 4 comments

commented

Version

1.19.2-1.1.1

Crash Report

https://gist.github.com/bcrotty/cc0ba783b8384048d5a02449c8620095
(This has two different crash reports. The top was with shaders. The bottom was with shaders turned off.)

Log

No response

Additional Context

Yes

Modifications

I'm running an All the Mods 8 1.0.15 server locally. When I first restart the server, the ME Requesters are visually and functionally disconnected from the network even though there is a cable right next to one of them.

While still in the disconnected state, I can open an ME Requester that doesn't have any requests in it without crashing. When I open one that does have requests in it, the game crashes. If I break the Requester that should be connected to the network and place it down again, everything works fine, and there are no crashes.

The disconnect on server start happened with 1.0.3 of this mod, which is why I tried 1.1.1 to try to fix that issue. The crashing did not happen with 1.0.3.

Did the crash happen in singleplayer or on a server?

Server

commented

I know what the issue is but I don't know if it's smart fixing it. Here is a bit of an elaboration on that.

The different states the requester can have (such as idle, exporting, ...) are held in an enum datatype. When serializing the requester's requests (which means saving to the world), these enum states are converted to a number to make it easier to store them. The number a state is assigned to depends on the order of the enum.

When I introduced the new state "missing ingredients" the order changed. What previously was "idle" could now be "planning craft" or something else which would usually be impossible to get from deserialization. This check only happens on the client side because not all states the requester performs server side are necessary to display to the client otherwise the status indicator inside the GUI would just flicker all the time.

So when you open the requester, it has a client state it was not able to have before and it crashes. I could fix that by reorganizing the enum to match the old order but since a lot of packs/users already updated to this version, this would cause an issue again for the same reason.

The only thing you can do to fix that is to update to the newest version, break all requesters that you set up on 1.0.3, and place them again so the order is rebuilt. Sorry for the inconvenience but I think that's the only solution right now.

commented

@DAmNRelentless Thanks! That fixed the crashing. When the server starts, the ME Requesters are still disconnected from the network though. Is there something I can do to fix that?

image

commented

Will look into this.

commented

Was able to reproduce it and fixed it. Thanks for the report!