Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Long window pathnames used in "megawidgets" can crash wish

Closed / Fixed218872ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:07:00
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
welch Closed ticket [218872ffff]. [History diff]2000-10-26 08:30:15
dgp Ticket [218872ffff]: 4 changes [History diff]2001-04-19 00:25:32
Log in (anonymous is fine) to add a comment.