Message-ID: <34710E73.256EF09@itsnet.com> Date: Mon, 17 Nov 1997 20:41:40 -0700 From: Dave Gileadi Organization: Editing Etc. MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Need help--too many SIGSERV errors! Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 91-26.dialup.itsnet.com Lines: 42 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi, I have a couple questions... I'm doing graphics coding in DJGPP, running under win95, using Allegro (I love it) and quite a few of my own routines, and I am getting some errors... First, when I run my program from RHIDE, it works fine (well, it mostly does), but for a while now when I run it alone it crashes during initialization with the famous SIGSERV. Any ideas why this is happening? Also, my latest and toughest one: I am trying to implement an s-buffer, and I have programmed a "linked tree" (a binary tree that also works as a linked list), and it uses structures that are provided by a "generator" that mallocs a whole bunch of memory and then gives out structures as needed. All fine and good, I tested them, they work. Now the problem: when I try running through the list in my s-buffer's code (just a loop that will eventually draw it all to the screen but for now just looks at the structures in the list), it jumps out at me with yet another...yep, you guessed it: SIGSERV error. It hits the error when I try to access (by pointer) one of the structures in the list given me by the aforementioned generator. Interesting fact: every once in a while it will actually run the code without error. Go figure. I've added elaborate error checking for the malloc, the linked tree, etc, so I know they are doing their job right. Some guesses as to what might be causing the problem: I use a lot of seperate .h files, and they might be doing something? Also, the declaration of the s-buffer and the generator are in one of my .cc files, NOT in the main .cc file. Who knows? I am not too familiar with 32 bit programming, and with memory management in general, and I use a lot of pointers (sound dangerous to you?), so I'm probably just making a stupid error somewhere... If you can help at all, I would really appreciate it. Thanks in advance for any and all help, -Dave