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
nodejs crashed with SIGSEGV in libxmljs::XmlNode::~XmlNode() #230
Comments
What is "my script"? What have you tried to debug? This report needs a lot more information. |
I am still on it. When I know more, I will add it here. Its not so easy, there is no exception in nodejs it just fishes with error code 139 and thats it. Edit: Error code 139 means SIGSEGV |
Ok, I can give some more information. I have this loop:
The function convertXml performs some transformation of the XML document and writes it to a file. If I limit the loop indices to a small number (e.g. two or three), then it works, but when I increase the loop indices to a higher number, then the node process finishes with exit code 139. If I invoke the script separately and convert one file at a time, then all files are converted without error. |
Finally managed to get debug build and a meaning full stacktrace:
For future reference. In the Makefile one has to add the |
I fixed this temporarily but just commenting out most of the XmlNode destructor. I am thinking that my bug might actually be the same as #163. Anyway this should really be investigated and fixed, since it makes an otherwise very nice library unusable for larger projects. |
Here is another one, this time I am getting SIGABRT:
Am I the only one who has such grave issues with the memory management of this library? |
@lanoxx probably, yes. It all depends on what you are trying to do. Your best bet is to post a simple script that shows the memory failure. You may be using parts of the bindings that are not commonly used or well tested. There are many uses of this library that present no segfaults. I use this library in production for web scraping and don't get segfaults. |
I believe this is part of the long standing bug in #163. If we fix that, we should close this unless it can be reproduced. |
I agree, this issue is pretty likely to be fixed and we can't test it because no tests were provided. |
I just got this error when executing my script. I am not sure whats causing it yet. There are only few things I could pull from the crash log:
StacktraceTop:
libxmljs::XmlNode::~XmlNode() () from /home/user/Code/libxmljs/build/Release/xmljs.node
libxmljs::XmlElement::~XmlElement() () from /home/user/Code/libxmljs/build/Release/xmljs.node
SegvReason: reading NULL VMA
Any idea?
The text was updated successfully, but these errors were encountered: