Understanding cygwin debugging messages

  • Thread starter thedude36
  • Start date
  • #1
30
0
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
 

Answers and Replies

  • #2
cepheid
Staff Emeritus
Science Advisor
Gold Member
5,192
38
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.
 
  • #3
34,935
6,698
In addition to what cepheid said, a segmentation fault could also come from attempting to dereference a pointer that hadn't been properly initialized.
 

Related Threads on Understanding cygwin debugging messages

  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
6
Views
5K
Replies
1
Views
3K
Replies
1
Views
2K
  • Last Post
Replies
3
Views
1K
Replies
3
Views
3K
Replies
16
Views
8K
  • Last Post
Replies
1
Views
960
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
8
Views
2K
Top