delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/20/12:50:06

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Strange Allegro related crash
Date: 20 May 1997 05:32:57 GMT
Organization: The National Capital FreeNet
Lines: 38
Message-ID: <5lrd29$p5b@freenet-news.carleton.ca>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet2.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp



My project implements a double-buffer, using two pages of a three page
Mode X screen for page flipping and the third stores a background image
(so the parallaxing can be done mostly with fast latch-register blits).

After a recent recompile that did not change any sprite code or clipping
code, something weird began happening. When the game runs, black dots
flicker on and off in odd patterns marching down the screen twice, then
they start devouring the background, after which a GPF happens. I have
managed to determine that, behind the scenes, what happens is something is
scribbling zeros into video RAM, starting at the top and trashing the
first, then the second buffer, then the background (hence the background
gets "eaten", and then the other "invisible" 256K of my video RAM, and
then it hits something more sensitive than video RAM and causes a segfault.

So, what could be doing this? I could not find anything in my code that
could be putting zeros in individual pixels this way. I don't do any
putpixels, just assorted sprite operations, clipped mostly, and a few
blits, and a couple of compiled sprite (unclipped) draws but I
doublechecked none of those goes out of bounds. I can only guess an
Allegro bug... much as I hate to have to point the finger at someone
else's code.

I did wonder if I might have twiddled a timer routine and ended up writing
data to a non-locked variable, but I couldn't find any bug like this.
I seem to have a very diabolical Heisenbug. Maybe a Mandelbug. I can't
find any dangling pointers... the only pointers I keep are to the various
sub bitmaps of screen, that are anywhere near video RAM, and these are all
correct, and aren't changed once create_sub_bitmap sets them.


--
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019