Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


segmentation fault #11

webr3 opened this Issue · 17 comments

7 participants

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

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

The module is compiled for node 0.2.x. You could recompile o3 yourself for node 0.3. The source is here:


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


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:

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)


<?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.


@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?

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:


@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

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 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.