-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault at XmlXpathContext:evaluate (EXC_BAD_ACCESS) #159
Comments
Can you provide a small XML sample and some js code that causes the segfault? |
Hi shtylman, Sorry it turns out it didn't break because I upgraded Node. It broke because the XML I was downloading and parsing coincidentally changed during the same period. Here's a simple script and data file that demonstrates the problem: http://dl.dropbox.com/u/45897012/libxmljs/test.js It seems that the trouble is with the XPath. I'm trying to pull out a 'value' node within a 'return' node that doesn't exist.
With this XML, there is no 'return' node with a fieldID of 8. I can simply get around this by doing it in two steps. First, pulling out I was expecting that the In the meantime I can easily rewrite it. But in case it happens for anyone else, it would be good if it didn't kill the app? Thank you. |
I agree. It should probably be a little more graceful than a segfault :) |
+1 Simple failing test (segfaults): module.exports.get_missing = function(assert) {
var doc = libxml.Document();
var root = doc.node('root');
var missing = doc.get('missing/text()');
assert.equal(missing, undefined);
assert.done();
}; |
version 0.6.1 released which contains this patch, thank you for the contribution :) |
Hi,
Please could anyone help me out with this issue? (I'm a bit of a newbie).
I have a little Node script that makes some HTTP calls to grab some XML, parses it and generates some HTML from the results. It was working fine in Node v0.6. But since I upgraded to Node v0.8, it's failing with Segmentation Fault 11. (Clearing out the node_modules didn't help).
I installed Node from source and ran it using gdb. Here's the error I'm getting:
The libxmljs method I'm using is parseXmlString.
Thanks in advance for any pointers or advice!
*Edit: Should have said, I'm on a Mac, v10.7.4 and I'm now running Node v0.8.8
The text was updated successfully, but these errors were encountered: