POV-Ray : Newsgroups : povray.general : Is this a bug? Server Time
25 Nov 2024 06:25:30 EST (-0500)
  Is this a bug? (Message 1 to 10 of 41)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Ger
Subject: Is this a bug?
Date: 17 Jan 2016 14:43:05
Message: <569beec9$1@news.povray.org>
or am I just plain dense

Consider the following piece of code
Including a datafile in the main body works, but
including it inside a #macro results in an error
at random frames in the animation. It can be at
frame 10 or at frame 500.
Content of data.inc looks like this

#declare CFS[0] = <45.139115, 100.000000, 18.290612>;
.
.
#declare CFS[49] = <44.641327, 100.000000, 17.771019>;

// CODE

#version 3.7;

#declare CenterOfMass = yes;
#declare COMF = 50;
#declare StartLookAt = <0, 80, 0>;
#declare CFS = array[COMF];
#declare LookAt =  <500, 100, 0>;
#declare CenterOfMassLookAt =  <0, 0, 0>;


#macro WriteCOMFile()

  #fopen filehandle "data/data.inc" write
  #for(Count, 0, COMF-1, 1)
    #write(filehandle, "#declare CFS[",str(Count,0,0),"] = <", vstr(3, 
CFS[Count], ", ", -1,-1),">;\n")
  #end
  #fclose filehandle
#end

#macro InitCenterOfMass()
  #for(Count,0, COMF-1, 1)
    #declare CFS[Count] = StartLookAt;
  #end
  WriteCOMFile()
#end

#macro ParseCenterOfMass(NewCenter)

// Including the data file here works sometimes

//#include "data/data.inc"

  #for(Count, COMF-1, 1, -1)
    #declare CFS[Count] = CFS[Count-1];
  #end
  #declare CFS[0] = NewCenter;
  WriteCOMFile()
  #local COMLookAt = <0, 0, 0>;
  #declare Count = 0;
  #for(Count, 0, COMF-1, 1)
    #local COMLookAt = COMLookAt + CFS[Count];
  #end
  #local COMLookAt = COMLookAt / COMF;
  #declare CenterOfMassLookAt =  COMLookAt;
#end

#if(frame_number=0)
    InitCenterOfMass()
#end


#declare CameraLocation = < 900, 800,-2900>;
#declare Direction = 1;


// Including the data file here works all the time
#include "data/data.inc"



#if(frame_number=1)
  #declare LookAt =  ParseCenterOfMass(StartLookAt);
#else
  ParseCenterOfMass(LookAt)
  #declare LookAt = CenterOfMassLookAt;
#end
#declare Direction = vlength(CameraLocation-LookAt)/2000;

  camera {
    location CameraLocation
    look_at LookAt
    direction z * Direction
    right image_width / image_height * x
  }

-- 

Ger


Post a reply to this message

From: clipka
Subject: Re: Is this a bug?
Date: 17 Jan 2016 16:46:21
Message: <569c0bad$1@news.povray.org>
Am 17.01.2016 um 20:43 schrieb Ger:

> Consider the following piece of code
> Including a datafile in the main body works, but
> including it inside a #macro results in an error
> at random frames in the animation. It can be at
> frame 10 or at frame 500.

It certainly isn't intended behaviour, otherwise it would give you an
error all the time ;)

Can you be more specific about the error message you get? Version and
operating system might also play a role.


Post a reply to this message

From: Ger
Subject: Re: Is this a bug?
Date: 17 Jan 2016 16:55:50
Message: <569c0de6$1@news.povray.org>
clipka wrote:

> Am 17.01.2016 um 20:43 schrieb Ger:
> 
>> Consider the following piece of code
>> Including a datafile in the main body works, but
>> including it inside a #macro results in an error
>> at random frames in the animation. It can be at
>> frame 10 or at frame 500.
> 
> It certainly isn't intended behaviour, otherwise it would give you an
> error all the time ;)
> 
> Can you be more specific about the error message you get? Version and
> operating system might also play a role.

Povray V3.7 running on  Opensuse 13.2

Error message is all over the field and makes zero sense to me.
Error at line 249 (or any other bizarre line number, file only has 51 lines) 
in data.inc. Expected {fill in whatever }, found {fill in whatever} instead
Or it stops with a "mismatched #end"

I have ran it with array sizes from only 5 lines to 15K lines and that 
doesn't make a difference in either error message or frame number when it 
crashes.

-- 

Ger


Post a reply to this message

From: clipka
Subject: Re: Is this a bug?
Date: 17 Jan 2016 17:28:51
Message: <569c15a3$1@news.povray.org>
Am 17.01.2016 um 22:55 schrieb Ger:
> clipka wrote:
> 
>> Am 17.01.2016 um 20:43 schrieb Ger:
>>
>>> Consider the following piece of code
>>> Including a datafile in the main body works, but
>>> including it inside a #macro results in an error
>>> at random frames in the animation. It can be at
>>> frame 10 or at frame 500.
>>
>> It certainly isn't intended behaviour, otherwise it would give you an
>> error all the time ;)
>>
>> Can you be more specific about the error message you get? Version and
>> operating system might also play a role.
> 
> Povray V3.7 running on  Opensuse 13.2

