Cold Sweat

Cold Sweat

2M Downloads

UI rendering confliction

SeanChengN opened this issue ยท 11 comments

commented

Just fight with mobs then crash, And can no longer enter the archive.

log: https://crashy.net/tWWDgXRIYN1bZzVTBBC9

commented

This looks like it might be a confliction with another mod that renders things in the UI. If possible, try to re-create this with fewer mods so I can get to the cause of this easier

commented

This looks like it might be a confliction with another mod that renders things in the UI. If possible, try to re-create this with fewer mods so I can get to the cause of this easier

I will report the next time there is a error, No recent recurrence.

commented

@MikulDev
I tested it for a long time and it crashes when it exists with other 3 huds at the same time.

jobsplus-0.3.0
champions-forge-1.18.2-2.1.5.4
AdvancedCompas-forge-1.18.2-1.2.7
ColdSweat-2.1.10-b04

crash-2022-06-04_22.15.55-client.txt

2022-06-04_22 15 20
2022-06-04_22 19 16

commented

Thank you. I'll keep this in mind while I'm looking for a fix

commented

I am able to re-produce the issue without Cold Sweat present. I have a feeling that it's Champions causing the issue, since I haven't been able to trigger a crash without it.

commented

@TheIllusiveC4 Could you check this error?

commented

Does this happen without Advanced Compass? There's an open issue for Champions where I discovered that the Advanced Compass HUD causes issues when used alongside Champions, but I'm not sure if that's related to this one.

commented

@TheIllusiveC4 You're right. The crash doesn't happen without Advanced Compass. I replaced it with Tough as Nails, since it was originally thought that the crash was due to too many UI elements, but it still works fine. This brings me to believe that both Cold Sweat and Champions are having the same issue with Advanced Compass, and the fix is up to them.

commented

For further context, I believe the issue is purely between Advanced Compass and Champions. I'm not familiar enough with Cold Sweat to weigh in on how it might affect the other two, but you said that you can reproduce the issue without Cold Sweat so I am led to believe it's unrelated.

Advanced Compass is, and this is just from what I can tell, doing something in a RenderGameOverlay.Pre event and then undoing it in RenderGameOverlay.Post without checking if the former was properly fired first. This is relevant because Champions cancels the RenderGameOverlay.Pre event if it needs to draw its own boss bar.

commented

That makes sense. Judging from crash reports, I think they're messing with the MatrixStack (or PoseStack or whatever it is now) by not balancing pushing and popping. The crash indicated that the ArrayDeque of matrix elements was empty when I tried to use pushPose(), which throws a NullPointerException.

In any case, I'm closing this issue since it isn't Cold Sweat's problem. At least thinking it was my fault got me to finally make proper IIngameOverlays for the UI elements instead of subscribing to RenderGameOverlayEvent.

@SeanChengN You should open an issue with Advanced Compass. This issue is likely to happen with a lot of other mods.

commented

@MikulDev @TheIllusiveC4 Thank you for your help, I will contact the author of Advanced Compass.