Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2000 text widget "undo" crash

obsolete: 8.4.11
closed-fixed
9
2006-03-20
2005-12-14
Anonymous
No

[Duplicated from mis-submitted Tcl Bug #1380338]

The following source code create a simple text widget
with 2 keys binding :

alt-u (text undo)
alt-r (text redo)

When you type some chars in the text and then you make
repeatedly alt-u and alt-r the tcl/tk 8.4.11
crash under win32 and linux i386 too (invalid memory
reference).

Is it a bug ?

Thank you

------------------------------------------------------
----------------------------------------------
#code start here

frame .f
pack .f -fill both -expand 1

text .f.testo -width 40 -height 10 -borderwidth 2 \ -setgrid 1 -undo 1 -maxundo 20 -autoseparators 0
pack .f.testo -fill both -expand 1

bind Text <Alt-r> {}
bind .f.testo <Alt-r> {

catch { .f.testo edit redo }
}

bind Text <Alt-u> {}
bind .f.testo <Alt-u> {

catch { .f.testo edit undo }
}

bind .f.testo <KeyPress> {

catch { .f.testo edit separator }
}

focus -force .f.testo
#code end here
------------------------------------------------------
-----------------------------------------------

Discussion

    • priority: 5 --> 9
    • assigned_to: hobbs --> vincentdarley
     
  • Logged In: NO

    I submitted the bug:

    lz_ufo@tin.it

     
  • Logged In: NO

    I think the problem is present in tcl/tk 8.4.12 too.

    lz_ufo@tin.it

     
  • Logged In: YES
    user_id=316951

    Provided patch 1391939 to fix this problem.

     
  • Don Porter
    Don Porter
    2006-03-08

    Logged In: YES
    user_id=80530

    patch was committed 2005-12-28

    any reason this is still open?

    Perhaps committed only to HEAD
    and needs backport for 8.4.13 ?

     
  • Vince Darley
    Vince Darley
    2006-03-15

    Logged In: YES
    user_id=32170

    Donal, does the 2005-12-28 patch need applying to the 8.4 branch?

     
  • Vince Darley
    Vince Darley
    2006-03-15

    • assigned_to: vincentdarley --> dkf
     
  • Logged In: YES
    user_id=79902

    Fixed in both branches

     
    • status: open --> closed-fixed