QuiltMC / enigma

A deobfuscation/remapping tool for Java bytecode, fork of cuchaz's Enigma.
GNU Lesser General Public License v3.0
59 stars 31 forks source link

An error was encountered while remapping #243

Closed supersaiyansubtlety closed 2 weeks ago

supersaiyansubtlety commented 2 weeks ago

On https://github.com/QuiltMC/quilt-mappings/commit/7465c899576cf53ddc6dc5cb4182169d4c4a3dff When naming any of the params of net/minecraft/unmapped/C_qsrmwluu::m_txjyyfzm (net/minecraft/network/codec/PacketCodec::tuple of 7)

This soft crash occurs:

java.util.concurrent.CompletionException: java.util.ConcurrentModificationException
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
    at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
Caused by: java.util.ConcurrentModificationException
    at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1605)
    at java.base/java.util.HashMap$EntryIterator.next(HashMap.java:1638)
    at java.base/java.util.HashMap$EntryIterator.next(HashMap.java:1636)
    at com.google.common.collect.AbstractMapBasedMultimap$AsMap$AsMapIterator.next(AbstractMapBasedMultimap.java:1479)
    at com.google.common.collect.AbstractMapBasedMultimap$AsMap$AsMapIterator.next(AbstractMapBasedMultimap.java:1468)
    at org.quiltmc.enigma.api.source.SourceIndex.remapTo(SourceIndex.java:161)
    at org.quiltmc.enigma.api.source.DecompiledClassSource.remapSource(DecompiledClassSource.java:49)
    at org.quiltmc.enigma.api.class_handle.ClassHandleProvider$Entry.lambda$continueMapSource$20(ClassHandleProvider.java:283)
    at org.quiltmc.enigma.util.Result.andThen(Result.java:81)
    at org.quiltmc.enigma.api.class_handle.ClassHandleProvider$Entry.lambda$continueMapSource$21(ClassHandleProvider.java:283)
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
    ... 6 more

After restarting Enigma, I named a few without issue, then it started happening again for each rename.

Similar to #242, it works fine if I click retry.

Sometimes it dismisses the error on its own (auto-retries?).

https://github.com/user-attachments/assets/e90ba634-7352-4911-9d51-49025c51a253

supersaiyansubtlety commented 2 weeks ago

Combining this issue with #242, see https://github.com/QuiltMC/enigma/issues/242#issuecomment-2483155854