Closed Bug 4614 Opened 26 years ago Closed 26 years ago

Setting an attribute on RDF node dumps core

Categories

(Core Graveyard :: RDF, defect, P2)

Sun
Solaris
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: slamm, Assigned: waterson)

Details

It's dying on the SetNodeValue() call is nsDOMPropsCore.cpp. I don't have a stack trace right now, but I will add one later. Here's the code fragment from nsDOMPropsCore.cpp (line 300): nsIDOMNamedNodeMap* map; nsresult result = mNode->GetAttributes(&map); if (NS_OK == result) { nsIDOMNode *attr_node; PRUint32 attr_count; result = map->GetLength(&attr_count); if (NS_OK == result) { for (PRUint32 ii=0; ii<attr_count; ii++) { result = map->Item(ii,&attr_node); if (NS_OK == result) { nsString name; result = attr_node->GetNodeName(name); if (NS_OK == result && name != "id") { nsString attr; nsIAtom *atom = NS_NewAtom(name); aContent->GetAttribute( kNameSpaceID_None, atom, attr ); //cerr << "BM Props: name=" << name << " value=" << attr << " (setting)" << endl; attr_node->SetNodeValue(attr); //attr_node->SetNodeValue("something"); NS_RELEASE(atom); } NS_RELEASE(attr_node); } } } NS_RELEASE(map); } }
Priority: P3 → P2
Target Milestone: M4
This looks like a problem.... NS_IMETHODIMP RDFElementImpl::GetNameSpacePrefixFromId(PRInt32 aNameSpaceID, nsIAtom*& aPrefix) { NS_NOTYETIMPLEMENTED("write me!"); return NS_ERROR_NOT_IMPLEMENTED; } This is from my stack trace: #0 0x40b9b811 in __kill () #1 0x40b9b63f in raise (sig=6) at ../sysdeps/posix/raise.c:27 #2 0x40b9c84f in abort () at ../sysdeps/generic/abort.c:83 #3 0x408b7fba in PR_Abort () at prlog.c:461 #4 0x4002fa46 in nsDebug::Abort ( aFile=0x40d94449 "/export/slamm/gecko/mozilla/rdf/content/src/nsRDFElement.cpp", aLine=1642) at /export/slamm/gecko/mozilla/xpcom/src/nsDebug.cpp:93 #5 0x4002faaa in nsDebug::Break ( aFile=0x40d94449 "/export/slamm/gecko/mozilla/rdf/content/src/nsRDFElement.cpp", aLine=1642) at /export/slamm/gecko/mozilla/xpcom/src/nsDebug.cpp:108 #6 0x4002fc55 in nsDebug::NotYetImplemented (aMessage=0x40d94710 "write me!", aFile=0x40d94449 "/export/slamm/gecko/mozilla/rdf/content/src/nsRDFElement.cpp", aLine=1642) at /export/slamm/gecko/mozilla/xpcom/src/nsDebug.cpp:150 #7 0x40d44a4c in RDFElementImpl::GetNameSpacePrefixFromId (this=0x8218e80, aNameSpaceID=4, aPrefix=@0xbfffdcf0) at /export/slamm/gecko/mozilla/rdf/content/src/nsRDFElement.cpp:1642 #8 0x40d61df0 in nsXULAttribute::GetQualifiedName (this=0x8219418) at /export/slamm/gecko/mozilla/rdf/content/src/nsXULAttributes.cpp:329 #9 0x40d61c7a in nsXULAttribute::SetValue (this=0x8219418, aValue=@0xbfffddec) at /export/slamm/gecko/mozilla/rdf/content/src/nsXULAttributes.cpp:274 #10 0x40d618f7 in nsXULAttribute::SetNodeValue (this=0x8219418, aNodeValue=@0xbfffddec) at /export/slamm/gecko/mozilla/rdf/content/src/nsXULAttributes.cpp:139 #11 0x40e6d9e5 in nsPropertiesDialog::AttributeChanged (this=0x822cf18, aDocument=0x82303e0, aContent=0x825f098, aAttribute=0x81f81e0, aHint=-1) at /export/slamm/gecko/mozilla/xpfe/AppCores/src/nsDOMPropsCore.cpp:319 #12 0x40d65b18 in XULDocumentImpl::AttributeChanged (this=0x82303e0, aChild=0x825f098, aAttribute=0x81f81e0, aHint=-1) at /export/slamm/gecko/mozilla/rdf/content/src/nsXULDocument.cpp:1527 #13 0x40d458f2 in RDFElementImpl::UnsetAttribute (this=0x825f088, aNameSpaceID=0, aName=0x81f81e0, aNotify=1) at /export/slamm/gecko/mozilla/rdf/content/src/nsRDFElement.cpp:1961 #14 0x40d602ad in RDFXULBuilderImpl::RemoveAttribute (this=0x8231a18, aElement=0x825f098, aProperty=0x8248478, aValue=0x81ddbe0) at /export/slamm/gecko/mozilla/rdf/content/src/nsRDFXULBuilder.cpp:1919 #15 0x40d5b3dc in RDFXULBuilderImpl::OnUnassert (this=0x8231a18, aSubject=0x824eed8, aPredicate=0x8248478, aObject=0x81ddbe0) at /export/slamm/gecko/mozilla/rdf/content/src/nsRDFXULBuilder.cpp:823 #16 0x40d23993 in CompositeDataSourceImpl::OnUnassert (this=0x822ce80, subject=0x824eed8, predicate=0x8248478, object=0x81ddbe0) at /export/slamm/gecko/mozilla/rdf/base/src/nsCompositeDataSource.cpp:1085 #17 0x40d28673 in InMemoryDataSource::Unassert (this=0x8172c10, source=0x824eed8, property=0x8248478, target=0x81ddbe0) at /export/slamm/gecko/mozilla/rdf/base/src/nsInMemoryDataSource.cpp:1444 #18 0x40d2f8e0 in RDFXMLDataSourceImpl::Unassert (this=0x8172ba0, source=0x824eed8, property=0x8248478, target=0x81ddbe0) at /export/slamm/gecko/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp:651 #19 0x40d73925 in LocalStoreImpl::Unassert (this=0x8172ae0, aSource=0x824eed8, aProperty=0x8248478, aTarget=0x81ddbe0)
Status: NEW → ASSIGNED
Okay, so I can fix this to not dump core, but to make it work, I need to fix http://bugzilla.mozilla.org/show_bug.cgi?id=3334 http://bugzilla.mozilla.org/show_bug.cgi?id=3275 As I understand it, getting this to work is blocking you from implementing the bookmarks property dialog, so -- I'll start banging away on _those_ bugs and see how far I can get.
I also see this crash if I bring up the bookmark properties dialog a second time. 1. "Manage Bookmarks" 2. Select bookmark 3. "Edit / Bookmark Properties..." 4. Hit Cancel. 5. "Edit / Bookmark Properties..." In this case, it dies setting the properties on the broadcaster node, "properties_node" in bm_props.xul.
So I talked with gramps and chofmann about this one. The additions to support this are starting to get pretty extensive, including whacking the XUL content sink, the XUL content model builder, and the tree builder. Per my discussion with gramps and chofmann, I am slipping these to M5, as well.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Fixed: there were two problems. One was a benign assert; the other was incorrect handling of default namespaces on attributes (deref a null namespace prefix atom).
Whiteboard: will verify once a linux build comes out with reliable menus
Status: RESOLVED → VERIFIED
Whiteboard: will verify once a linux build comes out with reliable menus
the crash is gone on RedHat 5.2 on build 1999-06-16-08
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.