Possible issue with Better combat
Dragom626 opened this issue ยท 11 comments
Describe the bug
I was fighting a Baby Skeleton from the mod "Mekanism Additions" using a sword from "Tetra" that uses the "Better Combat" attack and my game decided to crash. I was able to log back into my world and continue without any issue but I did receive a crashlog pointing to "Better Combat" and "PMMO". Currently unable to recreate but the steps I took before crashing are as follows.
- Found a burning(daytime) Baby Skeleton
- Got shot by the Baby Skeleton
- Engage Baby Skeleton in combat
- Attack the Baby Skeleton at the same time as I get hit by an arrow
- Both I and the Baby Skeleton take damage at the same time
- Game crashed
Paste your crash log here
https://pastebin.com/UWCy1AR6
Minecraft version 1.20.1
PMMO Version 1.4.24
I'm having difficulty replicating this. what Tetra item were you attacking the baby skeleton with @Dragom626 ?
@Caltinor I have had the issue happen again with both the "wooden executioner blade" and the "wooden saber blade" I need to dig the crash log out but I'll post that in a few. The last time happened with a vanilla spider but only after I killed it and I never got hit by the spider.
I put my last 2 crash logs in here, the second one does not say that PMMO or BC are at fault but happened when I was in combat otherwise. Might have more info that does not come up in the other 2 crash logs but I am unfamiliar with both mods code to know. Also put a bug report on BC github here.
Both are modified swords from Tetra, crashing is not frequent so it's a bit annoying to recreate. I'll take a look and see if I can find what the game is doing before I crash.
I did report this on Better Combat's github also, if this issue is unrelated to PMMO please close out. Thank you in advance.
#576 also has this same bug. The common denominators are Tetra and Better Combat. What's odd is that the object it's saying is null shouldn't be possible to be null. I'll dig more and see what I can find.
I can tell you what is happening, just not why. Tetra tools use an NBT configuration in pmmo. This has code that parses the NBT of the object to get it's component parts and give it a requirement based on those attributes. This is why it crashes when using Tetra but not vanilla items. i'm willing to bet that you could get the same crash using dyed leather armor. But as I said, there should be no way that the function cited in the crash log can return a null value, so i don't know why this is happening.
Myself and Damaged have attempted to replicate this bug. We are unable to reproduce the crash.
- have you been able to replicate the bug with just pmmo, Tetra, and BC?
- Where did you download pmmo from?
Will attempt to recreate tonight or tomorrow with just PMMO, Tetra and BC. Crashing is not consistent enough to reproduce in short period of time so I will try to capture something with shadowplay next time I am playing.
Download was from Curseforge after the previous bug I reported was fixed #578
I used my limited knowledge of coding to try and put in a "fix"(used an IF statement to force a value for the return in the case of a NULL being thrown) for the null output and from an hour or so of testing I didn't get an error when playing so it might have fixed it for my case. Only thing I was unable to convince IntelliJ to do was compile with the lang file applied so I don't know if my fix broke something else preventing the null error from even being sent or was an actual fix(PMMO stuff just had the java file names like pmmo.skillname). When I have time in a few day's I'll circle back and see if I can get a better example of the error. I based my fix off of the same error from a different program called SpringDoc OpenAPI(bug report here) but am unable to verify if a similar fix would be effective for this scenario.