POV-Ray : Newsgroups : povray.beta-test : Confusing Error message Server Time
31 Oct 2024 19:30:31 EDT (-0400)
  Confusing Error message (Message 1 to 5 of 5)  
From: zeroin23
Subject: Confusing Error message
Date: 14 Oct 2007 23:25:00
Message: <web.4712dd2c1ce7b43c8669ea3c0@news.povray.org>
Attached below is the output

firstly, there are no issue with the ini file as it works when I corrected
the error that I made. The error of misquoted string set me on a wild goose
chase.

"Possible Parse Error: Degenerate cylinder, base point = apex point." was
not helpful in debugging generated codes using #while loops.
I think it would be more useful if, the <x,y,z> was provided. it took me a
few hours to troubleshoot this as I am sure syntaxically I was correct. it
was frustrating as the original sphere codes worked, while the modification
didnt.


3kin_main.ini
-------------
Width=640
Height=480
Initial_Frame=1
Final_Frame=10000
Display=off
Output_File_Type=N
;Antialias=on   <<==== Line highlighted by povray as error
Subset_Start_Frame=1  ;Set subset starting frame to n
;Subset_Start_Frame=0.n ;Set subset starting frame to n percent
Subset_End_Frame=1 ;Set subset ending frame to n
;Subset_End_Frame=0.n ;Set subset ending frame to n percent
Initial_Clock=0.0 ;Sets initial clock value to n.n
Final_Clock=1.0 ;Sets final clock value to n.n
;Cyclic_Animation=on
;Statistic_File=true  ;Echo statistic text to STATS.OUT
Input_File_Name=3kin_Main.pov
-------------

3kin_camera.inc
--------------
#declare camLocation=spline{
linear_spline
....
0.9957983193277289,<9.493,44.244,96.334>}
light_source{camLocation(0.0) color <1,1,1>}
light_source{camLocation(0.9957983193277289) color <1,1,1>}
#include "transforms.inc"
#declare cx=0.0;
#while(cx<1)
cylinder {camLocation(cx),camLocation(cx+0.0005),0.5 pigment{rgbf
<1,0,0,0.5>}}
#declare cx=cx+0.0005;
#end
-------------

Preset INI file is 'C:SVNFYPGENCAMERAPOSVIEWBUILDCLASSES3KIN_MAIN.INI'.
Preset source file is 'C:SVNfypgenCameraPosViewbuildclasses3kin_camera.inc'.
Rendering with 2 threads.
-
Most likely detected an unquoted string with spaces in INI file. Assuming
string ends at the of the line.
Make sure all strings with spaces are properly quoted in the INI file.
Use either " or ' to quote strings. For details, please check the user
manual!
Parser Options
  Input file: C:SVNfypgenCameraPosViewbuildclasses3kin_camera.inc
  Remove bounds........On
  Split unions.........Off
  Library paths:
    C:pv3.6INCLUDE
    C:WINDOWSFonts
    C:PV3.6include
    C:WINDOWSFonts
Parse Warning: This rendering uses the following experimental feature(s):
spline. The design and implementation of these features is likely
to change in future versions of POV-Ray. Full backward compatibility with
the current implementation is NOT guaranteed.

Parser Statistics

Finite Objects:         1984
Infinite Objects:          0
Light Sources:             2
Total:                  1986

Parser Time
  Parse Time:       0 hours  0 minutes  0 seconds (0.000 seconds)
              using 1 thread(s) with 0.109 CPU-seconds total
  Bounding Time:    0 hours  0 minutes  0 seconds (0.015 seconds)
              using 1 thread(s) with 0.015 CPU-seconds total

Render Options
  Quality:  9
  Bounding boxes.......On   Bounding threshold: 3
  Antialiasing.........Off

Render Statistics
Image Resolution 640 x 480

Pixels:           307200   Samples:               0   Smpls/Pxl: 0.00
Rays:             374109   Saved:              1247   Max Level: 1/5

Ray->Shape Intersection          Tests       Succeeded  Percentage

Cone/Cylinder                   929683          360618     38.79
Bounding Box                  11094807         4175113     37.63

Shadow Ray Tests:            184589   Succeeded:                140654
Transmitted Rays:             66909

Smallest Alloc:                   4 bytes
Largest  Alloc:              262144 bytes
Total Alloc calls:             7445         Free calls:           7381
Peak memory used:           2583150 bytes

Render Time:
  Photon Time:      No photons
  Radiosity Time:   No radiosity
  Trace Time:       0 hours  0 minutes  1 seconds (1.781 seconds)
              using 2 thread(s) with 3.046 CPU-seconds total
POV-Ray finished
-
CPU time used: kernel 0.33 seconds, user 3.48 seconds, total 3.81 seconds.
Elapsed time 2.27 seconds, CPU vs elapsed time ratio 1.68.
----------------------------------------------------------------------------
Preset INI file is 'C:SVNFYPGENCAMERAPOSVIEWBUILDCLASSES3KIN_MAIN.INI'.
Preset source file is 'C:SVNfypgenCameraPosViewbuildclasses3kin_camera.inc'.
Rendering with 2 threads.
-
Most likely detected an unquoted string with spaces in INI file. Assuming
string ends at the of the line.
Make sure all strings with spaces are properly quoted in the INI file.
Use either " or ' to quote strings. For details, please check the user
manual!
Parser Options
  Input file: C:SVNfypgenCameraPosViewbuildclasses3kin_camera.inc
  Remove bounds........On
  Split unions.........Off
  Library paths:
    C:pv3.6INCLUDE
    C:WINDOWSFonts
    C:PV3.6include
    C:WINDOWSFonts
Possible Parse Error: Degenerate cylinder, base point = apex point.
File 'C:SVNfypgenCameraPosViewbuildclasses3kin_camera.inc' line 246:
Possible Parse Error: Degenerate cylinder, base point = apex
point.
Fatal error in parser: Uncategorized error.
Render failed
-
CPU time used: kernel 0.13 seconds, user 0.11 seconds, total 0.23 seconds.
Elapsed time 0.28 seconds.
----------------------------------------------------------------------------


Post a reply to this message

From: Warp
Subject: Re: Confusing Error message
Date: 15 Oct 2007 07:00:28
Message: <4713484b@news.povray.org>
zeroin23 <zer### [at] gmailcom> wrote:
> "Possible Parse Error: Degenerate cylinder, base point = apex point."

  I agree that that message could have more info in it.

  I suppose that the message (or at least its idea) is "inherited" from the
days when there were no #while loops. In that case just seeing the line
where the error happened was enough because the line was interpreted just
once and that's it. Thus it was the exact unique spot where the error is.

  However, nowadays since the same line can be interpreted several times
if it's eg. inside a #while loop, knowing the only line number may not be
enough know what the problem is.

  Perhaps the message could indeed also tell what is the exact point
which is being equal. It might also perhaps tell how many objects have
already been successfully created (this could help track down how many
loops have been executed until the error happened).

  I wonder how hard would it be to add some kind of error/warning catching.
In other words, when an error or warning happens, some SDL code is executed.
(Then you could write there eg. #debug commands which output values of loop
variables, etc. This would help a lot debugging.)

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Confusing Error message
Date: 15 Oct 2007 07:24:40
Message: <47134df8@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   I wonder how hard would it be to add some kind of error/warning catching.
> In other words, when an error or warning happens, some SDL code is executed.
> (Then you could write there eg. #debug commands which output values of loop
> variables, etc. This would help a lot debugging.)

  This could perhaps be one possibility:

#macro MyMacro()
  #debug concat(str(Index, 0, 0), "\n")
#end

#onerror MyMacro

#declare Index = 0;
#while(Index < 1000)
  cylinder { something } // The error happens in this line
  #declare Index = Index+1;
#end

-- 
                                                          - Warp


Post a reply to this message

From: zeroin23
Subject: Re: Confusing Error message
Date: 19 Oct 2007 04:50:01
Message: <web.47186ebc79f631f0f16edaaa0@news.povray.org>
#onerror

is not available yet right?

yup I agree that would be helpful. Additional, like firebug, maybe able to
see the stack of variables created and their value will be very powerful.

8)


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Confusing Error message
Date: 22 Oct 2007 19:10:56
Message: <471d2e00@news.povray.org>

>   I wonder how hard would it be to add some kind of error/warning catching.
> In other words, when an error or warning happens, some SDL code is executed.
> (Then you could write there eg. #debug commands which output values of loop
> variables, etc. This would help a lot debugging.)
> 

Exception "try/catch"ing! <3


Post a reply to this message

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