Using a term or value after close(session) raises the raw C error R_ExternalPtrAddr instead of a closed-session diagnostic
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
Research direction
Start with close.rssn_session(), .rssn_default$get(), and the explicit-session paths named in the report: .rssn_cell(), term(), and format(). Trace how a closed session reaches .Call and identify the existing test entry points for these operations. Done means all five reported calls on a closed explicit session produce a clear closed-session diagnostic instead of the raw R_ExternalPtrAddr error.
Written by the indexing model from the issue text.
Description
After close(session), every operation on a term or value belonging to that session raises the raw R C-API error R_ExternalPtrAddr: argument of type NILSXP is not an external pointer instead of a diagnostic saying the session is closed.
library(rssn)
s <- rssn_session()
x <- sym("x", s); t <- x^2 + 1; v <- value_new(c(1, 2, 3), s)
close(s)
format(t) # Error: R_ExternalPtrAddr: argument of type NILSXP is not an external pointer
compute(t) # same
value_float(v) # same
value_kind(v) # same
value_count(s) # same
All five calls fail with the identical internal message. A user sees a message about R_ExternalPtrAddr and NILSXP, which names neither the session nor the mistake.
close.rssn_session() sets con$ptr <- NULL, and every accessor then passes that NULL straight to .Call(C_rssn_..., session$ptr, ...). The package already has the right pattern for the default session: .rssn_default$get() recreates a session when value$ptr is NULL, which is why closing default_session() and continuing to use sym()/compute() works. An explicit session has no such guard, and .rssn_cell()/term()/format() do not check is.null(session$ptr) before the .Call.
This is related to but distinct from #245 (an answer's text survives close() while the renderers raise) and #221 (the Julia binding returns "" after close): here all R operations on a closed explicit session fail, and the failure is an internal C error rather than a documented one.
rssn 0.3.0, R 4.6.2 binding, Windows x86_64.
- Dominant language
- Rust
- Stars
- 36
- Forks
- 3
- Avg merge
- 14h 51m
- Merged PRs (30d)
- 29
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Apich-Organization/rssn
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothOpenarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#383 ·
Maintainers usually reply within 1 day
-
area/numerical good first issue help wanted kind/doc-mismatch severity/5-trivial
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Apich-Organization/rssn#373 ·
Maintainers usually reply within 1 day
-
area/numerical good first issue help wanted kind/doc-mismatch severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#371 ·
Maintainers usually reply within 1 day
-
json_encode() re-emits a decoded empty JSON object as [], so {} and {"":1} are not round-trip stableOpenarea/api-bindings good first issue help wanted kind/contract severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#361 ·
Maintainers usually reply within 1 day
-
area/statistics good first issue help wanted kind/wrong-result severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Apich-Organization/rssn#362 ·
Maintainers usually reply within 1 day
All issues in Apich-Organization/rssn
Similar issues
-
Update Wasmtime to 48.0.11 for RUSTSEC-2026-0648Possibly taken @flyingrobots claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
flyingrobots/edict#457 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
O-windows relnotes relnotes-needs-review relnotes-tracking-issue T-libs
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
approved
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
fritzprix/libr-agent#3266 ·
Maintainers usually reply within 1 day
-
Frame::second_to_frame truncates f32 product, causing periodic off-by-one framesPossibly taken @ShamanicArts claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
dmtrKovalenko/fframes#296 ·
Maintainers usually reply within 1 day