Operating System: Windows 10, Linux
Render System: OpenGL 3+
We have had a problem in a game, I'm working on, for a long while now where sometimes when we change the material on a mesh, and recreate an Item from it, the textures for that material fail to load.
This is what the log says (I omitted the startup, this happened roughly 10 minutes after starting the program):
Code: Select all
23:32:29: OGRE EXCEPTION(6:FileNotFoundException): Cannot open file: background/Thrive_iceshelf0.png in FileSystemArchive::open at c:\projects\leviathan\thirdparty\ogre\ogremain\src\ogrefilesystem.cpp (line 249)
23:32:29: Error loading texture background/Thrive_iceshelf0.png. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot open file: background/Thrive_iceshelf0.png in FileSystemArchive::open at c:\projects\leviathan\thirdparty\ogre\ogremain\src\ogrefilesystem.cpp (line 249)
23:32:29: OGRE EXCEPTION(6:FileNotFoundException): Cannot open file: background/Thrive_iceshelf1.png in FileSystemArchive::open at c:\projects\leviathan\thirdparty\ogre\ogremain\src\ogrefilesystem.cpp (line 249)
23:32:29: Error loading texture background/Thrive_iceshelf1.png. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot open file: background/Thrive_iceshelf1.png in FileSystemArchive::open at c:\projects\leviathan\thirdparty\ogre\ogremain\src\ogrefilesystem.cpp (line 249)
23:32:29: OGRE EXCEPTION(6:FileNotFoundException): Cannot open file: background/Thrive_iceshelf2.png in FileSystemArchive::open at c:\projects\leviathan\thirdparty\ogre\ogremain\src\ogrefilesystem.cpp (line 249)
23:32:29: Error loading texture background/Thrive_iceshelf2.png. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot open file: background/Thrive_iceshelf2.png in FileSystemArchive::open at c:\projects\leviathan\thirdparty\ogre\ogremain\src\ogrefilesystem.cpp (line 249)
23:32:29: OGRE EXCEPTION(6:FileNotFoundException): Cannot open file: background/Thrive_iceshelf3.png in FileSystemArchive::open at c:\projects\leviathan\thirdparty\ogre\ogremain\src\ogrefilesystem.cpp (line 249)
23:32:29: Error loading texture background/Thrive_iceshelf3.png. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot open file: background/Thrive_iceshelf3.png in FileSystemArchive::open at c:\projects\leviathan\thirdparty\ogre\ogremain\src\ogrefilesystem.cpp (line 249)
Code: Select all
material Background_Iceshelf
{
technique
{
pass
{
// scene_blend alpha_blend
depth_write off
depth_check off
vertex_program_ref Background_VS
{
}
fragment_program_ref Background_PS
{
}
texture_unit 0
{
tex_coord_set 0
texture background/Thrive_iceshelf0.png 2d gamma
}
texture_unit 1
{
tex_coord_set 1
texture background/Thrive_iceshelf1.png 2d gamma
}
texture_unit 2
{
tex_coord_set 2
texture background/Thrive_iceshelf2.png 2d gamma
}
texture_unit 3
{
tex_coord_set 3
texture background/Thrive_iceshelf3.png 2d gamma
}
}
}
}
Code: Select all
subMesh->setMaterialName(material);
This has happened for me once on Linux and for our Windows based developers and players this has happened many, many times.
The error seems very strange as the files have not changed on disk and nothing that we do in our game should prevent them from being read again.
So I guess maybe there is a bug in the Ogre file loading?
We have been tracking this issue on Github: https://github.com/Revolutionary-Games/ ... issues/639
And we made some changes to reduce the frequency at which the material is changed and the item is recreated and that seems to have made this happen less often.
Here is a screenshot of the single material having all of its layers be the error image:
Any advice would be greatly appreciated.