Closed Bug 309967 Opened 19 years ago Closed 19 years ago

Assertion when using completedefaultindex="true": ###!!! ASSERTION: row count did not change by the amount suggested and ###!!! ASSERTION: row count changed unexpectedly: 'mRowCount == rowCount'

Categories

(Toolkit :: Autocomplete, defect)

x86
All
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: mcsmurf, Assigned: ajschult784)

Details

(Keywords: assertion)

Attachments

(1 file)

When you use the attribute completedefaultindex="true" in a autocomplete
textfield, it asserts quite easily. It seems as soon as you have a popup with a
result list and then insert another character, it asserts with three assertions:
###!!! ASSERTION: row count changed unexpectedly: 'mRowCount == rowCount', file
h:/mozilla/tree-main/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp, l
ine 2231
###!!! ASSERTION: row count did not change by the amount suggested, check caller
: 'rowCount == mRowCount', file h:/mozilla/tree-main/mozilla/layout/xul/base/src
/tree/src/nsTreeBodyFrame.cpp, line 1519
###!!! ASSERTION: row count did not change by the amount suggested, check caller
: 'rowCount == mRowCount', file h:/mozilla/tree-main/mozilla/layout/xul/base/src
/tree/src/nsTreeBodyFrame.cpp, line 1519

It doesn't seem to matter if you have more or less results with another
character typed in with leads to the assertion.

More or less minimal testcase (you have to run it from chrome:// context):
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
    id="findfile-window"
    title="Find Files"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 <textbox flex="1" id="test" type="autocomplete"
  completedefaultindex="true" autocompletesearch="history"/>
</window>
Keywords: assertion
the 2nd and 3rd assertions are bogus, caused by bug 326033.
OS: Windows 2000 → All
Setting the input textvalue inside CompleteValue triggers a repaint before the rowcount has been updated, which is bad.

xpfe uses {begin,end}BatchUpdate, but only on the first search to return and not for failure items.  I'm not really sure what that accomplishes.
Assignee: nobody → ajschult
Status: NEW → ASSIGNED
Attachment #210832 - Flags: first-review?(neil)
Comment on attachment 210832 [details] [diff] [review]
update row count before doing autofill

Looks OK but this isn't my area.
Attachment #210832 - Flags: first-review?(neil)
Maybe ask bryner for review? IIRC he added much to the toolkit autocomplete code.
Attachment #210832 - Flags: first-review?(bryner)
Attachment #210832 - Flags: first-review?(bryner) → first-review+
fixed
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: