POV-Ray : Newsgroups : povray.unofficial.patches : Fix coredumps with pvmpov 3.5 : Fix coredumps with pvmpov 3.5 Server Time
1 Jun 2024 00:01:46 EDT (-0400)
  Fix coredumps with pvmpov 3.5  
From: Rocco Rutte
Date: 24 Sep 2004 11:55:31
Message: <20040924155226.GA7395@peter.daprodeges.fqdn.th-h.de>
Hi,

since pvmpov still is version 3.1g from a FreeBSD port, I self-compiled
pvmpov 3.5. Unfortunately, this dumps core on my slave(s). I searched
for the reason and it turned out that the error occurs while trying to
init the display (which I thought I turned off by using -D on the
command line and Display=Off in global povray.ini).

The reason seems to be that ttyname(0) in unix.cpp's SVGAMode() returns
a NULL pointer (on FreeBSD 4.10-RELEASE-p3) which makes strstr() fail.
The attached patch checks for that so that I don't get coredumps anymore
and it works... ;-)

--- unix.cpp.orig	Fri Sep 24 15:40:44 2004
+++ unix.cpp	Fri Sep 24 15:33:02 2004
@@ -1838,7 +1838,7 @@
       return (false);
     }
   /* if this isn't actually a TTY, no need for SVGA */
-  if (!strstr(ttyname(0), "tty")) 
+  if (ttyname(0) != NULL && !strstr(ttyname(0), "tty")) 
     {
       return (false);
     } 

HTH & HAND,
  bye, Rocco
-- 
:wq!


Post a reply to this message

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