Um... /what/ version of POV-Ray 3.7? 3.7.0 stable? 3.7.1-alpha.7678995?
3.7.1-alpha.8433080?

Did you build it yourself, or did you get it as binary via some package
manager?

> Error message is all over the field and makes zero sense to me.
> Error at line 249 (or any other bizarre line number, file only has 51 lines) 
> in data.inc. Expected {fill in whatever }, found {fill in whatever} instead
> Or it stops with a "mismatched #end"

That /certainly/ is a bug, though I have no initial idea what might be
going wrong there.

> I have ran it with array sizes from only 5 lines to 15K lines and that 
> doesn't make a difference in either error message or frame number when it 
> crashes.

Can you provide me with a complete scene file (attachment please;
pasting into a newsgroup post tends to break things due to line wrapping
and the like)?


Post a reply to this message

From: Ger
Subject: Re: Is this a bug?
Date: 17 Jan 2016 17:43:32
Message: <569c1914$1@news.povray.org>
clipka wrote:

> Am 17.01.2016 um 22:55 schrieb Ger:
>> clipka wrote:
>> 
>>> Am 17.01.2016 um 20:43 schrieb Ger:
>>>
>>>> Consider the following piece of code
>>>> Including a datafile in the main body works, but
>>>> including it inside a #macro results in an error
>>>> at random frames in the animation. It can be at
>>>> frame 10 or at frame 500.
>>>
>>> It certainly isn't intended behaviour, otherwise it would give you an
>>> error all the time ;)
>>>
>>> Can you be more specific about the error message you get? Version and
>>> operating system might also play a role.
>> 
>> Povray V3.7 running on  Opensuse 13.2
> 
> Um... /what/ version of POV-Ray 3.7? 3.7.0 stable? 3.7.1-alpha.7678995?
> 3.7.1-alpha.8433080?
> 
> Did you build it yourself, or did you get it as binary via some package
> manager?
> 
>> Error message is all over the field and makes zero sense to me.
>> Error at line 249 (or any other bizarre line number, file only has 51
>> lines) in data.inc. Expected {fill in whatever }, found {fill in whatever}
>> instead Or it stops with a "mismatched #end"
> 
> That /certainly/ is a bug, though I have no initial idea what might be
> going wrong there.
> 
>> I have ran it with array sizes from only 5 lines to 15K lines and that
>> doesn't make a difference in either error message or frame number when it
>> crashes.
> 
> Can you provide me with a complete scene file (attachment please;
> pasting into a newsgroup post tends to break things due to line wrapping
> and the like)?
Persistence of Vision(tm) Ray Tracer Version 3.7.1-alpha.7695039.unofficial 
(g++
 4.8 @ x86_64-suse-linux-gnu)
This is an unofficial version compiled by:
 Pietje Puk <p.p### [at] gmailcom>
 The POV-Ray Team is not responsible for supporting this version.


Support libraries used by POV-Ray:
  ZLib 1.2.8, Copyright 1995-2012 Jean-loup Gailly and Mark Adler
  LibPNG 1.6.13, Copyright 1998-2012 Glenn Randers-Pehrson
  LibJPEG 80, Copyright 1991-2013 Thomas G. Lane, Guido Vollbeding
  LibTIFF 4.0.4, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
  Boost 1.54, http://www.boost.org/
  OpenEXR, Copyright (c) 2004-2007, Industrial Light & Magic.



2 files attached

As I was typing this reply the next error message come up

File 'data.inc' line 169: Parse Error: Expected 'object or directive', ] 
found
 instead
Fatal error in parser: Cannot parse input.
Render failed

There is no line 169
-- 

Ger


Post a reply to this message


Attachments:
Download 'us-ascii' (6 KB) Download 'us-ascii' (1 KB)

From: clipka
Subject: Re: Is this a bug?
Date: 18 Jan 2016 00:27:50
Message: <569c77d6$1@news.povray.org>
Am 17.01.2016 um 23:43 schrieb Ger:

> Persistence of Vision(tm) Ray Tracer Version 3.7.1-alpha.7695039.unofficial 

Uh... that's 17 months old. Ever thought of trying a newer version?

> (g++
>  4.8 @ x86_64-suse-linux-gnu)
> This is an unofficial version compiled by:
>  Pietje Puk <p.p### [at] gmailcom>
>  The POV-Ray Team is not responsible for supporting this version.

I take it "Pietje Puk" is not the real name of whoever built the binary
-- which in turn leads me to presume that you built it yourself.


Post a reply to this message

From: Ger
Subject: Re: Is this a bug?
Date: 18 Jan 2016 02:03:56
Message: <569c8e5c@news.povray.org>
clipka wrote:

