Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8bfb25e14c624c4d7174c9239fd8e4da4168a6ffbb0e3ab52355c45e71158876
Ticket: bc7ddc7944ec60be761ad6ee54d31110926f85a8
Error: "can't convert value to type substcode"
User & Date: pointsman on 2023-08-08 21:36:51
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    On Windows and Linux I get reproducible a Tcl Error which comes out of
    [https://core.tcl-lang.org/tcl/file?udc=1&ln=963-965&ci=tip&name=generic%2FtclObj.c]
    and I'm somewhat certain this should not be this way.
    
    Bisecing points to [91c2f411e7]. Since then I see this error:
    
    @|can't convert value to type substcode
    @|    while executing
    @|"foreach file $filesMade {
    @|          if {[file exists $file]} {
    @|              DebugDo 1 {Warn "cleanupTests deleting $file..."}
    @|              catch {file delete -force -- $file}
    @|       ..."
    @|    (procedure "::tcltest::cleanupTests" line 33)
    
    (The script place referenced by this error msg is
    [https://core.tcl-lang.org/tcl/file?udc=1&ln=2535&ci=978b4c8a0a42db53&name=library%2Ftcltest%2Ftcltest.tcl])
    
    This is done only by script code; no extension whatsoever in place.
    
    Unfortunately its a lot and involved code needed to trigger that
    and I didn't succeed to reduce this to a simple code example. I
    extracted it out of the tcllib context (in which I stumbled over
    this) but it is still lots of code. I tried some standard
    means from valgrind over gut feelings until fprintf(stder,"") but
    can only share a few more things.
    
    I seems infact to blow up in the line
    
    foreach file $filesMade {
    
    At this place $filesMade has an internal representation like
    (by tcl::unsupported::representation:
    
    value is a substcode with a refcount of 74, [...]
    
    Simples way to reproduce is:
    
    Step 0:
    Install a build of current Tcl trunk somewhere
    
    Step 0.5:
    Get the tcllib fossil repository:
    
    fossil clone https://core.tcl-lang.org/tcllib tcllib.fossil
    
    Step 1:
    Create a test directory, cd into and do
    
    fossil open path/to/your/tcllib.fossil tcl9-testarea-rde
    
    Step 2:
    Run
    
    tclsh sak.tcl test run -v --shell /path/to/your/tclsh9.0 debug
    
    (The tclsh in the cmd line above may be any recent Tcl sh you've
    in path.)
    
    In the output of this you should see the error.
    
  5. foundin changed to: "trunk"
  6. is_private changed to: "0"
  7. login: "pointsman"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "4ca203a8e925aecdd9419645f936bccf18cd6ea7"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "pointsman"
  14. subsystem changed to: "69. Other"
  15. title changed to: "Error: "can't convert value to type substcode""
  16. type changed to: "Bug"