Sodium/Embeddium Options API

Sodium/Embeddium Options API

13M Downloads

Bug: Showing as Axiom??

AlphaLeoli opened this issue ยท 24 comments

commented

I'm 99% sure this isn't axiom. . .
image
Minecraft: 1.21.1
Mod: Latest for 1.21.1 fabric

commented

Same issue here, "normal" sodium/video settings show up as axiom

commented

I'm having the same issue except it's showing up as Flashback

image

commented

That mod is not open source, I have no clue what kind of mixins into Sodium they might be doing.

I tested DynamicFPS by itself and that does not produce the same issue. Unless someone can reproduce this with an open-source mod, this is on the Axiom devs to fix.

I'll leave this issue open so people are aware.

commented

Showing up as DynamicFPS for me

commented

That mod is not open source, I have no clue what kind of mixins into Sodium they might be doing.

I tested DynamicFPS by itself and that does not produce the same issue. Unless someone can reproduce this with an open-source mod, this is on the Axiom devs to fix.

I'll leave this issue open so people are aware.

image
Same problem with Dynamic FPS + the Shaders tab is empty, maybe you should remove it at all because Iris has the same tab above?

commented

What version are you using? Do you have Axiom or Flashback installed?

commented

image
Forgot to mention, Minecraft 1.21.1, NeoForge 21.1.72 (latest version), Sodium Options API 1.0.3 (but shows up as 1.0.2 via BetterModlist (ModMenu NeoForge fork)). I haven't Axiom / Flashback mods.

commented

@nthxny Can't you just hard code it to be sodium at the top? I'm having this issue with flashback myself, can't you just hard code the top one to show sodium? Also, it appears to me that any mod that mixins to sodium that doesn't appear in sodium's options menu is being taken by your mod. Plus, flashback even though they don't have an open-source license their code is still open source.

commented

@nthxny, any news about this bugfix?

commented

Lamb Dynamic Lights mod creates fake (empty) tab in your mod
The same thing for the Chunks Fade In mod.

commented

Something I noticed, both Axiom and Flashback are made by the same people so it's probably the exact same issue.

commented

dude, the issue is basically anything that mixins to sodium without its own config replaces sodium @Mukul1127 . its not something with axiom or flashback + flashback is open source. it happens with dynamic fps too. Not made by the same people

commented

I've added a blacklist for Axiom and Dynamic FPS, so this should be resolved for now.

commented

Hello,

I've gotten at least 7 reports from different people between Flashback and Axiom in the last month.

This is not a bug with Flashback.
This is not a bug with Axiom.
This is not a bug with Dynamic FPS.
This is a bug with Sodium Options API.

As far as I can tell, your mod detection seems to rely on stacktrace traversal which is broken by mods that either mixin into methods high in the stacktrace, or actually have methods high in the stacktrace.

In terms of a fix, either:

  1. Don't rely on stacktrace traversal to determine the mod (I don't see why this system is even needed in the first place)
  2. Use the first mod that appears in the stacktrace rather than the last one

It could be something else, I don't know, I'm not familiar with this codebase and how it determines which settings belong to which mod.

I can appreciate that you're busy, but if I continue to get flooded with bug reports for something outside of my control I'm going to have to add a breaks clause for the current version of SodiumOptionsAPI.

Thanks, Moulberry

commented

I'm not particularly busy I just haven't been able to reproduce and debug the issue in dev with an visible source mod. I'm not going to debug an incompat with your no-source mod by copying it to the CurseForge launcher and restarting. Sorry.

It's using the stacktrace traversal function because that's what Embeddium does to detect mod IDs when they mixin to Sodium to add options manually, and that code was ported from there.

I'm sure I could add a manual blacklist for your mods if it annoys you that much but I'd like to actually solve the issue.

Dynamic FPS installed on NeoForge 1.21.1 and it's working fine:

image

commented

I'm not particularly busy I just haven't been able to reproduce and debug the issue in dev with an visible source mod. I'm not going to debug an incompat with your no-source mod by copying it to the CurseForge launcher and restarting. Sorry.

Both Flashback and DynamicFPS have their source available, but I don't think it makes any difference since neither mixin into the options screen:
https://github.com/Moulberry/Flashback/
https://github.com/juliand665/Dynamic-FPS

It's using the stacktrace traversal function because that's what Embeddium does to detect mod IDs when they mixin to Sodium to add options manually, and that code was ported from there.

If the code is copied from Embeddium where they detect mod IDs for external mods, could it be the case that the code is only designed to work for other mods adding to the Sodium options screen, and not Sodium itself?

Indeed, looking at the prefixes, Sodium/Embeddium is blacklisted: https://github.com/txnimc/SodiumOptionsAPI/blob/main/src/main/java/toni/sodiumoptionsapi/util/OptionIdGenerator.java#L27

Therefore, the stack traversal code will continue searching past the classes responsible for adding the options (Sodium), until it hits any other mod which might happen to be way higher up in the stacktrace even if they're completely unrelated to the options screen.

In the case of Flashback, for example, there's a mixin into MouseHandler. So if you click on a button to access the menu, the MouseHandler mixin would appear all the way at the top of the stacktrace, causing it to be incorrectly identified as the source.

I'm not sure exactly what the solution is here, but it probably involves either:

  1. Hardcoding the Sodium options to appear as Sodium
  2. Adjusting the stack traversal code to stop at some point

I'm sure I could add a manual blacklist for your mods if it annoys you that much but I'd like to actually solve the issue.

It was mainly just because I'd have to spend 20 minutes each time someone asked explaining to them how it's not Flashback's fault. You know how users can get sometimes, they see "Flashback" in the list and are convinced that it must mean there's an issue with Flashback.

Dynamic FPS installed on NeoForge 1.21.1 and it's working fine:

I'm not sure why you can't replicate it with DynamicFPS, you'll probably need to ask the Tapacywka user for the exact versions they're using.

commented

I will test this and push an update when i can

commented

The latest update attempting to fix this bug completely destroyed the settings screen.
Image

Latest log:
https://mclo.gs/BBLm8j6

commented

@JENOVAAbsolute Update Reese's Sodium Options

commented

@JENOVAAbsolute Update Reese's Sodium Options

Apparently I missed that update. My mistake, and thanks.