Fixing a crash we got on our server - #1529
Open
Mallowwww wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, we had an issue recently where someone did some weird combination of things and broke a nearby contraption to the point that the entire server crashes upon loading the chunk. I narrowed down the issue to a missing null check when attempting to find the center of mass of the contraption. From what I saw, there IS a null check, but it happens slightly later in the initialization Mixin which leads me to believe that this was unintentional. All I did was expand out a line so I could verify the center of mass exists before continuing.
I won't be too butthurt if you decide to fix this some other way; I just thought it would be worth a PR so you could look at it yourself. I do not fully understand the circumstances required in order to cause this bug, and I was unable to recreate it myself, outside of the broken chunk on our server. I suspect it has to do with a race condition of some kind where the contraption has not figured out its sable data before initializing.
The player told me he was using a steering wheel while standing on a contraption when it broke. My best guess is that rapid assembly/disassembly of a contraption due to the steering wheel has something to do with it. From what I was told, there was not a sublevel anywhere nearby, so it's likely that the contraption Mixin is the sole culprit.