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

Recaf SRG mappings Broken #789

Open
neilhuang007 opened this issue May 6, 2024 · 5 comments
Open

Recaf SRG mappings Broken #789

neilhuang007 opened this issue May 6, 2024 · 5 comments

Comments

@neilhuang007
Copy link

Recaf 4.X cannot apply srg mappings
error logs:18:30:47.373 [MappingMenu/mapping-import-0] INFO : Loaded mappings from vanilla.srg in SRG format
18:30:47.377 [MappingMenu/mapping-import-0] ERROR: Failed to read mappings from vanilla.srg
java.lang.NullPointerException: 'desc' must not be null
at java.base/java.util.Objects.requireNonNull(Objects.java:246)
at software.coley.recaf.services.mapping.MappingsAdapter.addField(MappingsAdapter.java:292)
at software.coley.recaf.services.mapping.MappingsAdapter.importIntermediate(MappingsAdapter.java:70)
at software.coley.recaf.services.mapping.MappingApplier.enrich(MappingApplier.java:126)
at software.coley.recaf.services.mapping.MappingApplier.applyToPrimaryResource(MappingApplier.java:100)
at software.coley.recaf.services.mapping.MappingApplier$Proxy$_$$_WeldClientProxy.applyToPrimaryResource(Unknown Source)
at software.coley.recaf.ui.menubar.MappingMenu.lambda$new$0(MappingMenu.java:89)
at software.coley.recaf.util.threading.ThreadUtil.lambda$wrap$2(ThreadUtil.java:222)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.

lang.Thread.run(Thread.java:1570)
the srg mappings:
mapoings.zip

the class bytes:

bfk.zip

@neilhuang007
Copy link
Author

If you try with versions 2.X, it will work

@Col-E
Copy link
Owner

Col-E commented May 9, 2024

The mappings provided do not throw the NPE you'be listed with the class file you've given in 4.X

I assume some other class is causing the problem to occur. What game version are you targeting?

@Col-E Col-E added bug Missing details Needs more info to understand the problem 4.X labels May 9, 2024
@neilhuang007
Copy link
Author

the game is runned in java 8

@neilhuang007
Copy link
Author

and i am using the newest github dev branch, could it be the issue with that?
here is a small video of me applying it, am i doing it right?
also here is the class file with the mappings
stuff.zip

2024-05-09.22-33-04.mp4

mabye its my issue with the branch or its a generic issue?

@Col-E
Copy link
Owner

Col-E commented May 9, 2024

I'm not sure why I don't see the same issue on dev4 with the files you've originally provided but I did notice the field names weren't being applied. I'll push up the fix for that in a bit and it may also solve this NPE problem as well.

The gist is the mapping applier assumes all formats have fields declare what type they are, but SRG does not. Making the applier aware of this instead of assuming they all support it should work.

@Col-E Col-E removed the Missing details Needs more info to understand the problem label May 9, 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

2 participants