-
Notifications
You must be signed in to change notification settings - Fork 269
Fix no available capacity
error and other minor fixes.
#1274
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
base: master
Are you sure you want to change the base?
Conversation
no available capacity
error by increasing queue size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied the latest version from here:
https://microsoft.github.io/debug-adapter-protocol/debugAdapterProtocol.json
It's just slight documentation changes.
@@ -113,6 +113,14 @@ pub fn initialize(debugger: &SBDebugger, adapter_dir: &Path) -> Result<Arc<Pytho | |||
session_id: c_int, | |||
event: *const c_char, | |||
) { | |||
if interface.is_null() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add null pointer checks to ensure there are no issues here during evaluation.
@@ -2,7 +2,7 @@ use super::*; | |||
|
|||
cpp_class!(pub unsafe struct SBAddress as "SBAddress"); | |||
|
|||
unsafe impl Send for SBAddress {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT, none of the SB*
structs should be Send
. Everything continues working with these removed. Let me know what you think @vadimcn.
@@ -239,10 +257,9 @@ def handle_message(body_ptr, body_len): | |||
return True | |||
|
|||
|
|||
@CFUNCTYPE(c_bool, py_object) | |||
@CFUNCTYPE(None, py_object) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this change because the type signature for drop_pyobject
returns void
.
drop_pyobject: unsafe extern "C" fn(obj: *mut c_void)
no available capacity
error by increasing queue size.no available capacity
error and other minor fixes.
Thanks! However, this PR contains a lot of unrelated changes. Based on the error message, the only channel that needs its capacity increased is the DAP output queue here (which I’ve already updated in my dev branch). You make a valid point about |
Changes
extension.js
exit
handler when the process segfaults.unsafe impl Send
from allSB*
cpp structs.drop_pyobject
function signature to return void since that's what the rust signature expects when callingstd::mem::transmute
.This should resolve #1273, #1140, and #1010.
Fixes #1273.
Verification Evidence
I made my changes, then ran the following:
I opened vscode and loaded the extension directly from the
.vsix
file.Running the debugger now works as expected!