Re: Bug#849696: libogre-1.9.0v5: Ogre games abort on startup with “basic_string::_M_construct null not valid” / freeimage API issues
James Cowgill
jcowgill at debian.org
Fri Dec 30 01:33:11 UTC 2016
Control: severity -1 grave
Hi,
This is RC because nothing using ogre will start anymore.
On 29/12/16 21:52, Thibaut Girka wrote:
> Package: libogre-1.9.0v5
> Version: 1.9.0+dfsg1-7+b2
> Severity: important
>
> Any Ogre game/application (for instance, funguloids, available in Debian)
> crashes with the following output:
>
> Creating resource group General
> Creating resource group Internal
> Creating resource group Autodetect
> SceneManagerFactory for type 'DefaultSceneManager' registered.
> Registering ResourceManager for type Material
> Registering ResourceManager for type Mesh
> Registering ResourceManager for type Skeleton
> MovableObjectFactory for type 'ParticleSystem' registered.
> ArchiveFactory for archive type FileSystem registered.
> ArchiveFactory for archive type Zip registered.
> ArchiveFactory for archive type EmbeddedZip registered.
> DDS codec registering
> FreeImage version: 3.17.0
> This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
> terminate called after throwing an instance of 'std::logic_error'
> what(): basic_string::_M_construct null not valid
> Abandon
>
> This started happening since upgrading libfreeimage3, so this might be a bug in
> it rather than in Ogre itself, but I haven't investigated any further yet.
This appears to be a regression in the Debian patch applied in
libfreeimage3 3.17.0+ds1-4.
Ogre contains this (OgreMain/src/OgreFreeImageCodec.cpp:98):
> for (int i = 0; i < FreeImage_GetFIFCount(); ++i)
> {
> // Skip DDS codec since FreeImage does not have the option
> // to keep DXT data compressed, we'll use our own codec
> if ((FREE_IMAGE_FORMAT)i == FIF_DDS)
> continue;
>
> String exts(FreeImage_GetFIFExtensionList((FREE_IMAGE_FORMAT)i));
[loop body continues]
[String is typedefed to std::string]
This code assumes that FreeImage_GetFIFExtensionList will never return
NULL for values of i between 0 and FreeImage_GetFIFCount(). However in
the most recent Debian version of freeimage,
FreeImage_GetFIFExtensionList(27 / FIF_FAXG3) does return NULL.
It is unclear to me who is wrong here. The documentation does not
suggest anything about when FreeImage_GetFIFExtensionList can fail,
although the examples always check FreeImage_FIFSupportsReading before
calling it. Can any freeimage maintainer suggest the best way to fix this?
Thanks,
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20161230/eb4bdbe5/attachment-0001.sig>
More information about the debian-science-maintainers
mailing list