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

Multiple Frames Printed on the Same Line #432

Closed
alonalbert opened this issue Sep 11, 2024 · 0 comments
Closed

Multiple Frames Printed on the Same Line #432

alonalbert opened this issue Sep 11, 2024 · 0 comments

Comments

@alonalbert
Copy link
Contributor

in version 7.1.1 and earlier, if a obfuscated stack frame resolves to multiple clear frames, they are printed as multiple lines:

Version 7.1.1:

 	at com.example.myapplication.Foo.foo(Foo.java:7)
 	at com.example.myapplication.MainActivity.onClick(MainActivity.java:38)
 	at com.example.myapplication.MainActivity.Greeting$lambda$1$lambda$0(MainActivity.java:43)
 	at S0.MainActivity$$ExternalSyntheticLambda0.invoke(MainActivity.java:0)

Version 7.5.0:
But newer versions print them in a single line:

 	at com.example.myapplication.Foo.foo(Foo.java:7) 	at com.example.myapplication.MainActivity.onClick(MainActivity.java:38) 	at com.example.myapplication.MainActivity.Greeting$lambda$1$lambda$0(MainActivity.java:43) 	at S0.MainActivity$$ExternalSyntheticLambda0.invoke(MainActivity.java:0)

The problem seems to be in in ReTrace.handle():

Frames lines are appended to a StringBuilder:

                    result.append(trimmedLine);

Without a newline. This should probably be changed to:

                    result.append(trimmedLine);
                    if (retracedFrames.hasNext()) {
                        result.append("\n");
                    }

Sending a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant