POV-Ray

The Persistence of Vision Raytracer (POV-Ray).

This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.

IDCategoryTask TypeReported InPrioritySeveritySummaryStatusProgress  descDue In Version
 274 Subsurface ScatteringDefinite Bug3.70 RC7Very LowLow light source fading doesn't work properly with area_ill ...Closed
100%
3.70 release Task Description

When using fade_distance and fade_power in combination with area_illumination, the light source fading is not applied to materials with subsurface scattering; see the following code for an example:


#version 3.7;
global_settings {
  assumed_gamma 1.0
  mm_per_unit 10
  subsurface { samples 200,20 }
}

camera {
  right x*image_width/image_height
  angle 30
  location  <0,1.5,-4>
  look_at   <0,0,0>
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

plane {
  y, 0
  texture {
    pigment {
      checker
      color rgb <1.0, 0.8, 0.6>
      color rgb <1.0, 0.0, 0.0>
      scale 0.5
    }
  }
}

light_source {
  <50,50,50>
  color rgb 30
  area_light 5*x,5*y,17,17 adaptive 1 jitter circular orient
  area_illumination on
  fade_distance 10
  fade_power 2
}

cylinder {
  <0,0,0>, <0,0.2,0> 1
  texture {
    pigment { color rgb 1 }
    finish {
      ambient 0
      diffuse 0.7
      specular albedo 0.3
      reflection { 0.3 fresnel }
      conserve_energy
      subsurface { translucency 0.1 }
    }
  }
  interior { ior 1.5 }
}

sphere {
  <0,0.4,0>, 0.2
  texture {
    pigment { color rgb <1,0.6,0.0> }
    finish {
      ambient 0
      diffuse 0.0
      specular albedo 0.8 metallic
      reflection { 1.0 metallic }
      conserve_energy
    }
  }
}

 276 Parser/SDLFeature Request3.70 RC7Very LowMedium SDL Access to Spline Derivatives Closed
100%
Task Description

I would like to suggest an additional feature regarding splines. POV-Ray’s spline objects (spline {}) are very useful to create animation paths as a function of time from reference points; however, in many cases you do not only need a position to place an object correctly, but also its velocity etc., e.g. if you are animating a car moving along a spline you do not only need to know where the car is at a given clock value but also in which direction it is going. If you want to rotate the wheels correctly you even need to know how this direction is currently changing.

In a nutshell, if you are using splines to create an animation path, you might not only need the spline value itself, but also the value of its first and second derivative. So I suggest adding an SDL capability to access these values like it is possible to access the spline value for a given parameter.

I do not think it would be too difficult to add a feature like this as far as the backend is concerned, since for computing a (cubic) spline you need the first and second derivatives anyway. (They are probably not being stored separately, but a polynomial is not that hard to differentiate.)

Indeed I do not know how an SDL language construct for it should look like (i.e. whether to use ' and ‘’ like in mathematics or a second spline function parameter).

 277 OtherPossible Bug3.70 RC7Very LowMedium Max Image Buffer Memory Does not Seem to Work Closed
100%
Task Description

In POV-Ray’s documentation it says:

3.2.2.2 Max Image Buffer Memory
This INI parameter sets the number of megabytes of RAM to allow for output image caching. If the output image happens to use more than this, a file backed temporary image is used instead.

I used this INI file option because the default value (128 megabytes) seemed insufficient. pov-state backend files were always created and they were remarkably larger than the resulting image (bmp) files. Consequently, I set

Max_Image_Buffer_Memory = 3096

in the INI file so that POV-Ray should, according to the documentation, now be able to use 3 gigabytes of RAM so no backend temporary file would be needed at all (this large they were never).

However, while POV-Ray was rendering I still discovered a pov-state file and it still had a similar size.

Now I am confused: did the INI option not work or have I misunderstood the documentation? If the former is the case, that would be a bug, wouldn’t it?

I tested both under Windows XP and Debian 6.0.5.

 279 Light sourcePossible Bug3.70 RC7Very LowLow area_illumination causes artifacts when used with radio ...Closed
100%
Task Description

see my post titled: “area light and radiosity problem?” in povray.binary.images [Edit - copied that post’s text here - clipka]

wondering about what’s going on here with this series of images. the radiosity and area light settings are unchanged from image to image, and all I did was radiosity on/off and area_light on/off (btw: using rad_def “Normal” settings)

the 1st image is radiosity only, the 2nd is area light only, and the 3rd combines them:

what’s up with blotches? change #5819/5820 (octree) or maybe something still with area lights?

 280 EditorPossible Bug3.70 RC7Very LowMedium editor issue Closed
100%
Task Description

The following editor issue experienced in 3.7 RC 6 under Win7/64::

Place the curser at the middle of a row.
Press enter. Now the line has been split and the cursor is at the beginning of the new line, followed by the rest of the original line
Press backspace.
Instead of restoring the original line, the second part of the line disappears.

RC 3 under Vista/32 (and earlier versions) behave normally.

 283 OtherDefinite Bug3.70 RC7Very LowHigh Transparent or semi-transparent background color comes  ...Closed
100%
Task Description

When using the ‘background’ directive with a transparent color, for example:

  background { color rgbt <0, 0, 0, 1> }

the final image is still opaque (both the one displayed in the render window and the PNG actually saved to disk).

Expected behaviour is for it to be transparent.

 284 DocumentationDefinite Bug3.70 RC7Very LowLow Add to documentation of "background" command a referenc ...Closed
100%
Task Description

Currently neither of these pages:

  http://www.povray.org/documentation/view/3.7.0/253/
  http://www.povray.org/documentation/view/3.7.0/90/

mention that the background can be transparent. Any normal user will try to give “background { ... }” a transparent color, see that it doesn’t work, and assume that POV-ray can’t do it.

The pages should mention the +UA command-line option, which enables the transparency.

 290 DocumentationPossible Bug3.70 RC7Very LowMedium Windows. Editor context menu opens folder instead of ad ...Closed
100%
Task Description

This is an annoying little bug in the Windows GUI:

Installed 3.7 RC07 on Windows 8.
No previous povray installation on this machine.

How to reproduce error :

- Open a file in the editor.

- Right click on the files tab. This opens a popup menu showing “Open containing folder/Copy file to clipboard/....”.

-Now each selection in this menu does open the containing Folder. I cannot close or run any of the other actions in this menu.

 291 Include filesPossible Bug3.70 RC7Very LowLow Math.inc: error in VDist function Closed
100%
Task Description

Included math.inc into scene and recieved this fatal error from povray:

File '/usr/local/share/povray-3.7/include/math.inc' line 248: Parse Error: Expected 'string expression', float function 'vlength' found instead

Appropriate place in math.inc:

245 > #end
246 >
247 > // Distance between V1 and V2
248 > #macro VDist(V1, V2) vlength(V1 - V2) #end
249 >
250 > // Returns a vector perpendicular to V

Running newly-downloaded/newly-compiled POV-Ray 3.7.0, on Linux x86_64 system

 294 Geometric PrimitivesDefinite Bug3.70 RC7Very LowHigh Thread safety issue in functions using splines. 3.7.0.R ...Closed
100%
3.70 release Task Description

Thread safety issue in functions using splines. 3.7.0.RC7.

First vetting in p.bugreports where several users were able to reproduce the fail on the following systems:

1) Ubuntu 12.1 i7 920 using 3.7.0.RC7
2) Ubuntu 12.04, AMD 2431 CPU, Linux 3.2.0-45 kernel using 3.7.0.RC7 (g++ 4.6 @x86_64-unknown-linux-gnu)
3) POV-Ray 3.7.0.RC7 (icpc 13.1.0 @x86_64-unknown-linux-gnu)

 Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
 uname -or
 2.6.32-279.14.1.el6.x86_64 GNU/Linux
 lsb_release -irc
 Distributor ID: CentOS
 Release:        6.3
 Codename:       Final

4) Confirmed with openSUSE 12.2.
5) Just to add to the system list: with Windows and a core i7 one yields the same result.
6) “Le_Forgeron” ran under Intel Inspector (XE 2013) and provided this feedback :

 ...
  that might be less than 60 seconds, but with Intel Inspector (XE 2013),
 it becomes 42:50 (just 14 data races, oh well, that's just so friendly).
 ID  Type Sources Modules State
 P1  Data race isosurf.cpp; mutex.hpp povray New
 P2  Data race mutex.hpp; povms.cpp povray New
 P3  Data race povray.cpp povray New
 P4  Data race povray.cpp povray New
 P5  Data race mutex.hpp; pov_mem.cpp; splines.cpp povray New
 P6  Data race mutex.hpp; pov_mem.cpp; splines.cpp povray New
 P7  Data race mutex.hpp; pov_mem.cpp; splines.cpp povray New
 P8  Data race recursive_mutex.hpp; scene.cpp; task.cpp; taskqueue.cpp;
 view.cpp povray New
 P9  Data race condition_variable.hpp; vfe.cpp; vfesession.cpp povray New
 P10  Data race condition_variable.hpp; unixconsole.cpp; vfesession.cpp
 povray New
 P11  Data race condition_variable.hpp; unixconsole.cpp; vfesession.cpp
 povray New
 P12  Data race unixconsole.cpp; vfesession.cpp; vfesession.h povray New
 P13  Data race unixconsole.cpp; vfesession.cpp povray New
 P14  Data race [Unknown]; unixconsole.cpp; vfesession.cpp
 libboost_thread.so.1.49.0; povray New
 Numbers 2, 3, 4, 8, 9, 10, 11, 12, 13 & 14 are related to the handling
 of session (and occur once or twice only, excepted #8, four times).
 Number 1 is about isosurface (adjusting gradient at isosurf.cpp:1099 vs
 1098 (testing its value), and copying the isosurface) (IMHO, rendering
 threads updating the object... not the best move without some
 atomic/protection (and not sure a DBL is/can be atomic)) (occurs 2505
 times).
 Number 5, 6 and 7 are about splines
 * sp->Cache_Type & Cache_Point, splines.cpp :803 vs :814/815 (2024 times)
 * sp->Cache_Valid, :805 vs :813 vs :904 (1770 times)
 * sp->Cache_Data, :807 vs :903 (5025 times)
 Only my 0.02¢ (yes, very cheap), but it seems to confirm

For test code see attached files or SplineThreadSafety.pov attachment to
p.bugreports and images were posted to p.b.images.

Issue shows up any time more than one thread is used. Use of AA tends to hide
the problem so do not use it if using the output image for testing.

Thanks.
Bill P.

 297 OtherFeature Request3.70 RC7Very LowLow Have a user-definable epsilon Closed
100%
Task Description

There are times when scaling an entire scene up or down is difficult or just not feasible.

One suggestion is a global_settings option.

Also, I’ve noticed that in some situations, such as interactions between certain transparent objects, the epsilon seems to kick in quite early. Perhaps there could be situational or contextual epsilons, such as the “tolerance” of sphere_sweep or the “accuracy” of isosurface.

 298 Geometric PrimitivesDefinite Bug3.70 RC7Very LowLow the warning for isosurface does not appears as often as ...Closed
100%
Task Description

From synthetic post of Cousin Ricky in p.beta-test, 2013-06-24 circa 3:19 pm (MST)

William F Pokorny anonymous@anonymous.org wrote:
> It seems to be the case the gradient warnings are only generated if the
> isosurface is naked. If it is wrapped in an object as was the case with
> my thread safety example, we get no warnings.

Confirmed. If only I still had the concentration required to investigate
computer code.

#version 3.7;

#ifndef (MG) #declare MG = 40/9; #end
#ifndef (Naked) #declare Naked = no; #end

global_settings
{ assumed_gamma 1
  radiosity {} //force isosurface calculations from all directions
}

light_source { <-3.3125, 7.6250, -5.7374>, rgb 1 }

camera
{ location <0.0000, 1.0000, -5.6713>
  look_at <-0.7969, 1.2000, -0.0598>
  angle 10.7447
}

#include "functions.inc"

#if (Naked)
  isosurface
  { function { f_sphere (x, 0, z, (2660 - 40*y) / 9) }
    contained_by { box { <-80, 31, -24>, <-128, 56, 24> } }
    max_gradient MG
    pigment { rgb <1, 0.75, 0> }
    scale 1/128
    rotate -35 * x
    translate y
  }
#else
  #declare Test = isosurface
  { function { f_sphere (x, 0, z, (2660 - 40*y) / 9) }
    contained_by { box { <-80, 31, -24>, <-128, 56, 24> } }
    max_gradient MG
    pigment { rgb <1, 0.75, 0> }
    scale 1/128
    rotate -35 * x
    translate y
  }
  object { Test }
#end

On the command line, try:

declare=MG=1 declare=Naked=1

and

declare=MG=1 declare=Naked=0

To lose the warning, I had to declare the isosurface. Just wrapping the naked
isosurface in an object{} generated a warning.

Further analysis

isCopy seems to be intended to avoid displaying the same warning over
and over for the same isosurface (as duplicated isosurface indeed are
not copied but reference the same sub-structure).

#declare Ob = isosurface{...}; that’s not a copy
object {Ob ... }
that’s a copy

Previously (3.6.1) the warning was displayed at the destruction of the
isosurface (when the sub-structure was actually referenced by no one else)

if((Stage == STAGE_SHUTDOWN) && (mginfo->refcnt == 0))

In 3.7, isCopy was introduced with change 4707, 16th February 2009,
along with the change introducing means for objects to submit message on
shutdown.
It was reported in windows source with change 4714, 21th February 2009.

If the symptom “isosurface embbeded in object (CSG) does not show the
warning” is correct, it might be a “feature/bug”. The parser copied the
isosurface object and deleted the original before the render started.
When the render ends, it find only copies and because the refcnt is not
used anymore (for that purpose), it miss the last remaining true data to
display.

Instead of isCopy, what about adding in mginfo a boolean
“printed_warning” (actual name should be more appropriate), set to false
on creation, and turn to true on the first call (instead of last for
3.6.1) of the warning displaying function (test for false, set to true
if false) ? (and dropping isCopy in the process)

For instance, i’m afraid the following sequence would fails with current
code:

#declare Foo = isosurface{ ... };
#declare Bar = object { Foo ... };
#undef Foo;

(or any pop of #local context, such as building the isosurface via macro
or loop, or replacing the value of a previous #declare/#local )

 304 Parser/SDLDefinite Bug3.70 RC7Very LowLow #for-loop may fail to perform last iteration Closed
100%
3.70 release Task Description

Using an end value of 1048576 or larger in a #for loop will cause the last iteration to be skipped, as can be demonstrated by the following code:

#declare N = 2000000;
#debug concat(”N = “,str(N, 0,50),”\n”)
#debug concat(”N-5 = “,str(N-5,0,50),”\n\n”)
#for (I, N-5, N, 1)

#debug concat("I   = ",str(I,0,50),"\n")

#end

(The limit was observed with a Win64 build; other builds may exhibit other limits or might even work fine, depending on the floating point engine used.)

As this limit is still far below the numeric precision limit, and a corresponding #while loop works fine with much higher values, this must be considered a bug rather than an inevitable limitation.

The bug can be tracked down to a faulty condition in tokenize.cpp, Parser::Parse_Directive(), CASE(END_TOKEN), case FOR_COND:

    if ( ((Step > 0) && (*CurrentPtr >= End + EPSILON)) ||
         ((Step < 0) && (*CurrentPtr <= End - EPSILON)) )

which should instead be:

    if ( ((Step > 0) && (*CurrentPtr > End + EPSILON)) ||
         ((Step < 0) && (*CurrentPtr < End - EPSILON)) )
 305 Geometric PrimitivesFeature Request3.70 RC7Very LowLow remove maximum component limit for blobs Closed
100%
Task Description

Blobs are currently limited to 1,000,000 components (with each cylindrical component counting as three: one cylinder + two end hemispheres); this limit may have served a historic purpose, but is now entirely arbitrary: The remaining code is limited only by the available RAM and the numeric limits of the int data type. The arbitrary maximum components limit per blob should therefore be removed.

Aside from unnecessarily limiting the power of the blob component, another drawback of the current test is that it is only performed after parsing of all the blob’s components, potentially hours after the limit had actually been reached.

 307 Image formatDefinite Bug3.70 RC7Very LowLow netpbm, ppm, read bug where first data byte CR char Closed
100%
Task Description

I’ve recently been working with the netpbm ppm format and I have hit what I believe to be a bug in the way ppm files are read – very likely a bug in all netpbm formats. I am aware of the long standing povray issue with the netpbm file formats header where the height and width need to be on the same line as the magic number though that is not a requirement of the official format. This bug is different.

Namely in working with a larger number of ppm files I hit cases where a few would fail with the message : “Possible Parse Error: Unexpected EOF in PPM file” though the ppm files are fine. What is happening is that the first byte of data after the line feed (LF) (Ubuntu linux 12.04) happens to have a carriage return (CR) value.

The code which is set up to interpret the netpbm headers is reading a lines with “file→getline (line, 1024);” and this line reading code is pulling in the first byte of data with the CR value as part of the line. When the read by binary data, 8 or 16 bits at a time, starts, the povray read code is offset into the data by one byte too many.

The result from 10,000 meters, if input values were completely random file to file, would be netpbm read fails for size that make no sense in 1/256 files. In practice & depending on data some might never see fails while an unfortunate few might almost always fail.

I’d make some argument any CR following a LF character should not be pulled in as part of the line read even on windows/dos systems where CRLF is the usual line termination order. I think though the real fix is better netpbm header reading code which more strictly breaks apart the header on the first whitespace character doing the last depth break, aware of the file size, so it can decide what portion of any valid sequence of whitespce characters after the decimal depth value is data and not whitespace.

The attached tarball when unpacked has both a passing and failing case. To run “povray fails.pov” or “povray works.pov”. The only difference between the two ppm files if the fails.ppm data is all 0x0D while works.ppm data bytes are all 0x0C. The image rendered is meaningless.

Thanks for your time.
Bill P.

 308 Geometric PrimitivesDefinite Bug3.70 RC7Very LowMedium Heightfield computation from color (not palette) red/gr ...Closed
100%
Task Description

Due to a recent thread in povray.general (7th September 2013), I dive
into the code of height field creation.

There is 2 TODO FIXME in source/backend/support/imageutil.cpp, for
image_height_at() (circa line 512)

The first one is about using the index of palette-image: As far as *257
would indeed perform a better job to cover the full range than *256, it
would break backward compatibility with previous versions of povray (3.6
included) which only promoted the index as the Most significant byte,
keeping the least one at 0.

But on the second one, the new formula is plain wrong: (r*255+g)*255
should be (r*256+g)*255.
In previous versions, r*255 was the Most significant byte, and g*255 was
the least one.
Ergo, the value was r*255*256 + g*255, which can and should be only
factored as (r*256+g)*255;

I know it is damn late in the release schedule, but can that be either
be fixed before final official delivery or a memo added to the release
note that it would be fixed later and backward-bug will not be
maintained for that specific point (using rgb-8 or less bit per
channel-image for height field)

(it was not bugged in 3.6.1 nor before, it’s just that tiny little bit
of 3.7 that would should that bug)

If you look carefully at the attached pictures (povray +I... +H700 +W700 +A0.01) of scene and scene36, there is a significant difference at the top.
With 3.6, it matched exactly (hence the noise on the top pixels row) the view.
With 3.7, it cannot reach the top and leave a white area
(another difference is the slope on the side are also a bit more lower with 3.7, easier to spot when alternating the display of both pictures)

If you want to regenerate hf.png, it was rendered with povray 3.7RC7, +W400 +H400 +A0.01 +Ihf.pov

The white line at the bottom is expected, as the minimal value of the height field is “full green”

 247 OtherFeature Request3.70 RC6Very LowLow Set no_radiosity in Screen_Object() Closed
100%
Future release Task Description

Suggestion:

In file screen.inc, have macro Screen_Object() set no_radiosity on the object.

 249 Parser/SDLDefinite Bug3.70 RC6Very LowLow UTF-8 files with BOM not accepted Closed
100%
3.70 RC7 Task Description

POV-Ray fails to accept UTF-8 encoded files with a leading Byte Order Mark.

According to the code it was intended to recognize a leading BOM (or, more precisely, leading non-ASCII code sequences) and automatically switch to UTF-8, so this must be considered a bug rather than a missing feature.

 250 OtherPossible Bug3.70 RC6Very LowLow ini shell-outs always fail Closed
100%
Task Description

I’ve got an ini file that looks like this:

Post_Frame_Return=U
Post_Frame_Command=notepad.exe

And when I render a scene using that ini file, it renders correctly but then
gives me this error:

Render halted because the post-frame shell-out (’notepad.exe’) requested POV-Ray
to generate a user abort.
Render failed

.....and it doesn’t open notepad.

I’ve unchecked the “Disable Starting Other Programs” and I’ve tried various
variations on what exe to run and whether to do it Pre/Post Frame/Scene, and
nothing has worked.

 253 BackendPossible Bug3.70 RC6Very LowLow Segmentation fault Closed
100%
Task Description

I’ve had a series of what appear to be a hang up’s. They passed parse, reported some stats and issued the Rendering... message and opened the preview window, but never progressed. They continued to accumulate cpu time until I eventually had to kill -9, softer didn’t work.

I’ve been dismissing them up until now wanted to speak up because I finally got this crash:

29623 Segmentation fault

Here’s some observed behaviors:

In my scene I have a Round_Box_Union with /just/ a pigment that rendered fine, but when I added a wood texture from the distribution includes, it hung up after I tried to transform the texture in any way. Tried other distribution textures ... same thing.

I spent time going through different scenarios looking for a common cause (thinking I’m doing something wrong). Eventually I arrived at the point that I killed a hung render, and restarted the same render with no changes. Sometimes it would render, sometimes not ... I finally got the above mentioned Round_Box_Union to behave with a simple reflective texture, and the rounding parameter had to be above 0.1 ... I settled at 0.125. OK by now you’re thinking WTF right?

No more problems until I accidentally (typo) put an additional light_source at the same location as another light_source. It also hung sometimes, and rendered fine sometimes after a kill ... no SDL changes.

Now I can’t tell you exactly what I was doing when the seg fault happened, but I /do/ know I just restarted the render with no changes. I’m starting to think there’s some kind of instability happening here. I realize that I’m probably the only team member spending any real time with the application, so none of you probably haven’t noticed anything suspicious.

Any comments ... ideas ... suggestions?

 254 CameraDefinite Bug3.70 RC6Very LowMedium Mesh_camera type 0 output seems to be incorrect Closed
100%
Task Description

When using mesh_camera type ‘0’

The first line of the mesh output seems to be repeated resulting in incorrect light colour values.

If the first line of the texture is skipped then the values seem to be correct.

 255 CameraDefinite Bug3.70 RC6Very LowMedium Mesh_camera type 0 should compute per vertex or per fac ...Closed
100%
Task Description

The documentation states mesh_camera 0 should produce 1 pixel per index but it currently seems to produce 1 lighting pixel per face.

This output seems fairly meaningless as using this data for vertex colours (presumably the intention for mesh_camera 0) would result in a flat shaded model.

Logically it would make more sense to output 1 pixel per vertex instead of 1 pixel per face. Another solution might 1 pixel per face index (as per documentation) although POV would need to record which indices had already been computed otherwise it could end up duplicating computation.

At the moment I’ve written a code workaround for my exporter which produces a special mesh but this is obviously a much more complex solution to a fairly simple problem.

 257 OtherDefinite Bug3.70 RC6Very LowLow POV-Ray cannot find input file when resuming to render  ...Closed
100%
3.70 RC7 Task Description

How to reproduce:

# An empty directory, an empty source file.
$ mkdir test && cd test && touch test.pov
# Generate the first 24 frames.
$ povray -D +KFF24 +Itest.pov +Otest.png
# Try to generate the 25th frame.
# `25' after `+KFF' can be changed to any integer greater than 24.
$ povray -D +C +KFF25 +Itest.pov +Otest.png

What happens:

==== [Parsing...] ==========================================================
Possible Parse Error: Cannot find file 'test.pov', even after trying to append
 file type extension.
Parse Error: Cannot open input file.
Fatal error in parser: Cannot parse input.
Render failed

OS: Gentoo AMD64 unstable
POV-Ray version: 3.7.0 rc5

 258 EditorDefinite Bug3.70 RC6Very LowLow backspace problem at start of line Closed
100%
3.70 RC7 Task Description

Using POV-Ray 3.7 RC6 64bit for Windows
I have problems in the POV-Ray editor with ‘backspace’:

When using backspace at start of line
it does not only kill the return/line feed, but also
everything of the line what’s beneath the upper line.

Sample: (here ‘|’ is used for the current cursor position!)

//--------------------------------------
texture { pigment{ Red }
|         normal { bumps 0.5 scale 0.1 }
//--------------------------------------

hitting backspace results in:

//--------------------------------------
texture { pigment{ Red }| 0.5 scale 0.1 }
//--------------------------------------

and not as expected:

//--------------------------------------
texture { pigment{ Red }|         normal { bumps 0.5 scale 0.1 }
//--------------------------------------

With 3.6.2 and with RC3 (latest old beta I found on my computers)
this was no problem!

I already reported this on 17-Sept-2012 at
http://news.povray.org/povray.beta-test/thread/%3C5056f452%241%40news.povray.org%3E/

 259 Parser/SDLDefinite Bug3.70 RC6Very LowLow Stack Overflow with the write-directive with missing cl ...Closed
100%
Task Description

As I posted yesterday to the POV bugreports, I observed a bug with the #write directive, having forgotten the closing bracket. I looked a little bit closer and found different behaviours of POV with different array sizes.

With ArrayDim=100 (please look at the attached SDL-code, which is reduced as much as possible and produces only the bug and no scene) one get the Parse Error: “Expected ‘string’, End of File found instead” and the last line is highlighted. With ArrayDim=1024 you get an Stack Overflow and POV crashes.

I observed this at two different core i7 windows machines. On one of them (16 GB RAM, if this is of importance) the threshold between both behaviours was between 300 and 400. Hope this helps.

Best regards,
Michael

 260 Configure/BuildCompatibility Issue3.70 RC6Very LowLow Patch to let POV-Ray builds with boost >=1.50 Closed
100%
Task Description

Originally resolved in https://bugs.gentoo.org/show_bug.cgi?id=425450.
Attached is a patch with Gentoo-specific code removed.

There are two parts in this issue:

  • The newer boost library requires downstream users to explicitly link to the boost system library (-lboost_system).
  • The newer boost library replaced TIME_UTC with TIME_UTC_, because glibc added TIME_UTC.
 261 CameraDefinite Bug3.70 RC6Very LowMedium mesh_camera distribution type 3 output image is placed  ...Closed
100%
Task Description

Output images are 0.5 pixels too right and 0.5 pixels too down (mesh_camera_bug.pov).

The error is cumulative when image files are used again as texture (run 10 times mesh_camera_bug_reuse.pov).

This can be compensated by adjusting UV maps (mesh_camera_fix.pov and mesh_camera_fix_reuse.pov).

Tested with and without anti-aliasing.

 262 Setup/InstallDefinite Bug3.70 RC6Very LowLow sources are being compiled twice on Linux Closed
100%
3.70 release Task Description

When running make on Linux, the backend source files (and possibly others?) are apparently compiled twice: first from the .../source/backend/ directory, and another time from the .../source/ directory. As an example, here are the corresponding lines for sphsweep.cpp:

g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../source -I../../source -I../../source/base -I../../unix -I../../vfe 
-I../../vfe/unix -pthread -I/usr/include/OpenEXR    -pthread -I/usr/include  -pipe -Wno-multichar -Wno-write-strin
gs -fno-enforce-eh-specs -s -O3 -ffast-math -pthread -MT sphsweep.o -MD -MP -MF .deps/sphsweep.Tpo -c -o sphsweep.
o `test -f 'shape/sphsweep.cpp' || echo './'`shape/sphsweep.cpp
g++ -DHAVE_CONFIG_H -I. -I..  -I.. -I../source/backend -I../source/base -I../source/frontend -I../unix -I../vfe -I.
./vfe/unix -pthread -I/usr/include/OpenEXR    -pthread -I/usr/include  -pipe -Wno-multichar -Wno-write-strings -fno
-enforce-eh-specs -s -O3 -ffast-math -pthread -MT sphsweep.o -MD -MP -MF .deps/sphsweep.Tpo -c -o sphsweep.o `test 
-f 'backend/shape/sphsweep.cpp' || echo './'`backend/shape/sphsweep.cpp

This is especially annoying on platforms that are rather slow at compiling.

 265 OtherPossible Bug3.70 RC6Very LowLow Warnings from clang that might need consideration Closed
100%
Task Description

Compiling the sources with clang instead of g++ (on ubuntu 12.10 with boost 1.50)

./configure COMPILED_BY=”your name here <also@email>” LIBS=-lboost_system –disable-io-restrictions CC=clang CXX=clang

there is a few warnings that catch the eyes (and other as well that I dismiss so far, such as cases not covered in switch and empty body in if, or extraneous parentheses in tests):

support/randomsequences.cpp:553:15: warning: field is uninitialized when used here [-Wuninitialized]
                        startIndex(startIndex)
                                   ^
support/randomsequences.cpp:553:15: warning: field is uninitialized when used here [-Wuninitialized]
support/randomsequences.cpp:974:40: note: in instantiation of member function 'pov::PrecomputedNumberGenerator<int>::PrecomputedNumberGenerator' requested here
        SeedableIntGeneratorPtr generator(new PrecomputedIntGenerator(factory, count));
                                              ^
support/randomsequences.cpp:553:15: warning: field is uninitialized when used here [-Wuninitialized]
                        startIndex(startIndex)
                                   ^
support/randomsequences.cpp:984:43: note: in instantiation of member function 'pov::PrecomputedNumberGenerator<double>::PrecomputedNumberGenerator' requested here
        SeedableDoubleGeneratorPtr generator(new PrecomputedDoubleGenerator(factory, count));
                                                 ^
support/randomsequences.cpp:553:15: warning: field is uninitialized when used here [-Wuninitialized]
                        startIndex(startIndex)
                                   ^
support/randomsequences.cpp:1011:43: note: in instantiation of member function 'pov::PrecomputedNumberGenerator<pov::Vector3d>::PrecomputedNumberGenerator' requested here
                return SequentialVectorGeneratorPtr(new PrecomputedVectorGenerator(factory, count));
                                                        ^
support/randomsequences.cpp:553:15: warning: field is uninitialized when used here [-Wuninitialized]
                        startIndex(startIndex)
                                   ^
support/randomsequences.cpp:1056:45: note: in instantiation of member function 'pov::PrecomputedNumberGenerator<pov::Vector2d>::PrecomputedNumberGenerator' requested here
                return SequentialVector2dGeneratorPtr(new PrecomputedVector2dGenerator(factory, count));

Self referencing member in creator does not seems to be great for a reproducible pseudorandom generator (some compiler/architecture might force to 0, other might not... seems bad karma).

                           
             povmscpp.cpp:1875:4: warning: delete called on 'POVMS_MessageReceiver::HandlerOO' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
                        delete nodeptr->handleroo;
                        ^
povmscpp.cpp:1877:4: warning: delete called on 'POVMS_MessageReceiver::Handler' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
                        delete nodeptr->handler;
                        ^

Maybe just a missing keyword (virtual) in the header file ? Or is it harder ?


shelloutprocessing.cpp:260:28: warning: expression result unused [-Wunused-value]
        for (s = str.c_str(); *s; *s++)
                                  ^~~~

Why “*s++” ? why not just “s++” ?

renderfrontend.cpp:1165:57: warning: trigraph ignored [-Wtrigraphs]
                                        default:                                    t = "(???)";                            break;
 

I guess it’s not an intended trigraph. Might nevertheless perturb some compiler/result.

 266 FrontendDefinite Bug3.70 RC6Very LowLow command line options in ini files don't accept quoted s ...Closed
100%
3.70 RC7 Task Description

Quoted strings as parameters to command-line options work on the command line but not in INI files; e.g.:

+i"test.pov"

Root cause has already been identified (actually the problem was found during code inspection) and a fix is under way.

 267 Geometric PrimitivesDefinite Bug3.70 RC6Very LowMedium Bug in "sor" Primitive Leads to Random Black Artefacts  ...Closed
100%
3.70 RC7 Task Description

Recently, I have been rendering an animation with POV-Ray 3.7 RC 6 using radiosity, photons and backside illumination. Many frames contained artefacts like in the attached image file. Trying to eliminate those artefacts I observed the following:

  • Rendering the same frame several times did not reproduce the artefacts or reproduced them differently. I.e., when I rendered a second (third, fourth, ...) time with +SF100 +EF100, the black space in the image was somewhere else or in some cases disappeared.
  • With radiosity turned off, no such artefacts have happened since, even in the scenes where they happened with radiosity turned on.
  • Turning off photons with radiosity still turned on did not remove the artefacts.
  • Rendering with one thread on one CPU core instead of two threads on two cores did not change anything except the rendering time.
  • Changing the radiosity settings I have not tried thoroughly, but at least raising or lowering count or error_bound does not seem to have any effect on this.

While POV-Ray was rendering, no other memory-intensive or CPU-intensive programs were running and POV-Ray itself did not report any error (just the usual warnings that some of the used features could change in future versions etc.). Render priotity was set to “high”.

 268 Parser/SDLDefinite Bug3.70 RC6Very LowLow "naked" pigment statement does not properly override pr ...Closed
100%
Task Description

A pigment statement not wrapped in a texture statement does not properly override a pigment previously defined for the object. In the following SDL code:

  #declare PLANE = plane { y,0
    texture {
      pigment { checker color rgb 1 color rgb 0 scale 0.1 }
  } }
  object { PLANE
    pigment { checker color red 1 color blue 1 scale 1.0 }
  }

the scaling of the pigment previously specified for the PLANE object is retained for the new pigment. Compare:

  #declare PLANE = plane { y,0
    texture {
      pigment { checker color rgb 1 color rgb 0 scale 0.1 }
  } }
  object { PLANE
    texture {
      pigment { checker color red 1 color blue 1 scale 1.0 }
  } }

which behaves as expected.

The issue has been around at least since POV-Ray 3.6.2.

 271 Texture/Material/FinishDefinite Bug3.70 RC6DeferLow filter affects object's own brightness in an improper w ...Closed
100%
3.70 release Task Description

The following scene has four spheres with different pigment color & filter settings:

- Left: filter 1
- Right: filter 0

- Top: red 0.0 green 0.5 blue 1.0
- Bottom: red 0.00 green 0.05 blue 0.10 (10% of the above)

Background is set to black, so that we only see the diffuse component of the object’s effective color.

Theoretically, both left spheres should be invisible, as they are fully transmissive (with a filtering effect), but apparently with a high filter setting, reducing an object’s pigment color actually increases the object’s effective diffuse color.

//+w600 +h600

global_settings{ assumed_gamma 1.0 }

camera {
  orthographic
  location  <0,0,-10>
  right 4*x
  up 4*y
  look_at   <0,0,0>
}

light_source{<10,10,-10> color rgb 1 parallel }

background { color rgb 0 }

default {
  finish {
    ambient 0
    diffuse 1
    specular 0
    phong 0
    reflection { 0.0 }
  }
}


sphere { <-1, 1, 0>, 0.8 texture { pigment { color rgb <0,0.5,1.0> filter 1.0 } } }
sphere { < 1, 1, 0>, 0.8 texture { pigment { color rgb <0,0.5,1.0> filter 0.0 } } }

sphere { <-1,-1, 0>, 0.8 texture { pigment { color rgb <0,0.5,1.0>*0.1 filter 1.0 } } }
sphere { < 1,-1, 0>, 0.8 texture { pigment { color rgb <0,0.5,1.0>*0.1 filter 0.0 } } }

This bug has been around in 3.6 already.

 244 Texture/Material/FinishUnimp. Feature/TODO3.70 RC5Very LowHigh Crand is disabled in 3.7 code Closed
100%
3.70 RC7 Task Description

Turns out the crand feature, which depends on a real random number generator (and hence has threading issues) was disabled early on during 3.7 development, and hasn’t been fixed yet. The code is commented out in line 2426/2427 of trace.cpp.

 238 Parser/SDLPossible Bug3.70 RC4Very LowHigh Error during #read causes file to be kept open Closed
100%
3.70 RC7 Task Description

Consider the following script:

  #fopen F "foo.txt" read
  #read (F, Foo)
  #debug concat ("'", Foo, "'\n")
  #fclose F

Now assume that foo.txt erroneously contains unquoted text (which will result in a parse error):

  Blah

When the error is reported, POV-Ray for Windows will helpfully open foo.txt, but any attempt to save a corrected version of foo.txt will fail until you exit the POV-Ray GUI, presumably because foo.txt is not properly closed by the parser.

 239 Setup/InstallDefinite Bug3.70 RC4Very LowMedium Owner and group of user's local configurations on insta ...Closed
100%
Future release Task Description

I reinstall a system, (so ~/.povray was not existant), and then
installed povray from sources, as a normal user (excepted the
installation step):

$ ./configure ...
$ make
$ make check
$ sudo make install

I find these steps pretty much standard.

The problem I’m noticing is that the $HOME/.povray hierarchy get owned
by root (hey, it’s *MY* directory !). There is a chown in the Makefile
for the target files (povray.ini & povray.conf), as well as subtree but:

* povowner & povgroup are hard coded to 0 (I would expect a copy of the
owner & group of $HOME, wouldn’t I ?)

For getting povowner, I would suggest `stat -c “%u” $HOME`
For povgroup, `stat -c “%g” $HOME`

Are they portable enough ? (I could ask on Monday a Solaris system, but
I do not have bsd and the other flavours of unix)

(Stat is in section 1 of man, part of gnu coreutils, /usr/bin/stat)

Side note: This is fine to install for the local user, but new later
users could benefit also from a ~/.povray/3.7/ subtree ; what about also
filling the /etc/skel (when available) ? (and in /etc/skel, root owner
is fine!)

 241 PhotonsDefinite Bug3.70 RC4Very LowLow Photons not working correctly Closed
100%
3.70 RC6 Task Description

~scenes/advanced/optics.pov not rendering correctly. See the post in povray.beta-test “Photons not working as expected” for additional information.

 193 Sample scenesUnimp. Feature/TODO3.70 RC3Very LowVery Low "pure white" typo in "Insert Menu" bitmap - simple solu ...Closed
100%
Task Description

In the folder “ready made scenes”, there is the file “B0 - Basic scene 11 - pure white background.txt”.
The text string to be rendered lacks the “e” in “pure”. Unfortunately, this makes the typo visible in the “Insert menu” preview image.

If the “e” is added, the text needs to be scaled a bit smaller (0.43 instead of 0.44) to fit inside the view.

The following code contains a possible “fix” (whatever).
It would be great if someone could fix this easy issue:

text { ttf "arial.ttf", "pure white background", 0.02, 0.0 // thickness, offset
       texture{ pigment{ color rgb<1,0.6,0>*0.5 } 
                finish { phong 0.1 }
              } // end of texture

       scale<1,1.25,1>*0.43
       translate<-2.10,-0.30,0.00 >
      } // end of text object ---------------------------------------------
 194 Parser/SDLDefinite Bug3.70 RC3Very LowLow command line parse error Closed
100%
3.70 RC4 Task Description

povray +Imesh_camera.pov +Omesh_camera.png +FN +W800 +H600 produces a “Failed to parse command-line option” error. when I rename my pov source file to ess_mesh_camera.pov it runs fine. seems to be pointing to a clash with the +im option. i also had another file that renaming it got me going.

 195 OtherCompatibility Issue3.70 RC3Very LowMedium povray-3.7.0rc3 incompatible with NetBSD Closed
100%
Task Description

While testing if the png support was working, I tried 3.7.0rc3 on NetBSD-5.99.45/amd64, and had the following problems:

1. lseek64 (used in source/base/image/image.cpp) is not portable, and not necessary on NetBSD (off_t there is large-file-safe)
2. unix/Makefile.am doesn’t add -lboost_thread to povray_LDADD, which breaks linking the executable.
3. vfe/unix/platformbase.cpp uses CLOCK_THREAD_CPUTIME_ID, which is not provided on NetBSD (I hacked around it by defining the symbol to “0”, but that’s of course not a correct fix).
4. vfe/unix/platformbase.cpp uses CLOCK_PROCESS_CPUTIME_ID, which is not provided on NetBSD – it’s called CLOCK_REALTIME like on FreeBSD, so we could just add defined(NetBSD) to the FreeBSD case, except for point 3.
5. vfe/unix/vfeplatform.cpp uses WEXITSTATUS. For this, sys/wait.h should be included. The obvious fix is
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
but this also needs a check in the configure script.

Fixing all this, I get it to build, but core dump when run against the demo file from http://www.csb.yale.edu/userguides/graphics/povray/demo.pov.html.
Backtrace is
Program terminated with signal 11, Segmentation fault.
#0 0x00000000004ac479 in boost::gregorian::date::date ()
(gdb) bt
#0 0x00000000004ac479 in boost::gregorian::date::date ()
#1 0x00000000004d29f7 in boost::gregorian::date::date ()
#2 0x0000000000479a85 in std::vector<std::string, std::allocator<std::string> >::operator= ()
#3 0×0000000000461570 in std::vector<std::string, std::allocator<std::string> >::operator= ()
#4 0x00000000004656c7 in std::vector<std::string, std::allocator<std::string> >::operator= ()
#5 0x00000000005efc9f in Imf::TypedAttribute<std::string>::typeName ()
#6 0x00000000005fd890 in Imf::TypedAttribute<std::string>::typeName ()
#7 0x00000000005fe5d8 in Imf::TypedAttribute<std::string>::typeName ()
#8 0x000000000045d6dc in std::vector<std::string, std::allocator<std::string> >::operator= ()
#9 0x00007f7ffd80d9cf in thread_proxy ()

from /usr/pkg/lib/libboost_thread.so.1.45.0

#10 0x00007f7ffd00b24e in pthreadcreate_tramp (cookie=<value optimized out>)
at /archive/cvs/src/lib/libpthread/pthread.c:473
#11 0x00007f7ff8871780 in _lwp_park50 () from /usr/lib/libc.so.12

Please advise on how to proceed.

 197 OtherDefinite Bug3.70 RC3Very LowLow -J by itself does nothing Closed
100%
3.70 RC4 Task Description

The documentation says:

“-J Sets aa-jitter off”

However, it seems to have no effect. -J0 will turn off jittering.

 198 Parser/SDLDefinite Bug3.70 RC3Very LowMedium Missing closing brace in function definition causes mem ...Closed
100%
3.70 RC4 Task Description

Given the following two statements, a missing closing brace in the function declaration fn should throw a parse exception; instead it causes a memory access violation when trying to use fn in the second delcaration:

#local fn = function { 
  pigment { image_map { png "MultiPassBlobs3.png" gamma 1 map_type 0 once }} 
#local clr = fn(0,0,0);
 199 Sample scenesDefinite Bug3.70 RC3Very LowVery Low typos in sample scenes prevent render Closed
100%
3.70 RC4 Task Description

.../scenes/objects/fractal2.pov

in global_settings  "max_trace" should be "max_trace_level"

.../scenes/advanced/diffuse_back.pov

in global_settings  assumed_gamma statement should not be followed by a semicolon

.../scenes/advanced/blocks/stackernight.pov

in global_settings  "assummed_gamma" should be spelled "assumed_gamma"

.../scenes/portfolio/*.pov

in all files other than _empty.pov the parse stops at the lines containing "[frame_number-1]" I'm guessing it should be "[frame_number]-1"  
 200 Geometric PrimitivesDefinite Bug3.70 RC3Very LowLow Calibri TrueType font garbled Closed
100%
3.70 RC4 Task Description

original post on povray.beta-test:

POV-Ray 3.7.0.RC3 on Slackware 13.0 x86_64.
I pointed povray to use the calibri.ttf font over on my Windows 7 partition.
The result is garbled - strange letters with accents appear instead of the
expected text. (KDE's kfontview opens calibri.ttf OK, with nothing strange).

Pointing povray to use other fonts of Win7, e.g. comic.ttf and arial.ttf, was
OK.

I solved the problem by pushing calibri.ttf through fontforge and resaving it
as mycalibri.ttf.

Cheers,
Peter

Confirmed with development version on Windows XP x64.

Possibly a similar problem as  FS#162 .

 201 Parser/SDLUnimp. Feature/TODO3.70 RC3Very LowLow repeated re-declaring of functions causes runaway memor ...Closed
100%
3.70 RC4 Task Description

original posting from povray.beta-test:

I get this error message:
"Parse Error: bad allocation  Render failed"
- after the code below has been running for about 3 seconds.

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#version 3.7;

#while (true)
  #local Fn = function { transform { translate <0, 0, 0> } }
  #undef Fn
#end // while

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

I'm using POV-Ray for Windows - Version 3.7.0.RC3.msvc9-sse2.win32
The operating system is Windows XP.

With the code above, the error messages has so far appeared every time
right after 3318K tokens have been parsed. But with other versions of
my code, the error message does not always show up. (Sometimes the
render finishes and sometimes the parsing stops at different "times".)

[...]

Other users report no error message, but memory consumption rising to about 1.2 GB.

 203 RadiosityDefinite Bug3.70 RC3Very LowLow Radiosity artifacts at low error_bound Closed
100%
3.70 RC4 Task Description

A scene of a hollow sphere viewed from the inside:

difference {
    sphere { 0, 100 }
    sphere { 0, 99 }
    pigment { rgb 1 }
    finish { ambient .4 }
}

global_settings {
    radiosity {
        error_bound .1
    }
}

Rendering produces dark splotches at the centers of the pretrace blocks, as shown in the attached image. Blocks rendered earlier have darker splotches. They also differ in shape between renders even with +HR (but not with +WT1).

Turning “always_sample” on, changing “pretrace_end” to 0.01, or increasing “count” past 1000 makes them imperceptibly faint (they can still be seen by increasing image contrast).

This is possibly a bug, as 3.6 doesn’t produce these artifacts regardless of additional settings.

povray.beta-test thread

 204 OtherCompatibility Issue3.70 RC3Very LowLow -V is not Verbose=off on Unix Closed
100%
3.70 RC4 Task Description

In vfe/unix/unixoptions.cpp, -V is defined as a synonym for -​-version, overriding its general meaning of Verbose=off.

 207 Parser/SDLDefinite Bug3.70 RC3Very LowLow Attempted to redefine float identifier as function ide ...Closed
100%
Future release Task Description
#macro A()
    #local f = function { x }
#end

#local f = 1;
A()

This gives:

File 'bug.pov' line 2: Parse Error: Attempted to redefine float identifier as
 function identifier.

The problem is that this makes using functions in library macros difficult. Basically, they must have a globally unique name that’s not used in any of the macros or files that call the macros. #undef doesn’t really help, because it destroys the identifier in the calling scope.

For example, one of the macros in the standard include files names a function “fn”, so this doesn’t work:

#include "transforms.inc"

#local fn = 42; // fnord?
#local fn_pos = vtransform(x, transform { rotate 30*y } );

The reason for this restriction is explained in Parse_RValue in source/backend/parser/parse.cpp:

    // Do NOT allow to redefine functions! [trf]
    //   #declare foo = function(x) { x }
    //   #declare foo = function(x) { foo(x) } // Error!
    // Reason: Code like this would be unreadable but possible. Is it
    // a recursive function or not? - It is not recursive because the
    // foo in the second line refers to the first function, which is
    // not logical. Further, recursion is not supported in POV-Ray 3.5
    // anyway. However, allowing such code now would cause problems
    // implementing recursive functions after POV-Ray 3.5!

In this case the restriction is applied too broadly: it should be safe to redefine anything other than a function to a function and still avoid it looking like recursion. In fact, there’s a restriction in Parse_Declare specifically to prevent redefining functions.

 208 Parser/SDLDefinite Bug3.70 RC3LowHigh Use-after-free when returning local function or spline  ...Closed
100%
3.70 RC4 Task Description
#macro A()
  #local foo = function { x }
  foo
#end

#local bar = A();

This causes either a segfault, corruption detected by malloc, or “Parse Error: Unknown user defined function”.

After some debugging I think this is what happens.

In source/backend/parser/parse.cpp, Parser::Parse_RValue is called to define the value of bar. Get_Token is called, which invokes A() and which ultimately returns foo as a FUNCT_ID_TOKEN. This token is handled by CASE_VECTOR in Parse_RValue. The relevant clause calls Parse_Unknown_Vector to parse additional tokens (e.g. “foo ( 1 )”). There aren’t any other tokens, but in the process of determining that, #end is reached and Return_From_Macro destroys the symbol table of A, including foo.

So by the time the CASE_VECTOR clause decides that foo is a function identifier that should be copied, the function is destroyed (both the function itself and its number in the symbol table). So here:

    Temp_Data  = (void *) Copy_Identifier((void *)*Token.DataPtr,*Token.NumberPtr);

if *Token.DataPtr (in this case, a function index) was already overwritten, we get “Unknown user defined function”; if it still has the valid function number, it increments the reference count of the function (which has already been freed) back from 0, and we get a double-free later.

A similar problem occurs when foo is a spline.

A tentative patch for the function case is attached.

 209 Geometric PrimitivesDefinite Bug3.70 RC3Very LowMedium Weighted texture of CSG Closed
100%
3.70 RC4 Task Description

in change #3319, csg got a new computation for its weighted textures.

But I’m confused by the computation of the weight: (circa end of csg.cpp file)

COLC weight = 1.0f / min(COLC(textures.size() - firstinserted), 1.0f);

I would have used a max() rather than a min().

It is transparent when there is only one texture, but:

  • should there be no texture (an error...): it would be a division by 0
  • should there be more than 1, the weight of each would be 1. which is without consequence UNLESS there is already some other textures in the list. The right value (from previous code) was 1/n

Or did I get a confusion about min() ?

min(0,1) == 0
min(4,1) == 1

Using max would protect against the division by 0 and the right value when multiple textures are used.

Any thought ?

Showing tasks 1 - 50 of 336 Page 1 of 71 - 2 - 3 - 4 - 5 - Last >>

Available keyboard shortcuts

Tasklist

Task Details

Task Editing