Menu

#1100 Infinite bug on widget::scrolledwindow

open
tklib (11)
5
2009-02-05
2009-01-11
ofv
No

On a dialog that contains a ttk::treeview as the widget of a scrolledwindow, when the treeview has certain items, this errors happens:

too many nested evaluations (infinite loop?)
(procedure "::snit::RT.CallInstance" line 5)
invoked from within
"::snit::RT.CallInstance ::widget::scrolledwindow::Snit_inst1 _set_scroll hsb 0 0.00555556"
too many nested evaluations (infinite loop?)
(procedure "::snit::RT.CallInstance" line 1)
invoked from within
"::snit::RT.CallInstance ::widget::scrolledwindow::Snit_inst1 _set_scroll vsb 0 0.00403226"
too many nested evaluations (infinite loop?)
(procedure "Tree::_update_scrollregion" line 42)
invoked from within
"Tree::_update_scrollregion .i_form_1.sw.i_frame.frame.lf_2.sw.tree"
(command bound to event)
too many nested evaluations (infinite loop?)
(procedure "::snit::RT.CallInstance" line 42)
invoked from within

(this repeats several times).

Unneded horizontal and vertical scrollbars are displayed too.

The problem goes away with this patch:

Index: scrollw.tcl

--- scrollw.tcl (revision 333)
+++ scrollw.tcl (working copy)
@@ -183,7 +183,7 @@
if {!$realized} { return }
# This is only called if the scrollbar is attached properly
upvar 0 $varname sb
- if {$sb(auto)} {
+ if {$sb(auto) && !$sb(lock)} {
if {!$sb(lock)} {
# One last check to avoid loops when not locked
if {$vmin == $sb(lastmin) && $vmax == $sb(lastmax)} {

(I didn't remove the second if, which is now redundant, for making clear the ciritical change).

Discussion

  • ofv

    ofv - 2009-01-11

    Forgot to add that the problem is present only on Windows XP. Not Linux, not Win2K.

     
  • Andreas Kupries

    Andreas Kupries - 2009-02-05
    • assigned_to: nobody --> hobbs