Closed
Bug 24499
Opened 25 years ago
Closed 25 years ago
Adding a nsIRDFXMLSinkObserver to a nsIRDFXMLSink, then reloading, causes crash.
Categories
(SeaMonkey :: General, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mj, Assigned: waterson)
References
Details
(Keywords: crash)
Attachments
(3 files)
1.96 KB,
text/rdf
|
Details | |
1.51 KB,
text/plain
|
Details | |
18.61 KB,
patch
|
Details | Diff | Splinter Review |
When experimenting with a nsIXMLSinkObserver to follow the state of a remote
RDF Datasource, I managed to reproducibly crash Mozilla.
The following code shows how:
<html><head><title>XML Sink Observer Test</title>
<script>
// LoadObserver observes the status of the remote datasources.
var oLoadObserver = {
OnBeginLoad: function(oDS) { dump('OnBeginLoad\n'); },
OnInterrupt: function(oDS) { dump('OnInterrupt\n'); },
OnResume: function(oDS) { dump('OnResume\n'); },
OnEndLoad: function(oDS) { dump('OnEndLoad\n'); }
}
// Get RDF Service
var oRDFS = Components.classes['component://netscape/rdf/rdf-
service'].getService();
oRDFS = oRDFS.QueryInterface(Components.interfaces.nsIRDFService);
// Get remote RDF
var oRDS = oRDFS.GetDataSource
('http://www.zope.org/Members/mj/Mozilla/RDFTree/tree.rdf');
// Try and add a nsIRDFXMLSinkObserver
oRDS = oRDS.QueryInterface(Components.interfaces.nsIRDFXMLSink);
oRDS.AddXMLSinkObserver(oLoadObserver);
// Force a refesh. We want to see the dosh.
oRDS = oRDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
// Crash:
oRDS.Refresh(false);
</script>
</head>
<body></body>
</html>
Comment out the Refresh, and no crash occurs. Tested on build 200001908.
Sorry, no traceback (don't know how =()
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M14
Assignee | ||
Comment 1•25 years ago
|
||
We need to hold strong refs to nsIXMLSinkObservers for this to work.
Assignee | ||
Comment 2•25 years ago
|
||
Assignee | ||
Comment 3•25 years ago
|
||
Assignee | ||
Comment 4•25 years ago
|
||
To verify,
1. Save the second attachment as 24499.xul in the
${DIST}/bin/chrome/tests/content/default directory (you'll need to probably
create that path: sorry, bug norris).
2. In the browser, load "chrome://tests/content/24499.xul",
3. Click the button. You should see "yippee, the load finished" the first time
you click the button, and then "it was already there" on subsequent clicks.
Assignee | ||
Comment 5•25 years ago
|
||
Assignee | ||
Comment 6•25 years ago
|
||
dougt: you are (as far as I know) the only person in the world using the
nsIRDFXMLSink interfaces. Let me know if the un-initial-capitalization of the
IDL is going to affect you.
Reporter | ||
Comment 7•25 years ago
|
||
Added zopestudio keyword for our own tracking.
Keywords: zopestudio
Comment 8•25 years ago
|
||
waterson, thanks for the heads up. I do not think that I have any js that uses
this interface, but I do have c++ code that does.
Assignee | ||
Comment 9•25 years ago
|
||
fix checked in, r=shaver
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 10•25 years ago
|
||
waterson or zopestudio folks. Can you please mark bug Verified is all is well
now. Thanks!
QA Contact: nobody → waterson
Reporter | ||
Comment 11•25 years ago
|
||
When I force an error, not all error cases are reported. Also error messages
are broken.
In the test case: Change line 14 to read:
var ds = RDF.GetDataSource("http://generate/an/error");
and the test XUL file will print:
ooh, an error occurred! it's null
Note the 'null' value for the Error Message parameter.
If I use a valid URL, to an existing server, but not an existing document, like
this:
var ds = RDF.GetDataSource("http://bugzilla.mozilla.org/not/existing");
I don't get any errors reported. Same for any other non-RDF exiting document.
The purpose of the aResult code is unclear to me.
<official_voice>I hereby declare this bug to be _reopenend_</official_voice>
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 12•25 years ago
|
||
This is reported as bug 25045.
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Comment 14•25 years ago
|
||
moving from architecture product to Browser. Architecture product is going
away.
Component: RDF → Browser-General
Product: Architecture → Browser
Target Milestone: M14 → ---
Version: 5.0 → other
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•