> Am 17.01.2016 um 23:43 schrieb Ger:
> 
>> Persistence of Vision(tm) Ray Tracer Version
>> 3.7.1-alpha.7695039.unofficial
> 
> Uh... that's 17 months old. Ever thought of trying a newer version?

I have thought of it, but somehow never got around to it.

Okay, got the latest? stable version
built it, and guess what. It doesn't accept the -CC option
Ran the render with the #include data.inc inside the macro  and it did the 
same thing.
Random errors on non-existing line numbers.
> 
>> (g++
>>  4.8 @ x86_64-suse-linux-gnu)
>> This is an unofficial version compiled by:
>>  Pietje Puk <p.p### [at] gmailcom>
>>  The POV-Ray Team is not responsible for supporting this version.
> 
> I take it "Pietje Puk" is not the real name of whoever built the binary
> -- which in turn leads me to presume that you built it yourself.

It's the first version with the -CC option (no povstatefile) that I 
requested.



-- 

Ger


Post a reply to this message

From: Ger
Subject: Re: Is this a bug?
Date: 18 Jan 2016 02:08:02
Message: <569c8f52$1@news.povray.org>
Ger wrote:

Forgot the version info

Persistence of Vision(tm) Ray Tracer Version 3.7.0.unofficial (g++ 4.8 @
 x86_64-unknown-linux-gnu)
This is an unofficial version compiled by:
 Pietje Puk <p.p### [at] gmailcom>
 The POV-Ray Team is not responsible for supporting this version.

Support libraries used by POV-Ray:
  ZLib 1.2.8, Copyright 1995-2012 Jean-loup Gailly and Mark Adler
  LibPNG 1.6.13, Copyright 1998-2012 Glenn Randers-Pehrson
  LibJPEG 80, Copyright 1991-2013 Thomas G. Lane, Guido Vollbeding
  LibTIFF 4.0.4, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
  Boost 1.54, http://www.boost.org/
  OpenEXR, Copyright (c) 2004-2007, Industrial Light & Magic.


Btw, Pietje Puk is my alter ego :)
-- 

Ger


Post a reply to this message

From: Ger
Subject: Re: Is this a bug?
Date: 18 Jan 2016 02:27:23
Message: <569c93db@news.povray.org>
Ger wrote:

> Ger wrote:
> 
> Forgot the version info
> 
> Persistence of Vision(tm) Ray Tracer Version 3.7.0.unofficial (g++ 4.8 @
>  x86_64-unknown-linux-gnu)
> This is an unofficial version compiled by:
>  Pietje Puk <p.p### [at] gmailcom>
>  The POV-Ray Team is not responsible for supporting this version.
> 
> Support libraries used by POV-Ray:
>   ZLib 1.2.8, Copyright 1995-2012 Jean-loup Gailly and Mark Adler
>   LibPNG 1.6.13, Copyright 1998-2012 Glenn Randers-Pehrson
>   LibJPEG 80, Copyright 1991-2013 Thomas G. Lane, Guido Vollbeding
>   LibTIFF 4.0.4, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
>   Boost 1.54, http://www.boost.org/
>   OpenEXR, Copyright (c) 2004-2007, Industrial Light & Magic.
> 
> 
> Btw, Pietje Puk is my alter ego :)

Got the latest? Master
Persistence of Vision(tm) Ray Tracer Version 3.7.1-alpha.8431458.unofficial 
(g++
 4.8 @ x86_64-suse-linux-gnu)
This is an unofficial version compiled by:
 Pietje Puk <p.p### [at] gmailcom>
 The POV-Ray Team is not responsible for supporting this version.

Support libraries used by POV-Ray:
  ZLib 1.2.8, Copyright 1995-2012 Jean-loup Gailly and Mark Adler
  LibPNG 1.6.13, Copyright 1998-2012 Glenn Randers-Pehrson
  LibJPEG 80, Copyright 1991-2013 Thomas G. Lane, Guido Vollbeding
  LibTIFF 4.0.4, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
  Boost 1.54, http://www.boost.org/
  OpenEXR 2.2.0 and IlmBase 2.2.0, Copyright (c) 2002-2011 Industrial Light &
 Magic.

Same deal, but this one does support -CC

-- 

Ger


Post a reply to this message

From: dick balaska
Subject: Re: Is this a bug?
Date: 18 Jan 2016 02:40:56
Message: <569c9708$1@news.povray.org>
On 1/17/2016 5:43 PM, Ger wrote:

> As I was typing this reply the next error message come up
>
> File 'data.inc' line 169: Parse Error: Expected 'object or directive', ]
> found
>   instead
> Fatal error in parser: Cannot parse input.
> Render failed
>
> There is no line 169
>

I ran your render and only got to frame 21:

"data.inc" line 218: Parse Error: Illegal character in input file, value 
is 85.

(I had to change #if (frame_number=0) to =1 to seed data.inc)

It smells like a bizarre race condition to me.  How about trying 
separate data files per frame?
#include concat("data", str(frame_number,0,0), ".inc")


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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