Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Set source to null when unavailable in StackTrace#614

Merged
chagong merged 1 commit intomicrosoft:main from
playdohface:unavailable-source-is-null
Nov 24, 2025
Merged

Set source to null when unavailable in StackTrace #614
chagong merged 1 commit intomicrosoft:main from
playdohface:unavailable-source-is-null

Conversation

@playdohface
Copy link
Contributor

@playdohface playdohface commented Nov 22, 2025

As noted by @mfussenegger in #609 it's probably more correct and in the spirit of the spec to keep the source as null when it is not unavailable instead of setting it to a special value, especially since it would break nvim-dap otherwise.

Copy link
Contributor

chagong commented Nov 24, 2025

LGTM.

@chagong chagong merged commit b62897e into microsoft:main Nov 24, 2025
4 checks passed
mfussenegger added a commit to mfussenegger/java-debug that referenced this pull request Dec 4, 2025
Follow up to:
- microsoft#614
- microsoft#609
With the change to set the line number to 0 the jdiLineNumber !=
lspFrame.line comparison can evaluate to true:
 dap> lspFrame
 Types$StackFrame@78
 column: 1
 id: 6
 line: 0
 name: "0x000000002f0bc000.invokeVirtual(Object,Object)"
 presentationHint: "subtle"
 source: null
 dap> jdiLineNumber
 -1
`source` being null caused an NPE
chagong added a commit that referenced this pull request Dec 9, 2025
* Fix lspFrame.source NPE on stackTrace request
Follow up to:
- #614
- #609
With the change to set the line number to 0 the jdiLineNumber !=
lspFrame.line comparison can evaluate to true:
 dap> lspFrame
 Types$StackFrame@78
 column: 1
 id: 6
 line: 0
 name: "0x000000002f0bc000.invokeVirtual(Object,Object)"
 presentationHint: "subtle"
 source: null
 dap> jdiLineNumber
 -1
`source` being null caused an NPE
* Fix line number comparison in StackTraceRequestHandler
---------
Co-authored-by: Changyong Gong <shawn.gong@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chagong chagong chagong approved these changes

@testforstephen testforstephen Awaiting requested review from testforstephen testforstephen is a code owner

@jdneo jdneo Awaiting requested review from jdneo jdneo is a code owner

@wenytang-ms wenytang-ms Awaiting requested review from wenytang-ms wenytang-ms is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /