POV-Ray : Newsgroups : povray.unofficial.patches : Bug in pigment object (Chris Huff's patch) : Re: Bug in pigment object (Chris Huff's patch) Server Time
2 Sep 2024 16:19:06 EDT (-0400)
  Re: Bug in pigment object (Chris Huff's patch)  
From: Thorsten Froehlich
Date: 9 Dec 1999 10:50:09
Message: <384fcfb1@news.povray.org>
In article <chrishuff_99-5D09DB.16383508121999@news.povray.org> , Chris Huff
<chr### [at] yahoocom>  wrote:

> Strange, very strange...those patches only affected the pattern data
> structure, there isn't anything going across renders. The only thing I
> did that might need to be reinitialized for each render would be the
> z-buffer patch, but that definitely shouldn't cause a crash.

Chris, maybe these tips help :-)

Not reproducible crashes, especially on the Mac are most likely caused by
invalid pointers or other out of range addressing. As the Mac OS does not
have full memory protection (yet) these bugs are hard to catch. However,
there are several (free) tricks you can use:
- Use the MacsBug "hs" command to turn on/off heap scrambling.
- When you free memory a pointer points to, set the pointer to NULL.
- Init all pointers and data structures you use to NULL before using them
(even if it looks stupid, i.e. code _should_ always put something into a
pointer).

In general, you should then see either hard crashes (mostly with "hs" on) or
memory access faults when your program tries to write to memory locations
around 0 which are protected by the system. You will also see failing free
calls if the pointers are set to NULL and somewhere code tries to free that
memory again.


        Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.