POV-Ray : Newsgroups : povray.beta-test : Out of memory error with media in 3.7b31 (scene works in 3.6) : Re: Out of memory error with media in 3.7b31 (scene works in 3.6) Server Time
5 Oct 2024 15:16:14 EDT (-0400)
  Re: Out of memory error with media in 3.7b31 (scene works in 3.6)  
From: Tom York
Date: 13 Mar 2009 22:45:00
Message: <web.49bb19c349c22c47d55e4a40@news.povray.org>
CShake <cshake+pov### [at] gmailcom> wrote:
> I've been getting 'Fatal error in renderer: Out of Memory' recently in a
> few of my scenes (in 3.7b31, both in Windows and Linux)

As you've found, it's seemingly triggered by the large number of lights traced
through media in the scene, not media properties directly.

It looks like one of the calls to std::sort in
MediaFunction::ComputeMediaLightInterval is causing a bad_alloc exception to be
thrown, probably due to the use of a fixed number of elements (64) for
LightSourceEntryVector and friends. I haven't spent much time on this but there
are lots of FIXME comments associated with this fixed size so presumably this is
a known (or anticipated) issue.

Doubling the fixed array size universally allows the scene to render, until the
number of lights in the array is doubled in the scene file which brings back
the problem again.

Tom


Post a reply to this message

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