Re: Seg Fault Programming Software Development by Narue >Seg Fault Check your array indices. Use a debugger, or sprinkle the code liberally with debug prints statements. If you don't even know the general area that the segmentation fault is coming from then you aren't debugging properly, and debugging is a huge part of programming so you'd better start learning how to do it and get used to it. Re: Binary Search in a Linked List (Please Help) Programming Software Development by VernonDozier …" is a bit vague. Seg fault on what line, with what Linked List, searching for … the largest? What line number does this occur? Is the seg fault dereferencing a null pointer? Which null pointer? current? emp… Re: Using strings....help Programming Software Development by tonymuilenburg Seg fault maybe? I would try using a different compiler, and if you still have issue, send the rest of the cpp file, and i'll try compiling it on my machine. I would be interested in seeing how you instantiate the class, for example. Re: C++ Allocating 2-D Array Programming Software Development by VernonDozier Seg faults can have all sorts of causes. Most likely i and j are not valid indexes for the array. It's impossible to tell though without seeing more code. Re: Help with a pointers and memory assignment Programming Software Development by Fbody Seg faults are caused when your program accesses (and potentially corrupts) portions of your system's memory that are not assigned to it. Odds are address 1000 is not an address assigned to your program. Thus, for the first version of your program, that is not an unexpected result. Re: Windows XP freezes and can't open in safe mode Hardware and Software Microsoft Windows by gerbil :). Seg faults.. If that was a software error occurring while running … SEG FAULT when trying to close ofstream Programming Software Development by sidvb1 …* logger = Logger::Instance(); logger->WriteToFile(); } Occasionally I receive a SEG FAULT when logging. Here is the gdb output: #0 0x0000003d8786d1b3… Logger::CloseLogFile (this=0x2aaab001c460, prefix=...) at Logger.cpp:225 The SEG FAULT is occuring on the closing of the file (AFAIK… doubly linked list seg fault help Programming Software Development by wnr78ta …class I am in and I keep getting a seg fault on my last line of code, no…will print them all then on the last one seg fault, all my test functions are working how… should too. Any idea what would cause a seg fault? only things in the class are what …i can think of is the destructor causing a seg fault. the destructor just calls my popback function … Re: doubly linked list seg fault help Programming Software Development by wnr78ta I tried these changes and its still giving me a seg fault on the last line of code. maybe thats not the problem. What else could cause a seg fault on the last line of code no matter what that line of code is? Thanks Re: doubly linked list seg fault help Programming Software Development by Narue [QUOTE]What else could cause a seg fault on the last line of code no matter what that line of code is?[/QUOTE] Corrupted memory that only manifests in the destructor is a good start. seg fault that doesnt make sense Programming Software Development by jhdobbins … last program.. just does different things.. anyway, im getting a seg fault i dont understand one bit its off of the… but if you input 7 to quit the program it seg faults. also, if you run one of the other menu… question but when you type a value in it will seg fault. is my input incorrect? thanks. [code]/*This program will… Seg Fault ~ Linked List Delete Programming Software Development by Mistro116 Hello, I get the following seg fault error when I try to delete the last node … delete function and high level function are included below: The seg fault only occurs when the if value in BeginQuizFirstTry detecting… not true or = 0. Can anyone tell me why this seg faults? [CODE]int Delete (NODEPTR *headPtr, char *target) { /* Node pointers… Re: Seg Fault - Two Hours and Nothing. Programming Software Development by JasonHippy …a debug build from your IDE. When the seg-fault occurs you should be given the opportunity…line of your code that is causing the seg fault further down the stack. Once you'…the code and watching the variables until the seg-fault occurs. As long as you're …watching the right things, the cause of the seg-fault should become more or less apparent. … Re: seg fault that doesnt make sense Programming Software Development by jhdobbins i still got a seg fault but it was good enough to turn it in. Seg Fault Programming Software Development by dontcare … the median function, the average function might be giving the seg fault. Anway I can't figure it out. You should… Re: Seg Fault Programming Software Development by jasweb2002 ^^ Exactly. You need to find where the seg fault is hitting. When I have that problem, I usually fill my program with stupid couts like "entering _____ function", "about to enter so and so loop", "got out of so and so loop" blah blah blah seg fault when accessing the array Programming Software Development by musicmancanora4 … i can do some calculations. But i keep getting a seg fault. [code] int main(void) { unsigned month; unsigned year; unsigned… Seg fault, bug in gcc compiler?? Programming Software Development by achillez … then ./short enter a number, you ll end up in seg fault. you can comment the first n try d second… Seg Fault problem Programming Software Development by opposition … code in a while(!ins.eof()) loop, it reports a seg fault.... here is my code. [CODE]#include <iostream>… Re: Seg Fault problem Programming Software Development by opposition just been tring to figure this out for ages, for some reason it also has a seg fault it i try to compare something that doesnt even do anything like... [CODE] if(dates[0] == 0) { cout << "SOMEHTING" << endl; }[/CODE] is there something really that wrong with my code :| i cant see where ive gone wrong... Seg fault when using ludcmp. Programming Software Development by gimst19 … and C come out just fine, but there is a seg fault when I try to run the lud files. Can… Seg Fault? Programming Software Development by BlackStar [ICODE] struct Node{ int n; Node *next; }; struct Some{ Node * ptr; }; int main() { Node *aNode = new Node; Some *aSome; aSome->ptr = aNode; } [/ICODE] Why do I get a Seg Fault here? Seg Fault - Two Hours and Nothing. Programming Software Development by swolll …; break; } [/code] No matter what I do, I get a Seg Fault. I think I need to erase the Playlist pointers… Re: Seg Fault - Two Hours and Nothing. Programming Software Development by swolll I think the problem is how I access the second vector, but I don't know how to fix it. cout << allPlaylists.at(0).getPlaylistName(); // Does work, but... cout << allPlaylists.at(0).listSongs.at(0).getSongName(); // Causes a seg fault. How would I access a function for a vector of a vector if not that way? Re: Seg Fault - Two Hours and Nothing. Programming Software Development by mitrmkar Why are you doing a thing like [ICODE]listSongs.push_back(NULL);[/ICODE] there? Are you sure that you are not doing e.g. a [ICODE]listSongs.at( [I]index of a NULL pointer[/I] )->getSongName()[/ICODE] causing the seg fault? Re: Seg Fault - Two Hours and Nothing. Programming Software Development by swolll I've used a debugger, and the seg faults occur whenever I use a statement with allPlaylists/listSongs. For example, like this: allPlaylists.at(0).listSongs.at(0)->getSongName(); How can I use Songs getSongName function for listSongs (which is of type *Songs)? Seg Fault Programming Software Development by dansnyderECE … function to anything between 0-5 and 8+ then the seg fault doesn't occur either. Any ideas? Re: Seg Fault Programming Software Development by nezachem Can you provide some test data set (the smaller the better) which exhibits the seg fault? Re: Seg Fault Programming Software Development by nezachem [B]>> which exhibits the seg fault[/B] Are you sure a segfault is reproducible with this set? Re: Seg Fault Programming Software Development by dansnyderECE … most up to date code and this definitely causes a seg fault: [CODE]#include "VMIPS.h" #include "VMIPS_MIPS…