Hi Mathias

That rgb files are in flightgear's data cvs.
I do at the moment not remember which ones failed but I can double check that
today evening.

Could you post the problem files.


I do not know how the RGB file format that good to tell if those files are
corrupt or not.

But the observation is
- That loading such an rgb file just crashes the applications due to the rgb
loader writing beyond the bounds of an array. That changes makes sure that
the loader stays in those bounds of the new'ed array - even if there is
garbage in that file.
- Those (possibly corrupt?) files are displayed well using other RGB loaders
in ImageMagick, gimp and ac3d - these are the ones I have tried. With this
change the resulting osg::Image looks like what is displayed with other
tools.

> It looks to me like the widths are specified inconsistently, is this so?
Well, I must admit that I can't tell that.
I have debuged that those array bounds are violated and have in a first step
tried to make sure that the loader does no longer violate them.
Luckily this solved all my problems ...
... with the RGB loader :-)

I'd suspect if there is bug in the RGB loader it'll be earlier in the
code where the sizes of the data are set up rather in the reading of
each line where you've implemented the workaround.

It'd also be interesting to load and save the problem RGB's via
ImageMagic/gimp and then see if the OSG copes fine with the newly
saved version.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to