All users were logged out of Bugzilla on October 13th, 2018

Custom TreeView getColumnProperties infinite invocation loop




3 years ago
3 years ago


(Reporter: barstadd, Unassigned)


41 Branch

Firefox Tracking Flags

(Not tracked)




3 years ago

I'm new to Bugzilla so please bear with me ...

Have a tree (with a custom treeview) which is a child of a groupbox, which is a child of a panel, which is the child of the main window.

When displayed it immediately starts invoking the treeview method getColumnProperties(), which returns a null (there are no column properties).  The invocations continue forever unless a different panel is placed in focus.  However, if the original panel is put back in focus the method invocations continue. The getColumnProperties() method is required to be implemented or there is an exception thrown.  Much older versions of xulrunner, example 15.0.1, exhibit this issue only when a column is resized, or when the column picker is selected.  Not aware of a xulrunner version that does NOT get stuck in this loop.   I would expect many calls during column resize or other column visibility events but none otherwise.  Expected behavior occurs with getRowProperties() and getCellProperties().

My custom treeview has the following nsITreeView methods implemented:
        setTree: function(treebox)
        isSeparator: function(row)
        isSorted: function()
        isEditable: function(row, col)
        getImageSrc: function(row,col)
        isContainerOpen: function(vrow)
        isContainerEmpty: function(vrow)
        isContainer: function(vrow)
        getLevel: function(vrow)
        getParentIndex: function(vrow)
        hasNextSibling: function(vrow, after)
        toggleOpenState: function(vrow)
        getCellText: function(vrow,col)
        getRowProperties: function(vrow, properties)
        getCellProperties: function(vrow, col, properties)
        getColumnProperties: function(col, properties)

As well as the following nsIclassInfo methods implemented:
        getInterfaces: function(count)
        getHelperForLanguage: function(language)


Comment 1

3 years ago
This issue is exhibited on both Windows and Linux.
It was discovered by having getColumnProperties() output a message to the jsconsole during debugging session.

Comment 2

3 years ago
This issues does NOT occur if the parent widget of the tree is an hbox or vbox, only a groupbox.

Comment 3

3 years ago
Issue does occur when columns are resized.  Although one could expect many, possibly hundreds of requests to getColumnProperties during mouse movement in a column resize, not an unending supply.

Comment 4

3 years ago
MouseEvents look correct, getColumnProperties never stop.  Sorry for above info on groupbox versus vbox etc.  Does not matter.  Easily reproducible regardless of parent configuration.   Create a custom treeview and attempt to resize column.

Comment 5

3 years ago
UPDATE!!  This issue occurs if the tree element's "rows" attribute is set, or set too small, relative to overall tree visibility!   Do not set this attribute on the tree if custom treeview.

Comment 6

3 years ago
This turns out to be a duplicate of Bug 541804.
You need to log in before you can comment on or make changes to this bug.