ashwintemkar commented on issue #9673:
URL: https://github.com/apache/netbeans/issues/9673#issuecomment-6066278040

   Thanks, that makes a lot of sense.
   
   I went and traced through the actual crash to see where it happens. It looks 
like it is in `ComputeInlineValues.computeVariables()`, line 39:
   
   ```java
   int donePos = (int) 
info.getCompilationUnit().getLineMap().getPosition(stackLine, stackCol);
   ```
   
   `stackLine` comes straight from the stack frame's line number, and there 
does not seem to be a check on it. When a frame has no line info that value is 
`-1` (traced this back through `InlineValueComputerImpl` to confirm), and it 
looks like javac's line map cannot handle that, which would explain the 
exception in the original post.
   
   If that sounds right to you both, maybe something like this could work for 
NB 32:
   
   1. A small guard at the top of `computeVariables()`, so if the line is not 
valid it just returns no inline variables instead of calling into the line map. 
Should fix the crash itself.
   2. The naming check fix we talked about above, using `"$$Lambda/"` as 
suggested.
   
   Happy to leave the bigger question of hiding every frame without a line 
number for later, sounds right that it needs more care given the monitor frames 
point.
   
   Keeping the stepping issue separate too, still want to spend more time on 
that one.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to