in reply to Re: disappearing segfault
in thread disappearing segfault

Because it's unreliable.

Imagine someone shooting a BB gun blindfolded. He keeps hitting you in the butt and it's darn uncomfortable. So you move ten inches to the right. The BB's continue whizzing past you, "thwap, thwap, thwap..." Then the shooter scratches an itch and resumes shooting, but this time he hits you again. Or you lean to the side to pick something up... you get hit again. Or someone walks up to talk to you, and he gets hit. Just because you're not currently getting hit doesn't mean the BB's aren't hitting anything anymore. You're just not the one getting hit.

Adding the print statement might stop you from getting bit by the bug, but it doesn't mean the bug isn't biting anymore. Some minor change elsewhere in the code could cause the stars to align again and you start getting bit again.

Just a thought....


Dave

Replies are listed 'Best First'.
Re^3: disappearing segfault
by BrowserUk (Patriarch) on Mar 11, 2009 at 06:48 UTC

    The point is that if the print statement truly fixed the problem, then it would be fixed. By definition.

    We both know that is unlikely. The reality is (most likely) that the addition of a print statement defers the symptom. And that realisation of itself is a useful one.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.