Skip to content
This repository

segmentation fault #11

Open
webr3 opened this Issue November 22, 2010 · 17 comments

7 participants

webr3 Ruben Daniels Curtis Chambers Jacob Beard Alan Nikita Vasilyev Simon Kornblith
webr3

node 3.1 on ubuntu 10.10, 32 bit - that's as much info as I've got, seg faults as soon as you require

Ruben Daniels
Owner

The module is compiled for node 0.2.x. You could recompile o3 yourself for node 0.3. The source is here: https://github.com/ajaxorg/o3

webr3

cheers, will give it a got and let you know :)

webr3

cool - the rebuild worked.. but failing on 'no method getAttributeNodeNS' - are namespaces not supported?

Curtis Chambers

Now that the new stable version of node.js is 0.4, can you post new binaries for that version?

Jacob Beard

+1 to request for up-to-date binaries

Jacob Beard

Are there instructions anywhere for building o3-xml? It doesn't come with a makefile or anything I recognize as a standard build script.

Jacob Beard

I'm getting a segfault on Ubuntu 10.04 with node 0.4.7, even after building the module using the node_modules_build script. Any help would be appreciated.

Curtis Chambers

@jbeard4 after some load testing I found that the o3-xml library has a memory leak, so I've since switched to xml2js, which is very lightweight and fast

Jacob Beard
Curtis Chambers

@jbeard4 looks like there hasn't been a commit to o3 or node-o3-xml since February. Not sure what the official status of it is, but that's certainly a long time between commits

Jacob Beard

For completeness, here's a link to the question I've posted on stack overflow: http://stackoverflow.com/questions/6240577/node-js-library-implementing-w3c-xml-dom

Jacob Beard

After building a binary myself, it looks like segfault might only be occurring in the node REPL. Here is a reduced test case:

fs = require("fs")
xml = require("../lib/o3-xml");
s = fs.readFileSync("test01.xml", "utf8")
d = xml.parseFromString(s)

test01.xml:

<?xml version="1.0"?><catalog></catalog>

Segfaults in node REPL, but works otherwise. It looks like this might be distinct from the issue mentioned in the original bug report, so I may open a new one.

Alan
grpwnd commented June 05, 2011

@curtisc thanks for the insight into the memory leak issue with o3-xml. shame.
is there a decent tutorial/example for using xml2js you can point us to?
Thanks.

Curtis Chambers

@grpwnd the docs on the xml2js repo are small but solid. The one thing you have to do when switching from a library like o3 to xml2js is to switch from a synchronous to asynchronous mindset (which you're probably already used to since you're using node).

Basically, the parse function fires an end event once it's done parsing, and you can play with the data from there. The example in the tests folder of the repo has a good example: https://github.com/Leonidas-from-XIV/node-xml2js/blob/master/test/xml2js.test.js

Alan
grpwnd commented June 05, 2011

@curtisc thanks for speedy reply.
assert.equal(@curstic, "Hero!"); // :-)
Was being lazy. but now read thru the tests + fixture and it all makes perfect sense.
Will be using xml2js for sure. no-brainer for simple projects!

Nikita Vasilyev
NV commented June 14, 2011

Are there instructions anywhere for building o3-xml?

I'm still interested.

Simon Kornblith

A little birdie told me that there are binaries for newer node versions at https://github.com/ajaxorg/node-o3-xml-v4. Not sure if they work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.