| delorie.com/archives/browse.cgi | search |
| From: | "The Advisor" <TheAdvisor AT cadvision DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| References: | <382f603a AT news DOT cadvision DOT com> <382f6cb9 AT news DOT cadvision DOT com> |
| Subject: | Re: SIGSEGV - oh how we love you |
| Date: | Tue, 16 Nov 1999 01:56:24 -0700 |
| Lines: | 59 |
| Organization: | Anarchy Incorporated |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 5.00.2615.200 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2615.200 |
| NNTP-Posting-Host: | 207.148.129.70 |
| X-Original-NNTP-Posting-Host: | 207.148.129.70 |
| Message-ID: | <38311cbf@news.cadvision.com> |
| X-Trace: | 16 Nov 1999 01:58:39 -0700, 207.148.129.70 |
| X-Original-NNTP-Posting-Host: | 204.50.1.43 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
okay I got it. I got an email about SYMIFY and that really helped..
I was adding the char to a linked list, but somehow it was trying to read
current_char->next when current_char was NULL..
reminder: initialize and check pointers before use.
( sheepish grin... )
The Advisor ( TheAdvisor AT cadvison DOT com )
The Advisor <TheAdvisor AT cadvision DOT com> wrote in message
news:382f6cb9 AT news DOT cadvision DOT com...
> Wow! just when you think you've got it all figured out... out pops another
> SIGSEGV.. I guess the problem still lies somewhere....
>
>
> The Advisor <TheAdvisor AT cadvision DOT com> wrote in message
> news:382f603a AT news DOT cadvision DOT com...
> > From The Advisor- TheAdvisor AT cadvision DOT com ...
> >
> > Can anybody help me figure out why I'm getting a SIGSEGV?
> >
> > Okay here's a snippet of my program: ( this is in a loop to constantly
get
> > keys from the user and store them in a linked list... )
> > int ch;
> > ch = readkey();
> > switch(ch >> 8) {
> > case KEY_ENTER: { printf("\n"); break; }
> > default: { if(((ch & 0xff) >= 32) && ((ch2 & 0xff) <= 255))
> > printf("%c", (ch & 0xff)); }
> > }
> >
> > Shutting down Allegro
> > Exiting due to signal SIGSEGV
> >
> > General Protection Fault at eip=00001796
> > eax=ffffffff ebx=00008454 ecx=000ca7a4 edx=000ca790 esi=00000054
> > edi=0004a370
> > ebp=000ca300 esp=000ca2e8 program=D:\PROGRAMS\CEDIT\TEST\CHARTEST.EXE
> > cs: sel=00a7 base=84547000 limit=fed80fff
> > ds: sel=00af base=84547000 limit=fed80fff
> > es: sel=00af base=84547000 limit=fed80fff
> > fs: sel=00c7 base=00000000 limit=0010ffff
> > gs: sel=00c7 base=00000000 limit=0010ffff
> > ss: sel=00af base=84547000 limit=fed80fff
> > App stack: [000ca370..0004a370] Exceptn stack: [0004a250..00048310]
> >
> > Call frame traceback EIPs:
> > 0x00001796
> > 0x00001f44
> > 0x000285ae
> >
> >
> >
>
>
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |