1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Understanding cygwin debugging messages

  1. Feb 13, 2013 #1
    I'm working on a program for my intro level c class. This program is supposed to take in some text and then tell you the number of occurances of each letter used (among other things). Initially I was getting a segmentation fault whenever I ran the program. I tried running the debugger to help pinpoint where the issue was, but i cannot make heads or tails of the information it gave me. Could anyone help/point me toward some information to help me read debugging messages??

    This is the message i get:

    3 [main] strings 4772 exception::handle: Exception: STATUS_ACCESS_VIOLATION
    41626 [main] strings 4772 open_stackdumpfile: Dumping stack trace to strings.exe.stackdump

    Program received signal SIGSEGV, Segmentation fault.
    0x6114034d in __svfscanf_r () from /usr/bin/cygwin1.dll
  2. jcsd
  3. Feb 13, 2013 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I don't know much about cygwin or this debugger, so I can't really tell you exactly what that message means (but Googling the text of the error message verbatim usually results in finding a site where it is explained :wink:). In general, a seg fault usually results from trying to access memory locations that don't exist or are otherwise inaccessible. For example, if your program had an array indexing problem that caused it to try to write to a location in the array that was out of bounds (outside of what was allocated that array), that would lead to a seg fault.

    I am pretty familiar with C. A better approach might be for you to post your code. We might be able to pick out errors in it.
  4. Feb 13, 2013 #3


    Staff: Mentor

    In addition to what cepheid said, a segmentation fault could also come from attempting to dereference a pointer that hadn't been properly initialized.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook