From: "Marp" Newsgroups: comp.os.msdos.djgpp Subject: Re: SIGSEGV - oh how we love you Date: Sun, 14 Nov 1999 21:35:33 -0500 Organization: MindSpring Enterprises Lines: 43 Message-ID: <80nrhs$qao$1@nntp9.atl.mindspring.net> References: <382f603a AT news DOT cadvision DOT com> NNTP-Posting-Host: c7.b7.cf.27 X-Server-Date: 15 Nov 1999 02:35:40 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Did you remember to call allegro_init() and install_keyboard() (in that order) at the start of your program? The Advisor 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 > > >