enjarai / shared-resources

A Minecraft mod to easily share resources between multiple game instances.
https://www.curseforge.com/minecraft/mc-mods/shared-resources
GNU Lesser General Public License v3.0
30 stars 3 forks source link

[Conflict] Crash with MemoryLeakFix #4

Closed JustAHuman-xD closed 1 year ago

JustAHuman-xD commented 1 year ago

When starting the game with MemoryLeakFix and Shared resources i get the following crash:

Crash Error: https://pastebin.com/eeg1f0uH Crash.txt

Full Log: https://pastebin.com/WNnZs7tB latest.log

enjarai commented 1 year ago

Thats strange... This doesn't happen when you remove MemoryLeakFix?

JustAHuman-xD commented 1 year ago

Yes it does not happen when I remove memory leak fix

enjarai commented 1 year ago

Hmmm, I'll look into it. I can't tell from the logs where the conflict might be, but if I recreate it, I might be able to determine the cause.

triphora commented 1 year ago

MemoryLeakFix audits all mixins. For whatever reason, RealmsUploadScreenMixin#sharedresources$changePath fails this audit, at least on 1.19.2 (I have not tested on other versions), thus crashing the game.

enjarai commented 1 year ago

Oh, I would never have noticed that, do you have any idea what criteria cause the audit to fail? If not, I'll probably just disable that mixin, since its not very critical to the functioning of the mod at all.

triphora commented 1 year ago

You're mixing into the wrong place. The upload method almost entirely consists of creating a new thread and then all of the actual code is within that new thread. Thus, the upload method actually barely has any code, and instead the code you want is within the synthetic method_22106. I'm not entirely sure which new File call you want to target, but your mixin is going to want to target method_22106 instead of upload.

enjarai commented 1 year ago

Oh I see, I totally missed that lambda there and thought the errors were just intellij being funky as always. I'll push out an update to remove that mixin soon, its hard to test anyway since its to do with realms.

enjarai commented 1 year ago

Fixed in 1.2.1, thanks for the help!