Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | nick_keighley_nospam@hotmail.com |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Remving an element from Queue |
| Date | 2012-05-09 03:05 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <337629.1991.1336557915938.JavaMail.geo-discussion-forums@vbqq1> (permalink) |
| References | <4fa8d4c2$0$290$14726298@news.sunsite.dk> <27603720.623.1336478949976.JavaMail.geo-discussion-forums@vbcm9> <job5k5$9rd$1@dont-email.me> <17230148.361.1336546987566.JavaMail.geo-discussion-forums@vbcm9> <joddtv$r8v$1@dont-email.me> |
On Wednesday, May 9, 2012 10:37:38 AM UTC+1, Bart wrote: > <nick_keighley_nospam@hotmail.com> wrote in message > news:17230148.361.1336546987566.JavaMail.geo-discussion-forums@vbcm9... > > On Tuesday, May 8, 2012 2:03:48 PM UTC+1, Bart wrote: > >> <nick_keighley_nospam@hotmail.com> wrote in message > >> > Why didn't you use a debugger? That's how I found the bug. <snip> > >> No need for any debugger. And what exactly did it say anyway? > > > > well the program has Undefined Behaviour so the question isn't really > > meaningful. Visual C++ gives:- > > > > "Unhandled exception at 0x00411cc9 in quick.exe: 0xC0000005: Access > > violation reading location 0xcdcdcdcd." > > > > The debugger shows it crashed in printStruct() and p has an insane value. > > As I said, when I tried it under one compiler, it just looped forever > p;rinting the same sequence of 3 or 4 values, so p (ie. q->head) presumably > had a sensible enough value. > > Debuggers have their uses but are probably overkill for an obvious logic > error within the first dozen lines of execution! and how would I know the crash was going to occur within a few dozen lines of startup? > When a program goes wrong a few billion statements from the start, because > of some unrelated code a billion or two statements back in a totally > different part, then it might be time to wheel it out (and even then I'm not > sure how they could help). whatever. I judged running under a debugger was a quicker way to find the bug than ploughing through lots of source code. It so happened it pin-pointed the bug almost instantly.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Remving an element from Queue arnuld <sunrise@invalid.address> - 2012-05-08 08:09 +0000
Re: Remving an element from Queue Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-05-08 08:01 -0400
Re: Remving an element from Queue arnuld <sunrise@invalid.address> - 2012-05-09 05:43 +0000
Re: Remving an element from Queue Barry Schwarz <schwarzb@dqel.com> - 2012-05-08 23:21 -0700
Re: Remving an element from Queue arnuld <sunrise@invalid.address> - 2012-05-09 09:27 +0000
Re: Remving an element from Queue James Kuyper <jameskuyper@verizon.net> - 2012-05-09 07:54 -0400
Re: Remving an element from Queue arnuld <sunrise@invalid.address> - 2012-05-09 13:18 +0000
Re: Remving an element from Queue Barry Schwarz <schwarzb@dqel.com> - 2012-05-09 10:59 -0700
Re: Remving an element from Queue arnuld <arnuld.mizong@gmail.com> - 2012-05-10 05:26 -0700
Re: Remving an element from Queue nick_keighley_nospam@hotmail.com - 2012-05-11 00:11 -0700
Re: Remving an element from Queue Barry Schwarz <schwarzb@dqel.com> - 2012-05-14 15:53 -0700
Re: Remving an element from Queue lawrence.jones@siemens.com - 2012-05-15 17:42 -0400
Re: Remving an element from Queue Barry Schwarz <schwarzb@dqel.com> - 2012-05-15 16:40 -0700
Re: Remving an element from Queue James Kuyper <jameskuyper@verizon.net> - 2012-05-15 23:03 -0400
Re: Remving an element from Queue Barry Schwarz <schwarzb@dqel.com> - 2012-05-15 20:38 -0700
Re: Remving an element from Queue Jens Gustedt <jens.gustedt@loria.fr> - 2012-05-16 08:09 +0200
Re: Remving an element from Queue James Kuyper <jameskuyper@verizon.net> - 2012-05-16 07:18 -0400
Re: Remving an element from Queue Barry Schwarz <schwarzb@dqel.com> - 2012-05-16 16:30 -0700
Re: Remving an element from Queue James Kuyper <jameskuyper@verizon.net> - 2012-05-17 09:09 -0400
Re: Remving an element from Queue Barry Schwarz <schwarzb@dqel.com> - 2012-05-17 11:48 -0700
Re: Removing an element from Queue James Kuyper <jameskuyper@verizon.net> - 2012-05-17 15:38 -0400
Re: Removing an element from Queue Barry Schwarz <schwarzb@dqel.com> - 2012-05-17 15:21 -0700
Re: Removing an element from Queue James Kuyper <jameskuyper@verizon.net> - 2012-05-17 19:08 -0400
Re: Removing an element from Queue Tim Rentsch <txr@alumni.caltech.edu> - 2012-05-19 09:05 -0700
Re: Removing an element from Queue lawrence.jones@siemens.com - 2012-05-20 15:10 -0400
Re: Removing an element from Queue Tim Rentsch <txr@alumni.caltech.edu> - 2012-05-21 09:00 -0700
Re: Remving an element from Queue Tim Rentsch <txr@alumni.caltech.edu> - 2012-05-19 08:49 -0700
Re: Remving an element from Queue Tim Rentsch <txr@alumni.caltech.edu> - 2012-05-17 12:36 -0700
Re: Remving an element from Queue nick_keighley_nospam@hotmail.com - 2012-05-08 05:09 -0700
Re: Remving an element from Queue "BartC" <bc@freeuk.com> - 2012-05-08 14:03 +0100
Re: Remving an element from Queue nick_keighley_nospam@hotmail.com - 2012-05-09 00:01 -0700
Re: Remving an element from Queue nick_keighley_nospam@hotmail.com - 2012-05-09 00:03 -0700
Re: Remving an element from Queue "BartC" <bc@freeuk.com> - 2012-05-09 10:37 +0100
Re: Remving an element from Queue nick_keighley_nospam@hotmail.com - 2012-05-09 03:05 -0700
Re: Remving an element from Queue arnuld <sunrise@invalid.address> - 2012-05-09 09:44 +0000
Re: Remving an element from Queue Mark Bluemel <mark.bluemel@googlemail.com> - 2012-05-08 06:07 -0700
Re: Remving an element from Queue Mark Bluemel <mark.bluemel@googlemail.com> - 2012-05-08 06:35 -0700
Re: Remving an element from Queue Johann Klammer <klammerj@NOSPAM.a1.net> - 2012-05-08 20:50 +0200
Re: Remving an element from Queue 88888 Dihedral <dihedral88888@googlemail.com> - 2012-05-11 00:39 -0700
csiph-web