Tcl Source Code

View Ticket
Bounty program for improvements to Tcl and certain Tcl packages.
Ticket UUID: e86e178aff221cef6106ac775a38f2f18f5cadee
Title: namespace deletion: trace that calls [apply], specifying the namespace, doesn't fire.
Type: Bug Version: trunk
Submitter: pooryorick Created on: 2018-01-19 20:43:47
Subsystem: 21. [namespace] Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2018-01-19 20:43:47
Resolution: None Closed By: nobody
    Closed on:

In the following example, the trace does not occur:

namespace eval ns1 {
    proc p1 {} {}
    trace add command p1 delete [list ::apply [list args {
        puts hello
    } [namespace current]]]
    namespace delete [namespace current]

The problem is that in prepration to invoke apply, the namespace is looked up by name, but this fails for namespaces that are dying, causing TclNRApplyObjCmd to fail.

Fixed in the bug-e593adf103-core-8 branch.