Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2c52eda25a94725d6da26eb30c3d1414523d4480
Ticket: 615043ffffffffffffffffffffffffffffffffff
various execution trace issues
User & Date: vincentdarley on 2002-09-26 16:29:25
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Under some circumstances, when idle events are 
    pending, execution traces with 'enterstep' 
    and 'leavestep' do not trace these events.
    
    The attached script shows the problem.  It runs two 
    different scenarios of tracing 'foo':
    
    proc foo {} {
        msg "hi"
        set a 1
    }
    
    foo
    
    after idle {puts idle} ; foo
    
    The first of these works correctly, but the second 
    one skips three commands that should be traced --
     these three events never occur:
    
        {msg hi} 0 {} leavestep
        {set a 1} enterstep
        {set a 1} 0 1 leavestep
    
    This is on Windows, but the code is entirely generic.
    
    ---
    # script starts here
    
    proc msg {txt} {
        set a [::msgcat::mc $txt]
        update idletasks
    }
    
    proc foo {} {
        msg "hi"
        set a 1
    }
    
    proc log {args} {
        puts [string range $args 0 40]
    }
    
    trace add execution foo {enter leave enterstep 
    leavestep} log
    
    puts stderr "tracing without any idletasks"
    puts stderr "notice how there is a line '{msg hi} 0 {} 
    leavestep'"
    update
    foo
    
    puts stderr "tracing with idletask"
    after idle {puts idle} ; foo
    
    puts stderr "Notice how in the second run, the 
    following lines"
    puts stderr "are missing {
        {msg hi} 0 {} leavestep
        {set a 1} enterstep
        {set a 1} 0 1 leavestep
    }"
    
    
  4. foundin changed to: "obsolete: 8.4.0"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "vincentdarley"
  9. subsystem changed to: "18. Commands M-Z"
  10. title changed to: "'execution trace' skips some commands"
  11. type changed to: "Bug"