简体   繁体   中英

How do I read this line in a Java stack trace?

The stack is complicated with the involvement of lambda (note that the line number is lost due to obsfucation). What does " access$lambda$12" actually mean and is there a way to locate this in the code without knowing the actual line number?

at com.group.RKGroup.com.my.MyClass access$lambda$12(com.group.RKGroup,int,com.my.PType) (RKGroup.java:43324)

The line number is useless because this stack trace was obsfucated with Proguard.

Under normal circumstances, that would denotes a lambda declared in a method called access . Possibly the 12th lambda in the method .... though I wouldn't swear to that.

Note that the line number is lost due to obfuscation.

OK that explains how you got void [sic] as a class name. But it also means that the method name could be bogus too.

The only you are going to be sure what this line is referring to is to attempt to reverse engineer the bytecodes.

At this point, I would recommend that you send the stacktrace to the vendor of this software, and get them to help you. If they can't or won't, ask for access to the source code. If they can't or won't give you access, look for a new product. Debugging someone elses obfuscated code is a nightmare.

That looks like lambda inside a method, but...

javac does not generate such names (close to that, but not that). javac (even if this is never specified) generates them as

lambda$<method-name-where-used>$<incremental-number>

Or if you have something like this:

List<Integer> r = Stream.of(1).map(x -> x).collect(Collectors.toList());
lambda$new$<incremental-number> 

Notice that in your case the method name ( access ) comes first, so this looks very much like retro-lambda for android . IIRC they generate code like this, which is again un-specified, but what it really means that there is a lambda expression in your access method, specifically the 12-th lambda in that method. Again, IIRC, retro-lambda uses same incremental-per-method naming.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM