What is NUMBS? What is fp1? Are you sure fp1 is a valid file pointer and not NULL or uninitialized? Does I ever go beyond NUMBS? On first glance this looks correct, but if the arrays aren't large enough, you could start mangling local variables and stack frames when you exceed them...
Last edited by Corona688; 12-12-2010 at 03:23 AM..
I would say your quickest method of finding your issue is to compile the program with debugging enabled ("-g"), run the program , wait for the core-dump. Then load the program up in a debugger, against the core. For example gdb:
If you type "where" it will tell you the line number it is core-dumping. You can then print out the variables so you can tell what is the problem, for example in your snippet "i" could be less then or greater than "NUMBS" which would make it coredump.
If you havent got access to a debugger I suggest you start using "printf's" to find out where the problem is. Lines such as:
can show the line where it is core-dumping. Then you can add printf's of the variables around where it core-dumps.
Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1...
I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one.
Below are two very condensed snippets of which I have added the results inside the each code section.
IMPORTANT!... (11 Replies)
Hi everyone
Need to get version of npm application that have several output like this:
root: nmp -version
10
root: nmp -version
10
root: nmp-new -version
3.1
root: nmp-old -version
Segmentation fault
count them , after that write to the file like this:
10 2
3.1 1 (1 Reply)
hello,
I accidentally removed a directory with its contents with rm -r and I don't have a backup. I got to know about extundelete utility on linux and downloaded on my Linux Fedora 28 notebook PC. The file system is ext4. I log in to the system as single user mode and unmount the /home directory... (2 Replies)
Hi guys, first of all apologize for my English...
I have a big problem with "Segmentation fault", when running my game server.
Console:
(gdb) bt full
#0 0x0000000000000000 in ?? ()
No symbol table info available.
#1 0x00007ffff702aca4 in std::basic_ostream<char,... (1 Reply)
Hi Guys,
I just installed and booted a zone called testzone. When I logged in remotely and tried changing to root user I get this error:
"Segmentation fault"
Can someone please help me resolve this?
Thanks alot (2 Replies)
this is a network programming code to run a rock paper scissors in a client and server.
I completed it and it was working without any error. After I added the findWinner function to the server code it starts giving me segmentation fault.
-the segmentation fault is fixed
Current problem -Also... (3 Replies)
I use a binary name (ie polo) it gets some parameter , so for debugging normally i do this :
i wrote script for watchdog my app (polo) and check every second if it's not running then start it , the problem is , if my app , remain in state of segmentation fault for a while (ie 15 ... (6 Replies)
Hi,
i need a script to find words "error,jbase,voilation,segmentation" from a file(verify.txt) and if got any of the above words then send an email and if wont find any then execute the cron job. every time it read file verify.txt it must first clear the previous data in the file .
Kindly... (3 Replies)