Thread: Help me debug?
-
March 8th 2006, 11:08 AM #1
Help me debug?
So, I'm working on a program that compiles fine but gives this message when run:
jfarthing@em7add11 # ./a.out
Segmentation Fault
jfarthing@em7add11 #
Anybody want to offer some advice?In the grave they chose to make their beds
Now all that they've created comes crashing down,
Down upon their heads
Death is waiting
-
March 8th 2006, 11:14 AM #2
Re: Help me debug?
You have a bug in your program.



OK...
Not sure if you're using memory pointers or what, but I think it usually has to do with accessing uninitialized variables or using variables improperly, as in the example above
Michael"... engage your brain before you engage your weapon." - Gen. James Mattis, USMC
I don't care how systematic your theology is until you show me how biblical it is.
-
March 8th 2006, 11:57 AM #3
Re: Help me debug?
Here's my source:
See anything that resembles what that article describes?Code:#include <stdio.h> int main() { printf("Segmentation Fault\n"); return 1; }
In the grave they chose to make their beds
Now all that they've created comes crashing down,
Down upon their heads
Death is waiting
-
March 8th 2006, 12:01 PM #4
Re: Help me debug?
Just the author of the program.
(Who will now be segmented.
DEVELOPERS! oy!)
"... engage your brain before you engage your weapon." - Gen. James Mattis, USMC
I don't care how systematic your theology is until you show me how biblical it is.
-
March 8th 2006, 08:37 PM #5
Re: Help me debug?
seg faults are evil, evil little errors.
Living so free is a tragedy
When you can't be what you want to be
Living so free is a tragedy
When you can't see what you need to see
-- Powerman 5000, "Free"
-
March 8th 2006, 09:46 PM #6
Re: Help me debug?
Originally posted by Em7add11
Just a note, $cir is right. -Sparko
-
March 8th 2006, 09:48 PM #7
Re: Help me debug?
<!-- No comment? -->
<!-- Actually, this really isn't a comment! -->
And it's all the segment's fault!
The BSD demon made me do it...
Blessings,
Lee"What I pray of you is, to keep your eye upon Him, for that is everything." (J.B. Stoney)
-
March 8th 2006, 09:49 PM #8
Re: Help me debug?
It's like the apocryphal tape backup restore source code:
Code:#include <stdio.h> int main () { printf ("Cannot read tape."); return -1; }You can build a prototype by the book, but a legend you build by the seat of your pants.
-Carroll Shelby
-
March 9th 2006, 08:32 AM #9
Re: Help me debug?
no rows returnedCode:select * from developers where developers = TRUE
"... engage your brain before you engage your weapon." - Gen. James Mattis, USMC
I don't care how systematic your theology is until you show me how biblical it is.
-
March 9th 2006, 08:54 AM #10
Re: Help me debug?
Or my personal favourite... (forgive the BASIC
Originally posted by NeilUnreal
)
Code:PRINT "WARNING! ALL DATA ON NON-REMOVEABLE" PRINT "DRIVE C: WILL BE LOST! PROCEED? (Y/N)"; do:loop until InKey$<>"" PRINT "Y" PRINT PRINT "Formatting..."

... erase your hard drives, and your backups too,
and the hard drives of anyone related to you...
~ "Weird Al" Yankovic, Virus Alert
... we're not on Earth to be "punished" by sin, we're on Earth to serve God. You don't want to do that?
Go do whatever suits you and die happy if you can. ~ Vigilante
-
March 9th 2006, 01:41 PM #11
Re: Help me debug?
Originally posted by {Tim}

When you implement a Twain scanner driver, a common place to start is with the Twain default library. One of the fall-back error messages in that library reads something like:
"Sorry, detailed error status returned success."
(In other words, it succeeded in returning a fatal error,
)
And I've actually seen it show up at the user interface level from at least one commercial scanner driver.
-NeilYou can build a prototype by the book, but a legend you build by the seat of your pants.
-Carroll Shelby
-
March 9th 2006, 06:31 PM #12
Re: Help me debug?
We have a product that says, erm, "Press enter to exit"...

Blessings,
Lee"What I pray of you is, to keep your eye upon Him, for that is everything." (J.B. Stoney)
-
March 9th 2006, 10:24 PM #13
Re: Help me debug?
there'e always the ubiquoitous "Keyboard not found. Press F1 to continue"
Living so free is a tragedy
When you can't be what you want to be
Living so free is a tragedy
When you can't see what you need to see
-- Powerman 5000, "Free"
-
March 11th 2006, 12:17 PM #14
Re: Help me debug?
Maybe by the F1 button they mean the belly button on the front of the computer?
Blessings,
Lee"What I pray of you is, to keep your eye upon Him, for that is everything." (J.B. Stoney)
-
March 11th 2006, 01:40 PM #15















































































Quote

Another example of the...
Today, 12:54 PM in Natural Science 301