POV-Ray : Newsgroups : povray.beta-test : Bug when loading big 'inc' files Server Time
29 Apr 2024 19:11:21 EDT (-0400)
  Bug when loading big 'inc' files (Message 1 to 6 of 6)  
From: Alex
Subject: Bug when loading big 'inc' files
Date: 5 Sep 2012 11:40:01
Message: <web.504772209c77b968db8ca50@news.povray.org>
Hi,

I encounter a an error that does not make sense to me (using version
3.7.0.RC6.msvc10.win64 on a Win 7 64 bit OS with 32 GB RAM). See here for the
details of the error report:
http://www.isi.uu.nl/People/Alexander/misc/Error_message_POV.pdf

The code for the *.pov file is shown below.

Here you can download the *.inc files:
http://www.isi.uu.nl/People/Alexander/misc/Inc_files.zip

I added a small one that works fine. But the big file, which has an identical
format, creates the error. So it seems size does matter ;-)!

Any suggestions on how to tackle this problem? Or am I doing something wrong (in
that case, sorry to have waisted your time)?

Kind regards,
Alexander



////////////////// Start of code ///////////////////////

#version 3.7;
global_settings{assumed_gamma 2.2}
#declare F_tracts = finish { ambient .1 diffuse .7 phong .5  phong_size 5}
background{ color rgb<0, 0, 0>}
object{
#include "F:\Data\POV_Ray_Results\Mesh_tracts_small.inc" // (1) adjust path; (2)
when you change "Mesh_tracts_small" to "Mesh_tracts_big", the error occurs...
}
#declare CT = <113.7829,108.446,70.6662>;
#declare CP = <-95.7177,519.586,394.4953>;
#declare UV = <0.3085,-0.48658,0.81735>;
#declare CA = 23.6803;
#declare deg = 360;
#declare LP = <192.868,537.4052,427.7816>;
camera {
perspective
location CP
sky UV
right x*image_width/image_height
angle CA
look_at CT
}
light_source { LP colour rgb 1
area_light <86.9553,-137.1498,230.3837>, <238.0515,150.9286,0>,10,10
adaptive 1
circular
jitter
}

/////////////////////// End of code ///////////////////////////


Post a reply to this message

From: clipka
Subject: Re: Bug when loading big 'inc' files
Date: 5 Sep 2012 14:33:50
Message: <50479b0e$1@news.povray.org>
Am 05.09.2012 17:39, schrieb Alex:
> Hi,
>
> I encounter a an error that does not make sense to me (using version
> 3.7.0.RC6.msvc10.win64 on a Win 7 64 bit OS with 32 GB RAM). See here for the
> details of the error report:
> http://www.isi.uu.nl/People/Alexander/misc/Error_message_POV.pdf

I suspect that the problem is in the .inc file being larger than 2 GB; 
ad-hoc inspection of the POV-Ray source code indicates that we do have 
/some/ potential problems with text input files of that size on all 
32-bit systems, as well as on Windows 64-bit systems. Not sure whether 
that is related to your issue though.


Post a reply to this message

From: Alex
Subject: Re: Bug when loading big 'inc' files
Date: 6 Sep 2012 05:25:00
Message: <web.50486ae640cfcb1965f972c60@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

> I suspect that the problem is in the .inc file being larger than 2 GB;
> ad-hoc inspection of the POV-Ray source code indicates that we do have
> /some/ potential problems with text input files of that size on all
> 32-bit systems, as well as on Windows 64-bit systems. Not sure whether
> that is related to your issue though.

Many thanks for the quick response!

I did a quick check with a 1.9 GB .inc file and indeed - that works. With files
bigger than 2 GB, the error occurs.

I can understand that for 32 bit OS this enforced limitation in data size
would be necessary to prevent out-of-memory issues, but on a 64 bit OS, memory
allocation should not be a limiting factor, right?

So now this 'data size limitation' has been identified as the problem, is there
a solution for it? Or is there going to be a fix/update in the near future to
tackle this issue? Any other insights are welcome.

Kind regards,
Alexander


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Bug when loading big 'inc' files
Date: 6 Sep 2012 06:30:31
Message: <50487b47$1@news.povray.org>
On 06/09/12 11:21, Alex wrote:
> So now this 'data size limitation' has been identified as the
> problem, is there a solution for it? Or is there going to be a
> fix/update in the near future to tackle this issue? Any other
> insights are welcome.

   For the moment you can break the files... POV-Ray doesn't mind if an
object definition continues on the next included file (just tested it).

--
Jaime


Post a reply to this message

From: Alex
Subject: Re: Bug when loading big 'inc' files
Date: 6 Sep 2012 08:10:00
Message: <web.5048916a40cfcb1965f972c60@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
> On 06/09/12 11:21, Alex wrote:
> > So now this 'data size limitation' has been identified as the
> > problem, is there a solution for it? Or is there going to be a
> > fix/update in the near future to tackle this issue? Any other
> > insights are welcome.
>
>    For the moment you can break the files... POV-Ray doesn't mind if an
> object definition continues on the next included file (just tested it).
>
> --
> Jaime

Genius!

Many thanks!


Post a reply to this message

From: clipka
Subject: Re: Bug when loading big 'inc' files
Date: 6 Sep 2012 09:31:57
Message: <5048a5cd$1@news.povray.org>
Am 06.09.2012 11:21, schrieb Alex:
> clipka <ano### [at] anonymousorg> wrote:
>
>> I suspect that the problem is in the .inc file being larger than 2 GB;
>> ad-hoc inspection of the POV-Ray source code indicates that we do have
>> /some/ potential problems with text input files of that size on all
>> 32-bit systems, as well as on Windows 64-bit systems. Not sure whether
>> that is related to your issue though.
>
> Many thanks for the quick response!
>
> I did a quick check with a 1.9 GB .inc file and indeed - that works. With files
> bigger than 2 GB, the error occurs.
>
> I can understand that for 32 bit OS this enforced limitation in data size
> would be necessary to prevent out-of-memory issues, but on a 64 bit OS, memory
> allocation should not be a limiting factor, right?

It (probably) has nothing to do with memory allocation (we never load 
the whole file into memory during parsing anyway), but rather with 
tracking particular positions in a file; while we do explicitly use 
64-bit integers for that purpose, the C standard runtime library 
functions to retrieve or change the current file position use the "long 
int" data type, which is 32 bit wide on any 32-bit PC systems, but also 
on Windows 64-bit systems (it's 64 bit on Linux 64-bit systems though, 
as a naive programmer would probably expect).

> So now this 'data size limitation' has been identified as the problem, is there
> a solution for it? Or is there going to be a fix/update in the near future to
> tackle this issue? Any other insights are welcome.

The solution is to call different (but unfortunately platform-specific) 
library functions for file position querying and manipulation, which 
obviously needs changes to the code. I can't promise anything about when 
it will be fixed though.


All what I've said is of course valid only in case the bogus code I 
found is indeed related to the issue.


Post a reply to this message

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