-
Notifications
You must be signed in to change notification settings - Fork 572
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
Debugger: invalid frame; invalid return values #2882
Comments
@derekparker / @aarzilli is this a known one? Should I open an issue against delve? Thank you. |
open an issue. |
On the first screenshot, the "n" value is correctly reported to 82. After Step Out (screenshot 2) the "n" value is bogus. "err" is not reported at all !!! If you follow the second option, i.e. to Step Over at the "return" line instead of Step Out, the debugger stops again, but at line 31: sr, ok := r.r.(*strings.Reader) Sometimes, If I just hit twice "Resume Program" twice (for each stop at the "return" line) I get crash with the following error: null Last thing, that I've noticed (see my first screenshot), at line 31, is that the reported value "ok: false" is and never should be false. This line always succeed (which is confirmed by the fact that the message "panic("Unexpected Reader!")" is never displayed). |
@juliandroid NullPointerException is a platform issue, already fixed in 2017.1. |
gogland should do the same, imho
|
I take this back, we do have a debug_info entry for the autogenerated function and it does have n and err as variables, the reason that n is not updated after a stepout is because the return value hasn't been copied into it yet. |
PPS. there's an additional problem with where the breakpoint for line :43 is placed, the compiler misnumbers the instructions and the breakpoint ends up at the top of the function. There has been work over line number assignment in the development branch of go and this problem seems fixed on tip. |
Not sure, but currently what I see in Gogland is that after stopping at line 43 and hitting: |
Gogland (1.0 Preview) 1.0 EAP
Build #GO-163.12024.32, built on February 10, 2017
Gogland EAP User
Expiration date: May 11, 2017
JRE: 1.8.0_112-release-b726 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
go version go1.8 linux/amd64
Linux hostn 4.10.2-1-ARCH #1 SMP PREEMPT Mon Mar 13 17:13:41 CET 2017 x86_64 GNU/Linux
What are you trying to do?
Set a breakpoint at line "43: return". Run debugger. Inspect method's return values. Step out to the caller. Follow the code.
What happens?
Option 1) Step out (invalid frame comes). Step out again. Return values are lost (n and err). From this point debugging is pointless.
Option 2) Step over, instead - it doesn't work correctly. Jumps at wrong position (basically don't stop at the caller's line).
Code sample:
Or include a screenshot / video of the issue.
The text was updated successfully, but these errors were encountered: