Click here to Skip to main content
15,893,266 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: CCC 03-12-2021 Pin
pkfox2-Dec-21 22:20
professionalpkfox2-Dec-21 22:20 
GeneralRe: CCC 03-12-2021 Pin
OriginalGriff2-Dec-21 23:02
mveOriginalGriff2-Dec-21 23:02 
GeneralRe: CCC 03-12-2021 Pin
pkfox2-Dec-21 23:48
professionalpkfox2-Dec-21 23:48 
GeneralRe: CCC 03-12-2021 Pin
englebart6-Dec-21 8:26
professionalenglebart6-Dec-21 8:26 
GeneralThe house that Jack built Pin
honey the codewitch2-Dec-21 15:58
mvahoney the codewitch2-Dec-21 15:58 
GeneralRe: The house that Jack built Pin
englebart2-Dec-21 16:42
professionalenglebart2-Dec-21 16:42 
GeneralRe: The house that Jack built Pin
honey the codewitch2-Dec-21 18:07
mvahoney the codewitch2-Dec-21 18:07 
GeneralRe: The house that Jack built Pin
ElectronProgrammer3-Dec-21 1:23
ElectronProgrammer3-Dec-21 1:23 
This sounds familiar Frown | :(

Sometimes it happens to me too. I write a program thinking I covered all possible breakage points and, when I go debug it, it crashes and takes GDB with him. Side effects can be very nasty and naughty Sigh | :sigh: .

From my limited experience, if you are checking for out of range, null and other usual checks, this usually comes down to some uninitialized variable or some math using the wrong variable/operation.

Sometime ago I spent almost one month inserting prints into a somewhat large program because whatever was wrong with it also crashed GDB. The program started fine and after e few iterations (randomly between 100 and 1000 depending on input) bam!

It ended up being both an uninitialized temporary variable and a missing dot (decimal place) in a formula that caused an unsigned int to overflow (to a smaller value than it should), that then caused the result of the next formula to be negative when it shouldn't and cascaded out of control from there. Never found out why that would crash the debugger!

Now I try to have a debug only log that prints/dump non temporary variable state to a binary file on every iteration, just in case.

My advice would be for you to start by double checking variable initializations and formulas for correctness.

Good luck
GeneralRe: The house that Jack built Pin
honey the codewitch3-Dec-21 2:15
mvahoney the codewitch3-Dec-21 2:15 
GeneralRe: The house that Jack built Pin
BernardIE53173-Dec-21 10:54
BernardIE53173-Dec-21 10:54 
GeneralRe: The house that Jack built Pin
honey the codewitch3-Dec-21 11:15
mvahoney the codewitch3-Dec-21 11:15 
JokeTis the season PinPopular
Mike Hankey2-Dec-21 8:35
mveMike Hankey2-Dec-21 8:35 
GeneralRe: Tis the season Pin
pkfox2-Dec-21 22:32
professionalpkfox2-Dec-21 22:32 
GeneralRe: Tis the season Pin
oofalladeez34313-Dec-21 15:56
professionaloofalladeez34313-Dec-21 15:56 
GeneralEmbarassment at work today PinPopular
Gary Wheeler2-Dec-21 6:20
Gary Wheeler2-Dec-21 6:20 
GeneralRe: Embarassment at work today Pin
jeron12-Dec-21 6:24
jeron12-Dec-21 6:24 
GeneralRe: Embarassment at work today Pin
David O'Neil2-Dec-21 6:29
professionalDavid O'Neil2-Dec-21 6:29 
GeneralRe: Embarassment at work today Pin
PIEBALDconsult2-Dec-21 6:34
mvePIEBALDconsult2-Dec-21 6:34 
GeneralRe: Embarassment at work today Pin
Gary Wheeler2-Dec-21 6:40
Gary Wheeler2-Dec-21 6:40 
GeneralRe: Embarassment at work today Pin
David O'Neil2-Dec-21 7:43
professionalDavid O'Neil2-Dec-21 7:43 
GeneralRe: Embarassment at work today Pin
PIEBALDconsult2-Dec-21 6:40
mvePIEBALDconsult2-Dec-21 6:40 
GeneralRe: Embarassment at work today Pin
Gary Wheeler2-Dec-21 6:42
Gary Wheeler2-Dec-21 6:42 
GeneralRe: Embarassment at work today Pin
PIEBALDconsult2-Dec-21 6:45
mvePIEBALDconsult2-Dec-21 6:45 
GeneralRe: Embarassment at work today Pin
Gary Wheeler2-Dec-21 6:55
Gary Wheeler2-Dec-21 6:55 
GeneralRe: Embarassment at work today Pin
PIEBALDconsult2-Dec-21 7:04
mvePIEBALDconsult2-Dec-21 7:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.