Forum Moderators: coopster

Message Too Old, No Replies

Segmentation fault (core dumped)

Anyone know what this means?

         

jamesa

12:15 pm on May 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The script just dies (sporadically actually). When I run it via the CLI I get that error. Any idea what that means, or at least what direction to look in?

coopster

12:43 pm on May 7, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



What command or process are you attempting to run? Something to do with images? Printing? System commands?

[google.com...]

moltar

12:47 pm on May 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"Segmentation fault" message usually has something to do with memory managment in C

jamesa

1:39 am on May 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> What command or process are you attempting to run?

I'm looping through a group of XML files, parsing them and writing to a database (removing all the database stuff didn't change anything, btw). I traced it down to a particular XML file; once I removed that from the list the problem disappeared. That's my work-around for now.

Since I don't have control of the XML files themselves, I'm trying to make sure that the script stays alive even if a wrench gets thrown in (file unnaccessable, bad format, etc). But the "Segmentation fault (core dumped)" message has got me stumped. Don't know what it is, how to catch it, where in the script it's failing or even what the problem with the offending XML file is.

At this point I think I need to troubleshoot a bit more before I can post an intelligent question :) ...but still open to any tips/suggestions/info, especially regarding the error msg.

Glacai

2:58 am on May 9, 2004 (gmt 0)

10+ Year Member



Hi Jamesa,

The 'core dumped' I think just means the program released the memory and exited.

A segmentation fault usually occurs when you try and access a part of memory that is not yours to use, or by deferencing an uninitialised or invalid pointer.

Could you be passing/using a bad handle or overrunning an array somewhere?