POV-Ray : Newsgroups : povray.general : POVRay Script Failure (Exit 11) Server Time
18 Nov 2024 09:12:29 EST (-0500)
  POVRay Script Failure (Exit 11) (Message 1 to 6 of 6)  
From: Simon Andrews
Subject: POVRay Script Failure (Exit 11)
Date: 10 Sep 2002 10:40:30
Message: <3D7E045E.54CEE665@bbsrc.ac.uk>
Hi there,

I'm trying to write a wrapper script around PovRay 3.5 (Linux) to allow
the automatic generation of images from a web page.  I now have the
whole thing working so that I can run it from the command line and
everything runs fine.  
Unfortunately, when I run the same thing from a web server I get
nothing.  Absolutely nothing.  No errors, no output, no indication that
anything happened.

The bit of (Perl) code I'm working with is:


if (system("/usr/local/bin/povray +V +Iinput.pov +FP -D +W640 +H480")){

  die "POV-Ray failed to execute with exit $?";

}


..and this produces only 

"POV-Ray failed to execute with exit 11 at /home/andrewss/bin/animate
line 26."

..no error message, just an exit status 11, which I can't find
documented in the help.

If I run the same thing without any command line switches I get the
standard POV-Ray help put to STDERR, but a sucessful exit status (!), so
it must be something to do with how the command line is constructed.

Usually these sort of scripts fail because the webserver environment is
different to that of a normal user, but until I know what POV-Ray is
failing to find I'm at a loss as to how to diagnose this.

Does anyone have any clues as to where to go to next??

Thanks for any help

Simon.


Post a reply to this message

From: Christoph Hormann
Subject: Re: POVRay Script Failure (Exit 11)
Date: 10 Sep 2002 10:51:40
Message: <3D7E06F6.E16CD98F@gmx.de>
Simon Andrews wrote:
> 
> [...]
> 
> The bit of (Perl) code I'm working with is:
> 
> if (system("/usr/local/bin/povray +V +Iinput.pov +FP -D +W640 +H480")){
> 
>   die "POV-Ray failed to execute with exit $?";
> 
> }
> 
> ..and this produces only
> 
> "POV-Ray failed to execute with exit 11 at /home/andrewss/bin/animate
> line 26."
> 
> ..no error message, just an exit status 11, which I can't find
> documented in the help.

That's obviously a problem of your script and not of POV-Ray.  You can add
'+gafile.txt as an option to generate a text file with all the text output
from POV-Ray.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Simon Andrews
Subject: Re: POVRay Script Failure (Exit 11)
Date: 10 Sep 2002 11:54:26
Message: <3D7E15B2.BC810596@bbsrc.ac.uk>
> Simon Andrews wrote:
> >
> > [...]
> >
> > The bit of (Perl) code I'm working with is:
> >
> > if (system("/usr/local/bin/povray +V +Iinput.pov +FP -D +W640 +H480")){
> >
> >   die "POV-Ray failed to execute with exit $?";
> >
> > }
> >
> > ..and this produces only
> >
> > "POV-Ray failed to execute with exit 11 at /home/andrewss/bin/animate
> > line 26."
> >
> > ..no error message, just an exit status 11, which I can't find
> > documented in the help.
>
> Christoph Hormann wrote:
> 
> That's obviously a problem of your script and not of POV-Ray.  You can add
> '+gafile.txt as an option to generate a text file with all the text output
> from POV-Ray.
>

Cheers for the reply and suggestion, but I'm afraid adding that switch
(which I had also tried) didn't help any.  The problem isn't with the
script per-se, as I can run the same script from a shell and it all goes
OK.  It's only when the script is called from the environment of a web
server that it falls over (quietly!).

Actually a bit more playing has located a work-round, and I don't think
the original problem was my fault ;-)

What I've found is that povray, when called with *any* command line
switches (including +gafile), will silently die if the DISPLAY
environment variable is not set (which it isn't in a CGI script).  If I
manually set that variable to some arbitrary number (which isn't used),
then povray suddenly bursts back into life, and does all of its
processing as expected.  Interestingly povray will work without this
variable if you don't call it with any switches at all.

Is this behaviour documented?  Is there a good reason for it that I'm
missing? I can't see any need for POV-ray to always have the DISPLAY
variable set, as it can be very useful without it.  Since I was running
POV with the -D flag set (ie no display), I can't see why it would be
required.

Since I've got a work-round for now I'm happy, but this still has the
vague whiff of a bug.  At least an error message warning that DISPLAY
was not set would have been nice to help track down the problem.

	Cheers

	Simon (who's off to play with his auto-generated animations!!)


Post a reply to this message

From: Christoph Hormann
Subject: Re: POVRay Script Failure (Exit 11)
Date: 10 Sep 2002 11:58:30
Message: <3D7E16A4.5FD6DF35@gmx.de>
Simon Andrews wrote:
> 
> [...]
> 
> What I've found is that povray, when called with *any* command line
> switches (including +gafile), will silently die if the DISPLAY
> environment variable is not set (which it isn't in a CGI script).  If I
> manually set that variable to some arbitrary number (which isn't used),
> then povray suddenly bursts back into life, and does all of its
> processing as expected.  Interestingly povray will work without this
> variable if you don't call it with any switches at all.
> 
> Is this behaviour documented?  Is there a good reason for it that I'm
> missing? I can't see any need for POV-ray to always have the DISPLAY
> variable set, as it can be very useful without it.  Since I was running
> POV with the -D flag set (ie no display), I can't see why it would be
> required.

Have you tried compining POV-Ray without X support ('#define
X_DISPLAY_MISSING 1' in 'conf.h')?

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: POVRay Script Failure (Exit 11)
Date: 10 Sep 2002 12:09:33
Message: <3d7e193d@news.povray.org>
In article <3D7E15B2.BC810596@bbsrc.ac.uk> , Simon Andrews 
<sim### [at] bbsrcacuk>  wrote:

> What I've found is that povray, when called with *any* command line
> switches (including +gafile), will silently die if the DISPLAY
> environment variable is not set (which it isn't in a CGI script).  If I
> manually set that variable to some arbitrary number (which isn't used),
> then povray suddenly bursts back into life, and does all of its
> processing as expected.  Interestingly povray will work without this
> variable if you don't call it with any switches at all.

Because it supports X?  That is, it cannot know you don't want the preview
until _all_ options have been parsed.  That includes those in INI files,
which could just as well turn preview on also you turned it off on the
command line...

    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

From: emu
Subject: Re: POVRay Script Failure (Exit 11)
Date: 22 Sep 2002 10:30:05
Message: <web.3d8dd2d8c024674383d9545b0@news.povray.org>
Thorsten Froehlich wrote:
>In article <3D7E15B2.BC810596[at]bbsrc.ac.uk> , Simon Andrews
><sim### [at] bbsrcacuk>  wrote:
>
>> What I've found is that povray, when called with *any* command line
>> switches (including +gafile), will silently die if the DISPLAY
>> environment variable is not set (which it isn't in a CGI script).  If I
>> manually set that variable to some arbitrary number (which isn't used),
>> then povray suddenly bursts back into life, and does all of its
>> processing as expected.  Interestingly povray will work without this
>> variable if you don't call it with any switches at all.

I've had the same problem with the linux version of povray 3.5. I either got
exit code 11 or a segmentation fault from povray, when I tried to run it as
a batch-job (executed by the at daemon).
Simply setting the DISPLAY variable to "0:0" (or some other display number)
in the script that runs povray works fine for me. There (usually) is no X
server running on that machine.


Post a reply to this message

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