Skip to content
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: 11 #4

Open
codan84 opened this issue Jun 29, 2015 · 3 comments
Open

Segmentation fault: 11 #4

codan84 opened this issue Jun 29, 2015 · 3 comments

Comments

@codan84
Copy link

codan84 commented Jun 29, 2015

code in my own node.js module (copied it from 1 of your tests as a starting point):

var ORDER = '<order><book ISBN="10-861003-324"><title>The Handmaid\'s Tale</title><price>19.95</price></book><cd ISBN="2-3631-4"><title>Americana</title><price>16.95</price></cd></order>';
var DISCOUNT = '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:param name="discount"/><xsl:template match="/"><order><xsl:variable name="sub-total" select="sum(//price)"/><total><xsl:value-of select="$sub-total"/></total>15% discount if paid by: <xsl:value-of select="$discount"/></order></xsl:template></xsl:stylesheet>';
var RESULT = '<?xml version="1.0" encoding="UTF-8"?><order><total>36.9</total>15% discount if paid by: 1972/01/01</order>';

var config = {
    xslt: DISCOUNT,
    source: ORDER,
    result: String,
    params: {
        discount: '1972/01/01'
    }
};
xslt4node.transform(config, function (err, result) {
    if (!err) {
        console.log(">>RESULT:");
        console.log(result);
    }else{
        console.log(">>ERROR:");
        console.log(err);
    }
});

On execution of this code I will get in the console:

Segmentation fault: 11

And the node app stops running. No line with >>ERROR: either so it didn't go into callback. Memory access violation issue?
OSX 10.9.5
Java 1.8.0_45
Python 2.7.5

@p-muessig
Copy link
Member

Unfortunately I do not have access to an OSX system. I tried your example successfully on Ubuntu with node.js 0.10.39 and 0.12.6, gcc 4.84, Java 1.8.0_45 and Python 2.7.6.

@kildem
Copy link

kildem commented Jul 6, 2015

I have OSX 10.10 see my test result:
#3 (comment)

@codan84
Copy link
Author

codan84 commented Jul 24, 2015

When I run tests:

$ nodeunit test
test
✔ configuration - ambiguous xslt
✔ configuration - ambiguous source
✔ configuration - source missing
✔ configuration - result missing
Segmentation fault: 11

I would really love to use this library as I can't find any viable alternatives. But I would need to find out what is causing this segmentation fault...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants