I wasn't actually trying to make the problem go away by adding the call to log4perl. I was hoping to work out what was going on.
I'm using version 5.8.3 and don't think it is a problem with incorrect modules or the like. However, I don't know how I would look at %ENV and @INC immediately before the seg fault or bus error.
I suspect it is the recursion - the function being called uses LibXML version 1.58 to check some attributes of an XML tree. Although, even just putting a print in the loop over the children where the function calls itself also "removes" the problem, so this assumption may also be incorrect. As I now have another bug to correct, I shall return to the last working version, fix the second problem and try to implement and test the correction for the first problem more incrementally.
I would post some code but:
1. The program is written like C and peolple would laugh.
2. It is rather convoluted (see 1) and it would probably take more more time to produce a simple example than to solve the problem in the first place (although maybe that would be a good approach to solving the problem anyway).
Thanks again for the advice.
loris
Update
OK, now I know what is causing the problem. It is something to do with LibXML (V 1.58). If I do:
I get a segmentation fault. If I do:$parent->replaceChild($newNode,$oldNode);
everything works OK. I would rather replace the node so that I don't have to worry keeping the ordering the same. Has anyone seen behaviour like that before? Thanks again for the help.$parent->removeChild($oldNode); $parent->addChild($newNode);
loris
In reply to Re^3: Vague "bus error" question
by loris
in thread Vague "bus error" question
by loris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |