Tcl Source Code

View Ticket
Login
Ticket UUID: 218872
Title: Long window pathnames used in "megawidgets" can crash wish
Type: Bug Version: obsolete: 8.2b2
Submitter: nobody Created on: 2000-10-26 01:07:00
Subsystem: 22. [proc] and [uplevel] Assigned To: nobody
Priority: 2 Severity:
Status: Closed Last Modified: 2001-04-19 00:25:32
Resolution: Fixed Closed By: dgp
    Closed on: 2001-04-18 17:25:32
Description:
OriginalBugID: 2483 Bug
Version: 8.2b2
SubmitDate: '1999-08-02'
LastModified: '1999-09-01'
Severity: CRIT
Status: Released
Submitter: hobbs
ChangedBy: hobbs
OS: Windows NT
OSVersion: 4.0
FixedDate: '1999-09-01'
FixedInVersion: 8.2.1
ClosedDate: '2000-10-25'


This was originally reported when someone used mclistbox and BWidgets,
but I can reproduce it against my megawidgets, and it might well be
reproducible for iwidgets.  This only affects Windows.

set w .[string repeat a 100]
<megawidget> $w; # ie - mclistbox, ventry, scrolledtext, etc...
pack $w

Now attempting to interact with said widget will cause an App Error:

The instruction at "0x696c2022" referenced mem at "0x696c2022".
The memory could not be "read".

This only occurs with user interaction, which might point to the
binding mechanism (?), and only with these "megawidets", where a
lot of renaming and binding tricks occur to make them seem like
regular Tk widgets.  If you send commands to the widget from the
console, everything works OK.

See also this snippet that causes a bug when the proc is used, but
not when the interp alias is used:

# set to 14 to crash this... (<=13 works)
package require Tk
set depth 15
set path ""
for {set counter 0} {$counter < $depth} {incr counter} {
  append path ".frame$counter"
  frame $path
  pack $path
}

entry $path.t
pack $path.t

rename $path.t $path.tUndo
interp alias {} $path.t {} $path.tUndo
#proc $path.t {args} [subst -nocommand {
#    echo we are about to call uplevel $path.tUndo \$args
#    eval $path.tUndo \$args
#    echo we called it
#}
#]
 
-- 08/19/1999 hobbs

This was in tclProc.c where a static msg would overflow.
Fixed for 8.2.1. 
-- 09/01/1999 hobbs