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

[BUG] apex.jorje.parser.impl.BaseApexLexer dedupe #1234

Closed
jaelee125 opened this issue Nov 1, 2023 · 9 comments
Closed

[BUG] apex.jorje.parser.impl.BaseApexLexer dedupe #1234

jaelee125 opened this issue Nov 1, 2023 · 9 comments
Labels

Comments

@jaelee125
Copy link

When I run the scan with the following parameters:
sfdx scanner:run:dfa -f=csv -o=CodeAnalyzerDFA.csv -t="./" -p="./" --normalize-severity --sfgejvmargs "-Xmx150g" --pathexplimit -1 --rule-thread-count 2 --rule-thread-timeout 99000000
I get this error:
ERROR: Salesforce Graph Engine encountered an error and couldn't complete analysis: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError, Caused by:
java.lang.OutOfMemoryError

However, if I increase the memory to 200g, I keep getting this error:
apex.jorje.parser.impl.BaseApexLexer dedupe
INFO: Deduped array ApexLexer.DFA22_transition. Found 7075528 shorts which is 13MB not including array overhead. Removed 6418975 shorts which is 12MB not counting array overhead. Took 11 ms.

@jaelee125
Copy link
Author

@jfeingold35 Can you help with this issue?

@jfeingold35
Copy link
Collaborator

@jaelee125 , this sounds like an issue parsing a file. Have you checked ~/.sfdx-scanner/sfge.log to see which file fails to parse? That information should be accessible in the log.

@jfeingold35
Copy link
Collaborator

@jaelee125 , additionally, have you consulted the troubleshooting steps yet?

@jaelee125
Copy link
Author

I'll take a look. Thank you

This was referenced Dec 27, 2023
@johnbelosf johnbelosf added the BUG P3 Rarely Malfunction label Feb 20, 2024
@johnbelosf johnbelosf changed the title apex.jorje.parser.impl.BaseApexLexer dedupe [BUG] apex.jorje.parser.impl.BaseApexLexer dedupe Feb 20, 2024
Copy link

git2gus bot commented Feb 20, 2024

This issue has been linked to a new work item: W-15080493

@rmohan20
Copy link
Contributor

Duplicate of #1294

@rmohan20 rmohan20 marked this as a duplicate of #1294 Mar 13, 2024
@RenzR-BIP
Copy link

Hi, while running the tool I encountered the error below.

Specifically I ran this command:
sfdx scanner:run:dfa --target "./force-app/main/default/classes/class_name.cls" --projectdir "./force-app/"

The error is:
2024-03-22 10:19:56 ERROR Main:156 - Unexpected exception while loading graph com.salesforce.exception.UnexpectedException: vertex=ArrayLoadExpression{DefiningType=bvi_CreateAndManageWOT_Controller, BeginLine=144, EndLine=144}, labels=[Ljava.lang.String;@1d1fd2aa at com.salesforce.graph.build.MethodPathBuilderVisitor.assertVertexLabel(MethodPathBuilderVisitor.java:638) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor.visitSwitchStatement(MethodPathBuilderVisitor.java:436) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor._visit(MethodPathBuilderVisitor.java:140) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor._visit(MethodPathBuilderVisitor.java:159) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor._visit(MethodPathBuilderVisitor.java:159) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor._visit(MethodPathBuilderVisitor.java:159) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor._visit(MethodPathBuilderVisitor.java:159) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor._visit(MethodPathBuilderVisitor.java:159) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor._visit(MethodPathBuilderVisitor.java:159) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor._visit(MethodPathBuilderVisitor.java:159) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor._visit(MethodPathBuilderVisitor.java:159) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor._visit(MethodPathBuilderVisitor.java:159) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.MethodPathBuilderVisitor.apply(MethodPathBuilderVisitor.java:97) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.AbstractApexVertexBuilder.afterInsert(AbstractApexVertexBuilder.java:169) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.AbstractApexVertexBuilder.buildVertices(AbstractApexVertexBuilder.java:153) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.AbstractApexVertexBuilder.buildVertices(AbstractApexVertexBuilder.java:125) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.AbstractApexVertexBuilder.buildVertices(AbstractApexVertexBuilder.java:35) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.CustomerApexVertexBuilder.build(CustomerApexVertexBuilder.java:21) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.build.Util.buildGraph(Util.java:39) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.graph.ops.GraphUtil.loadSourceFolders(GraphUtil.java:170) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.Main$Dependencies.loadSourceFoldersToGraph(Main.java:247) ~[sfge-1.0.1-pilot.jar:?] at com.salesforce.Main.execute(Main.java:150) [sfge-1.0.1-pilot.jar:?] at com.salesforce.Main.process(Main.java:100) [sfge-1.0.1-pilot.jar:?] at com.salesforce.Main.main(Main.java:68) [sfge-1.0.1-pilot.jar:?]

Thanks in advance

@stephen-carter-at-sf
Copy link
Collaborator

@jaelee125 Can you try seeing if our latest-beta version of code analyzer fixes this for you.

sf plugins install @salesforce/sfdx-scanner@latest-beta

@stephen-carter-at-sf
Copy link
Collaborator

Received no reply back... closing this issue for now.

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

No branches or pull requests

6 participants