Re: [osg-users] osgDB::readNodeFile returning null after an excessive amount of calls

2012-09-17 Thread Zach Lenker
Thanks for the reply, I actually figured out what the issue was over the 
weekend. I was hitting a hard limit, of 512, for how many I/O files can be open 
at the same time with stdio. I used the _setmaxstdio function to help with 
that, but the major problem was caused by me not closing some files that get 
continually reopened.

Cheers,
Zach

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49365#49365





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgDB::readNodeFile returning null after an excessive amount of calls

2012-08-20 Thread Zach
Hello,

I am having a image/node loading problem that I really hope someone can help me 
with. I am using osgDB::readNodeFile and osgDB::readImageFile a LOT of 
times during the life time of the program I am working in.  Along side those I 
setup a osgDB::ReaderWriter::Options and set it to cache everything, and I 
pass that as the second param for the read file calls. I always store returned 
nodes as a ref_ptrosg::Node.

Now, the problem is after a certain amount of reads I get this error in the 
console window ... PNGwriter::readfromfile - ERROR **: Too many open files 
... that followed by more errors saying it can't open the file. After I start 
getting that error the readNodeFile/readImageFile calls all return NULL.

How do if fix this? Has anyone come across this error? Is there any more 
information that would be useful to help figure this out? I am afraid I can't 
share the source code.

Thanks for the reading this, and thanks for any help.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49321#49321





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgDB::readNodeFile returning null after an excessive amount of calls

2012-08-20 Thread Robert Osfield
Hi Zach,

The OSG plugins should be closing handles to files once they have
finished read or writing to them, if they aren't then this is a bug
that needs to be addressed.  As others haven't reported the error you
are seeing I would have expected the plugins mostly behave themselves
correctly with respecting to closing handles to files, so perhaps it's
one specific plugin that is a problem, or perhaps something else in
your application is not releasing file handles, or perhaps your OS has
been configured with a small maximum number of file handles.

You say a LOT of times, could you be specific?  Can you recreate the
problem in a small test program?

Robert.



On 18 August 2012 17:06, Zach zachlen...@gmail.com wrote:
 Hello,

 I am having a image/node loading problem that I really hope someone can help 
 me with. I am using osgDB::readNodeFile and osgDB::readImageFile a LOT of 
 times during the life time of the program I am working in.  Along side those 
 I setup a osgDB::ReaderWriter::Options and set it to cache everything, and 
 I pass that as the second param for the read file calls. I always store 
 returned nodes as a ref_ptrosg::Node.

 Now, the problem is after a certain amount of reads I get this error in the 
 console window ... PNGwriter::readfromfile - ERROR **: Too many open files 
 ... that followed by more errors saying it can't open the file. After I start 
 getting that error the readNodeFile/readImageFile calls all return NULL.

 How do if fix this? Has anyone come across this error? Is there any more 
 information that would be useful to help figure this out? I am afraid I can't 
 share the source code.

 Thanks for the reading this, and thanks for any help.

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=49321#49321





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org