Blood Magic

Blood Magic

90M Downloads

[1.8.9-4][Crash Report] FTB Unstable Modpack finger prick crash

bgarrison25 opened this issue ยท 6 comments

commented

Disclaimer: Yes this is the same issue I tweeted you about and put in the BM thread. Didn't realize you had an active issue tracker and I apologize. Also, I haven't had the time to test this with ONLY bloodmagic mod installed so take this with a grain of salt. When I am out of work I will see if I can do so.

I created an altar and a sacrificial knife on FTB Unstable 3.0 which includes your most recent release of bloodmagic for 1.8.9. If anyone uses the sacrificial knife (at the altar or otherwise) the client crashes. This is the gist of the crash report: https://gist.github.com/bgarrison25/19871c073c3a5963f4a6

It LOOKS like there is a call to the method getUsernameFromPlayer(player) and it returns null and he then tries to run a regex check on that null. The question here is why would getUsernameFromPlayer(player) return null?

Update: After further research I see that this method ultimately calls player.getGameProfile().getId() and uses the player UUID to check the usernameCache. As I am not really familiar with your code I am not sure how your cache works or why it would return null and cause this crash. Let me know if you need any more info.

commented

Did some more digging into the minecraft source code and it seems that the getLastKnownUsername could easily return null if a username hasn't been set yet for that UUID. I have literally never looked at this code before and am a PHP developer but maybe you could do a containsUUID() check FIRST and if it fails then grab the username another way? I will dig deeper :)

commented

To be honest, after looking at the code, this check could be put in multiple places. Without having a development environment set up and being able to step through the code to figure out where exactly the null is coming from I can't really suggest anything. Although now it makes sense how you check to see if the person doing the bleeding is real and not some automated process. Pretty cool

commented

So Im not a java developer so im not going to put together a patch (plus im at work and have wasted enough time lol) but imo I would go to PlayerHelper.java line 71 and assign the username to a variable. Then do a null check on that variable. The only problem I have is, would a null for a username mean that the user is fake or real....i still can't figure out WHY you would be getting a null there. I am going to stop letting this pester me and get back to work. Good luck.

commented

This isn't something that I have experienced on my server, nor has anyone else that I know of... Is the server that you are playing on in offline mode? I'll look into it and make a fix (assuming @TehNut doesn't get to it first) when I get home.

commented

no sir it is not in offline mode. Had a bad hacking experience (my whole base got rick rolled by a hacker) when i put one of my servers in offline mode a year ago to sidestep an authentication server outage. Since then I specifically make sure its not. If you would like I can get you the IP of the server (just running it off my beast of a computer at home) so you can replicate it.

commented

This is actually a dupe of #546. Move discussion there.