Closed
Bug 68936
Opened 25 years ago
Closed 24 years ago
trees in anonymous content crash mozilla
Categories
(Core :: XBL, defect)
Tracking
()
RESOLVED
WONTFIX
Future
People
(Reporter: alex, Assigned: hyatt)
References
Details
(Keywords: crash)
Attachments
(2 files, 5 obsolete files)
|
848 bytes,
image/png
|
Details | |
|
5.31 KB,
patch
|
Details | Diff | Splinter Review |
The binding:
<binding id="mywidget" extends="xul:box">
<content>
<xul:tree>
<xul:treechildren>
<xul:treerow>
<xul:treecell value="foo" flex="1"/>
</xul:treerow>
</xul:treechildren>
</xul:tree>
</content>
</binding>
crashes on load in nsXULTreeOuterGroupFrame::ComputeTotalRowCount(): 'parent'
is =0 and parent->GetChildCount() fails.
Stack trace:
nsCOMPtr<nsIContent>::operator->() line 648 + 34 bytes
nsXULTreeOuterGroupFrame::ComputeTotalRowCount(int & 0x00000000, nsIContent *
0x02d7b9f0) line 538 + 12 bytes
nsXULTreeOuterGroupFrame::GetRowCount() line 124 + 19 bytes
nsTreeLayout::GetPrefSize(nsTreeLayout * const 0x02d9a520, nsIBox * 0x02d7335c,
nsBoxLayoutState & {...}, nsSize & {...}) line 98 + 8 bytes
nsContainerBox::GetPrefSize(nsContainerBox * const 0x02d7335c, nsBoxLayoutState
& {...}, nsSize & {...}) line 445 + 38 bytes
| Assignee | ||
Comment 1•25 years ago
|
||
The tree is malformed. You don't specify any columns.
| Reporter | ||
Comment 2•25 years ago
|
||
This still crashes:
<binding id="mywidget" extends="xul:box">
<content>
<xul:tree flex="1">
<xul:treecolgroup>
<xul:treecol flex="1"/>
</xul:treecolgroup>
<xul:treehead>
<xul:treerow>
<xul:treecell value="col" flex="1"/>
</xul:treerow>
</xul:treehead>
<xul:treechildren flex="1">
<xul:treeitem>
<xul:treerow>
<xul:treecell value="foo" flex="1"/>
</xul:treerow>
</xul:treeitem>
</xul:treechildren>
</xul:tree>
</content>
</binding>
| Assignee | ||
Comment 3•25 years ago
|
||
Can I see the whole XML file, along with the XUL file you're using your widget in?
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
| Reporter | ||
Comment 4•25 years ago
|
||
| Reporter | ||
Comment 5•25 years ago
|
||
As far as I can see, the bug is in nsXULTreeOuterGroupFrame::GetTreeContent(),
which tries to find the 'tree' content element given a 'treechildren' element.
If the 'treechildren' element sits in a binding, only the binding parent is
considered, not any possible intermediate parents of the treechildren element.
| Reporter | ||
Comment 6•25 years ago
|
||
| Reporter | ||
Comment 7•25 years ago
|
||
| Reporter | ||
Comment 8•25 years ago
|
||
Comment 9•25 years ago
|
||
Hyatt sez patch is incorrect, reverts code needed for making selects work based
off of trees. Don't know how to fix this. ->future
Target Milestone: --- → Future
| Reporter | ||
Comment 10•25 years ago
|
||
Is it?
I'm probably missing something, but as far as I can see there are 3 situations
in which behaviour is affected by the patch:
(1)
<mytree>: extends 'tree'
<treechildren>: anonymous
...
(2)
<mytree>: extends 'tree'
<some_tag>: anonymous
<treechildren>: anonymous
...
(3)
<mywidget>
<tree>: anonymous
<treechildren>: anonymous
...
In case (1), the patch is functionally equivalent to the old code since
bindingparent == parent for nsXULTreeOuterFrame's content element (the
<treechildren> element).
Case (2) should be illegal if <sometag> is not a tree, since in that case
<treechildren> is not a direct child of a tree ?
Case (3) works with the patch but not without.
If case (2) is supposed to work, how about walking the parent chain instead of
considering only the binding parent?
| Assignee | ||
Comment 11•25 years ago
|
||
I have deliberately broken your case in order to make trees able to use XBL to
do <select>s. Your patch just removes the code that enables trees to do this.
A real patch will make both work.
| Reporter | ||
Comment 12•25 years ago
|
||
Ah - I see. The 'select-size' binding puts a <treerows> element between <tree>
and <treechildren>. So this is case (2).
I think all cases can be made to work by walking the parents until the <tree>
is found.
Can't fully verify 'cause xbl <select>s are broken in my build.
| Reporter | ||
Comment 13•25 years ago
|
||
| Assignee | ||
Comment 14•25 years ago
|
||
Yeah, something broke them wihtin the last month or two. I need to figure out
what happened.
| Reporter | ||
Comment 15•25 years ago
|
||
I got some of them kind of working by deleting the 'includes="*"' attribs on
<content> tags in platformSelectBindings.xml
| Reporter | ||
Comment 16•24 years ago
|
||
I've been running with this patch locally for the past ~8 months and it seems
to works fine for me.
Attachment #25602 -
Attachment is obsolete: true
Attachment #25603 -
Attachment is obsolete: true
Attachment #25702 -
Attachment is obsolete: true
Attachment #26895 -
Attachment is obsolete: true
| Reporter | ||
Comment 17•24 years ago
|
||
*** Bug 124706 has been marked as a duplicate of this bug. ***
| Reporter | ||
Comment 18•24 years ago
|
||
Attachment #58976 -
Attachment is obsolete: true
Comment 19•24 years ago
|
||
tree? we don't got no more stinking trees
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
Comment 20•23 years ago
|
||
I believe this bug or a related one is hitting us in development. We are using
Mozilla 1.0.1.
We are creating a tree with a template in the anonymous content. It *looks* like
this
<content>
<xul:tree datasources="rdf:null" ref="urn:root">
<xul:template>. . . </xul:template>
Then, through a method defined in the binding, we programmatically add a
datasource to the anonymous tree.
The tree does not display the content of the added datasource. We do not have a
problem with the rules of the template. We have tested this successfully quite a
lot outside of anonymous content.
In trying to figure out what is wrong, we did serveral things. Worth mentioning:
we tried issuing a rebuild on the tree builder after programmatically adding a
new datasource, but it crashed Mozilla without a stack trace nor assertion
notice on the console.
I would appreciate hints on this bug, or referral to other possibly preexisting
bugs.
Comment 21•23 years ago
|
||
Does the problem in comment #20 have anything to do with the particular bug that
is WONTFIXed here? Cc'ing tingley.
/be
Comment 22•23 years ago
|
||
I am not sure it is directly related to the problem originally describe since
the tree implementation I am using is the outliner based one, not the old tree.
However, it is at least conceptually related since the summary applies to my
scenario, and I did not want to open a new bug if another preexisted.
You need to log in
before you can comment on or make changes to this bug.
Description
•