Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with Origins Minus, log spam #422

Closed
Vivid141 opened this issue Mar 1, 2024 · 5 comments
Closed

Crash with Origins Minus, log spam #422

Vivid141 opened this issue Mar 1, 2024 · 5 comments
Assignees

Comments

@Vivid141
Copy link

Vivid141 commented Mar 1, 2024

Description:
When playing with Origins Minus and using the Hellspawn origin (which has the ability to burn enemies with unarmed attacks), using said unarmed attack on an entity causes my game to immediately freeze and then crash. The latest.log file becomes so long that I actually had to wait to look at it because my modlauncher was buffering, and uploading it to mclo.gs truncated the file at 25,000 lines. I have no idea how many lines it actually is, but the file is almost 32MB. In the mclo.gs, the error text starts at line 275 and continues for over 20,000 lines.

How to Reproduce:
I was playing this on a pack with other mods, but the crash still occurs with just the necessary ones. I downloaded the given versions of the mods below, launched up a world, and punched the nearest mob- I've tried with a skeleton and a rabbit so far, but given the nature of the crash I'm inclined to believe it will work with any mob and the logs are far too chunky for me to bother testing.

Versions:

  • Minecraft: 1.20.1
  • Forge: 47.2.0
  • Origins: for Forge, 1.20.1-1.10.0.5
  • Caelus API: 3.1.0+1.20
  • Pehkui: 3.7.12+1.20.1-forge
  • Related Datapacks: Origins Minus, version 2.1.1+1.19.3

Log/s:

Image/s:
image

@MerchantPug
Copy link
Collaborator

Strange... will look into this soon.

@MerchantPug
Copy link
Collaborator

Okay, so this is a quirk with Origins Forge, that differs from Origins Fabric.
iirc, Edwin said that it would be kept this way with potentially a config option for the Fabric iteration behaviour, so I'm going to probably not change it, I'm going to handle this after asking Edwin what to do.

The Action On Hit power should not be used with the Damage action as it will loop indefinitely, as it triggers on any damage from you, rather than once like it does in Fabric.

@EdwinMindcraft
Copy link
Owner

Looking at the code, the fact that it crashes is a bug, as the author of Origins Minus has put in place logic to prevent recursive calls, meaning that for some reason that logic fails.

If my understanding of the fabric logic is correct, here's how it works :
On-hit actions are only valid if the player actually takes damage, it works because when damage is only dealt when it's greater than the maximum damage taken during the immunity frames, meaning that at most the effects trigger twice.
A theoretical power dealing (damage+1) damage on hit would still crash the game the same way.

Our issue is that the hook forge provides is fired before the immunity gate is updated, which is why recursive powers crash on forge.

@MerchantPug
Copy link
Collaborator

MerchantPug commented Mar 11, 2024

Okay, I think I know how to fix this.

Because they use the old damage system in their code, we need to update the origins:name damage condition type to support the NameMutableDamageSource interface. Origins Fabric also doesn't do this, so I'll file a report over there.

@MerchantPug
Copy link
Collaborator

MerchantPug commented Mar 11, 2024

I've adjusted the logic that mimics the Fabric logic to actually mimic it, but left the above bug unfixed because that's for upstream to fix first.

@MerchantPug MerchantPug self-assigned this Mar 11, 2024
MerchantPug added a commit to EdwinMindcraft/apoli that referenced this issue Mar 11, 2024
MerchantPug added a commit to EdwinMindcraft/apoli that referenced this issue Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants