Cell preloading

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Cell preloading

Post by scrawl » 10 Feb 2016, 17:16

Well, the branch is merged now. It's not as smooth as I would have liked, there's still minor stuttering on some cell changes, but this is as good as it gets without doing massive refactorings to the existing cell loading code that are best reserved for post-1.0.

User avatar
psi29a
Posts: 4736
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Cell preloading

Post by psi29a » 10 Feb 2016, 18:14

After I did a pull from master with the new cell preloading code, I get a segfault before anything renders:

Code: Select all

(gdb) run
Starting program: /home/bcurtis/workspace/OpenMW/build/openmw 
warning: the debug information found in "/lib64/ld-2.21.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Installing crash catcher
Loading config file: /home/bcurtis/.config/openmw/openmw.cfg... done.
Loading config file: ./openmw.cfg... done.
OpenMW version 0.38.0
Revision: da6dcfc49e
Using default (English) font encoding.
Loading settings file: ./settings-default.cfg
Loading settings file: /home/bcurtis/.config/openmw/settings.cfg
[New Thread 0x7fffe0a3e700 (LWP 29696)]
Adding data directory /usr/share/games/openmw/data
Adding data directory /home/bcurtis/.local/share/openmw/data

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff1b0c135 in malloc_consolidate ([email protected]=0x7ffff1e51c00 <main_arena>) at malloc.c:4150
4150	malloc.c: No such file or directory.
(gdb) bt
#0  0x00007ffff1b0c135 in malloc_consolidate ([email protected]=0x7ffff1e51c00 <main_arena>) at malloc.c:4150
#1  0x00007ffff1b0ea34 in _int_malloc ([email protected]=0x7ffff1e51c00 <main_arena>, [email protected]=8192) at malloc.c:3417
#2  0x00007ffff1b1150e in __GI___libc_malloc (bytes=8192) at malloc.c:2895
#3  0x00007ffff2404188 in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff2404229 in operator new[](unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff24628a8 in std::basic_filebuf<char, std::char_traits<char> >::_M_allocate_internal_buffer() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff2466af2 in std::basic_filebuf<char, std::char_traits<char> >::open(char const*, std::_Ios_Openmode) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x0000000000bff483 in std::basic_ifstream<char, std::char_traits<char> >::open (__mode=std::_S_bin, __s=<optimized out>, 
    this=0x2692dd0) at /usr/include/c++/5/fstream:597
#8  boost::filesystem::basic_ifstream<char, std::char_traits<char> >::open (mode=std::_S_bin, p=..., this=<optimized out>)
    at /usr/include/boost/filesystem/fstream.hpp:92
#9  osgMyGUI::DataManager::getData (this=<optimized out>, name="openmw_loading_screen.layout")
    at /home/bcurtis/workspace/OpenMW/openmw/components/myguiplatform/myguidatamanager.cpp:23
#10 0x00007ffff3bb1399 in MyGUI::ResourceManager::_loadImplement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libMyGUIEngine.so.3debian1
#11 0x00007ffff3bb486d in MyGUI::ResourceManager::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libMyGUIEngine.so.3debian1
#12 0x00007ffff3b61006 in MyGUI::LayoutManager::loadLayout(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, MyGUI::Widget*) ()
   from /usr/lib/libMyGUIEngine.so.3debian1
#13 0x000000000069bb11 in MWGui::Layout::initialise ([email protected]=0x268c730, _layout=..., [email protected]=0x0)
    at /home/bcurtis/workspace/OpenMW/openmw/apps/openmw/mwgui/layout.cpp:21
#14 0x00000000006f4e13 in MWGui::Layout::Layout (_parent=0x0, _layout=..., this=0x268c730)
    at /home/bcurtis/workspace/OpenMW/openmw/apps/openmw/mwgui/layout.hpp:18
#15 MWGui::WindowBase::WindowBase (this=0x268c730, parLayout=...)
    at /home/bcurtis/workspace/OpenMW/openmw/apps/openmw/mwgui/windowbase.cpp:16
#16 0x000000000078fafb in MWGui::LoadingScreen::LoadingScreen (this=0x268c730, vfs=0x11d96d0, viewer=0x118ef90)
    at /home/bcurtis/workspace/OpenMW/openmw/apps/openmw/mwgui/loadingscreen.cpp:40
#17 0x00000000006d7918 in MWGui::WindowManager::WindowManager (this=0x11e0df0, viewer=0x118ef90, guiRoot=0x11e0ce0, 
    resourceSystem=0x260bd90, logpath="/home/bcurtis/.config/openmw//", resourcePath="./resources/mygui", 
---Type <return> to continue, or q <return> to quit---run~~
There is no crashlog.

OpenMW-CS crashes as well when I try to open a 3d view of a cell.

Code: Select all

[email protected]:~/workspace/OpenMW/build$ ./openmw-cs 
Loading settings file: ./openmw-cs.cfg
Loading config file: /home/bcurtis/.config/openmw/openmw.cfg... done.
Loading config file: ./openmw.cfg... done.
Adding data directory /usr/share/games/openmw/data
Adding data directory /home/bcurtis/.local/share/openmw/data
Segmentation fault (core dumped)

(gdb) run
Starting program: /home/bcurtis/workspace/OpenMW/build/openmw-cs 
warning: the debug information found in "/lib64/ld-2.21.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Loading settings file: ./openmw-cs.cfg
[New Thread 0x7fffe2a1a700 (LWP 29866)]
[New Thread 0x7fffe1cf1700 (LWP 29867)]
[New Thread 0x7fffe14f0700 (LWP 29868)]
Loading config file: /home/bcurtis/.config/openmw/openmw.cfg... done.
Loading config file: ./openmw.cfg... done.
Adding data directory /usr/share/games/openmw/data
Adding data directory /home/bcurtis/.local/share/openmw/data
Detected unclean shutdown.
[New Thread 0x7fffcf82e700 (LWP 29875)]

Program received signal SIGSEGV, Segmentation fault.
_int_malloc ([email protected]=0x7ffff3b10c00 <main_arena>, [email protected]=1048576) at malloc.c:3769
3769	malloc.c: No such file or directory.
(gdb) bt
#0  _int_malloc ([email protected]=0x7ffff3b10c00 <main_arena>, [email protected]=1048576) at malloc.c:3769
#1  0x00007ffff37d050e in __GI___libc_malloc (bytes=1048576) at malloc.c:2895
#2  0x00007ffff40c3188 in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff40c3229 in operator new[](unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007fffcee25c2c in ReadDDSFile(std::istream&, bool) () from /usr/lib/x86_64-linux-gnu/osgPlugins-3.2.1/osgdb_dds.so
#5  0x00007fffcee28ff3 in ReaderWriterDDS::readImage(std::istream&, osgDB::Options const*) const ()
   from /usr/lib/x86_64-linux-gnu/osgPlugins-3.2.1/osgdb_dds.so
#6  0x000000000079f2ef in Resource::ImageManager::getImage (this=0x1433350, filename="textures\\tx_sand_01.dds")
    at /home/bcurtis/workspace/OpenMW/openmw/components/resource/imagemanager.cpp:123
#7  0x00000000008491d0 in Terrain::TerrainGrid::buildTerrain ([email protected]=0x1b1f0a0, [email protected]=0x1b1f6c0, 
    [email protected]=0.25, chunkCenter=...)
    at /home/bcurtis/workspace/OpenMW/openmw/components/terrain/terraingrid.cpp:160
#8  0x0000000000848570 in Terrain::TerrainGrid::buildTerrain ([email protected]=0x1b1f0a0, [email protected]=0x1b1f5d0, 
    [email protected]=0.5, chunkCenter=...) at /home/bcurtis/workspace/OpenMW/openmw/components/terrain/terraingrid.cpp:95
#9  0x0000000000848570 in Terrain::TerrainGrid::buildTerrain ([email protected]=0x1b1f0a0, [email protected]=0x0, 
    [email protected]=1, chunkCenter=...) at /home/bcurtis/workspace/OpenMW/openmw/components/terrain/terraingrid.cpp:95
#10 0x000000000084a5de in Terrain::TerrainGrid::loadCell (this=0x1b1f0a0, x=-1, y=10)
    at /home/bcurtis/workspace/OpenMW/openmw/components/terrain/terraingrid.cpp:238
#11 0x000000000075e2a4 in CSVRender::Cell::Cell (this=0x1b1e780, data=..., rootNode=<optimized out>, id=..., 
    deleted=<optimized out>) at /home/bcurtis/workspace/OpenMW/openmw/apps/opencs/view/render/cell.cpp:92
#12 0x00000000007537c6 in CSVRender::PagedWorldspaceWidget::addCellToScene ([email protected]=0x16e42c0, coordinates=...)
    at /home/bcurtis/workspace/OpenMW/openmw/apps/opencs/view/render/pagedworldspacewidget.cpp:313
#13 0x0000000000753c73 in CSVRender::PagedWorldspaceWidget::adjustCells ([email protected]=0x16e42c0)
    at /home/bcurtis/workspace/OpenMW/openmw/apps/opencs/view/render/pagedworldspacewidget.cpp:85
#14 0x0000000000754090 in CSVRender::PagedWorldspaceWidget::setCellSelection ([email protected]=0x16e42c0, selection=...)
    at /home/bcurtis/workspace/OpenMW/openmw/apps/opencs/view/render/pagedworldspacewidget.cpp:429
#15 0x0000000000754117 in CSVRender::PagedWorldspaceWidget::useViewHint (this=0x16e42c0, hint=...)
    at /home/bcurtis/workspace/OpenMW/openmw/apps/opencs/view/render/pagedworldspacewidget.cpp:421
#16 0x0000000000708872 in CSVDoc::View::addSubView (this=0x160aa00, id=..., hint="c:#-1 10")
    at /home/bcurtis/workspace/OpenMW/openmw/apps/opencs/view/doc/view.cpp:617
#17 0x0000000000784308 in CSVDoc::View::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, 
    _a=<optimized out>) at /home/bcurtis/workspace/OpenMW/build/apps/opencs/view/doc/moc_view.cxx:152
#18 0x00007ffff52b5f60 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#19 0x0000000000784b85 in CSVDoc::SubView::focusId (this=<optimized out>, _t1=..., _t2=...)
    at /home/bcurtis/workspace/OpenMW/build/apps/opencs/view/doc/moc_subview.cxx:117

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Cell preloading

Post by scrawl » 10 Feb 2016, 18:34

All that works for me. It looks like your OpenMW is crashing very early on, before the preloader thread even starts, in code that I haven't touched, so that's weird. Try a clean rebuild I guess? Have you made any changes to OpenMW dependencies? Does going back to an earlier OpenMW commit work?

User avatar
Pherim
Posts: 140
Joined: 27 Aug 2014, 15:37

Re: Cell preloading

Post by Pherim » 10 Feb 2016, 19:03

Lagahan wrote:
SquireNed wrote: Heh, would definitely kill the system loading all the interior cells as well as exteriors, however it got me thinking, it would be cool if a sort of low LOD / poly interior based on whats in it and neutral lighting conditions could be generated to be used as what is seen through windows where the buildings have them!
Which would only work if the interiors would always match the size and shape of the exterior buildings and the windows were in the same place - which is not the case. Also, windows are often just meshes pasted on other meshes, so if they were made see-through, one would in most places see just the wall below. If it was not like this, it might have been not that difficult to create generic interiors for most houses, but as it is it would probably mean to give every house its own unique mesh.

User avatar
psi29a
Posts: 4736
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Cell preloading

Post by psi29a » 10 Feb 2016, 20:18

@Scrawl: I cleaned and recompiled, same errors. If I use 0.38 (release), it works just fine. There is something going on here. This is without Morrowind, using just the OpenMW-Template:
https://bugs.openmw.org/attachments/dow ... e-0.3.0.7z

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Cell preloading

Post by scrawl » 10 Feb 2016, 20:38

Just downloaded openmw-template, works for me on commit 6bfeb118d7e.

Image

User avatar
psi29a
Posts: 4736
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Cell preloading

Post by psi29a » 10 Feb 2016, 20:48

OK, I rolled back your patches:
git checkout 40f4a9811ef09e91d47d411e12af3d83d6f02b13

compiled from scratch, ran openmw --skip-menu without any problems.

git checkout master

compiled from scratch, ran openmw --skip-menu and it crashes!

I'm using Ubuntu OSG (3.2.1-7ubuntu1), not your OSG if that makes any difference.

User avatar
psi29a
Posts: 4736
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Cell preloading

Post by psi29a » 10 Feb 2016, 21:29

The last git commit from your patch-set/MR that worked was:
commit e2ee1d5689e1803cd7f63b94dbcfb7ff70b07f13
Author: scrawl <[email protected]>
Date: Fri Feb 5 18:58:22 2016 +0100

Use separate textures for the MyGUI RenderManager

This means we can more reliably set the filter parameters.

I believe this commit creates a regression where non-DDS GUI textures would display upside down, which will be addressed by further refactoring in the next commits.

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Cell preloading

Post by scrawl » 10 Feb 2016, 23:41

Right, did a rebuild with Ubuntu OSG 3.2, loaded up openmw-template, and now I get the crash too.

valgrind says:

Code: Select all

==19843== Invalid read of size 1
==19843==    at 0x4F967F4: flipImageVertical(unsigned char*, unsigned char*, unsigned int, unsigned int) (in /usr/lib/libosg.so.3.2.0)
==19843==    by 0x4F96F2C: osg::Image::flipVertical() (in /usr/lib/libosg.so.3.2.0)
==19843==    by 0x187CFBAC: ReadDDSFile(std::istream&, bool) (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0x187D2859: ReaderWriterDDS::readImage(std::istream&, osgDB::Options const*) const (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0xA26FC6: Resource::ImageManager::getImage(std::string const&) (imagemanager.cpp:123)
==19843==    by 0xB20744: osgMyGUI::OSGTexture::loadFromFile(std::string const&) (myguitexture.cpp:89)
==19843==    by 0xB1B933: osgMyGUI::RenderManager::getTexture(std::string const&) (myguirendermanager.cpp:552)
==19843==    by 0x89A8347: MyGUI::texture_utility::getTextureSize(std::string const&, bool) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x88DD732: MyGUI::ImageBox::setItemResourceInfo(MyGUI::ImageIndexInfo const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x76A077: MWGui::ResourceImageSetPointerFix::setImage(MyGUI::ImageBox*) (cursor.cpp:51)
==19843==    by 0x8935C89: MyGUI::PointerManager::setPointer(std::string const&, MyGUI::Widget*) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x893647A: MyGUI::PointerManager::_load(MyGUI::xml::Element*, std::string const&, MyGUI::Version) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==  Address 0x1561f170 is 480 bytes inside an unallocated block of size 214,496 in arena "client"
==19843== 
==19843== Invalid write of size 1
==19843==    at 0x4F967FD: flipImageVertical(unsigned char*, unsigned char*, unsigned int, unsigned int) (in /usr/lib/libosg.so.3.2.0)
==19843==    by 0x4F96F2C: osg::Image::flipVertical() (in /usr/lib/libosg.so.3.2.0)
==19843==    by 0x187CFBAC: ReadDDSFile(std::istream&, bool) (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0x187D2859: ReaderWriterDDS::readImage(std::istream&, osgDB::Options const*) const (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0xA26FC6: Resource::ImageManager::getImage(std::string const&) (imagemanager.cpp:123)
==19843==    by 0xB20744: osgMyGUI::OSGTexture::loadFromFile(std::string const&) (myguitexture.cpp:89)
==19843==    by 0xB1B933: osgMyGUI::RenderManager::getTexture(std::string const&) (myguirendermanager.cpp:552)
==19843==    by 0x89A8347: MyGUI::texture_utility::getTextureSize(std::string const&, bool) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x88DD732: MyGUI::ImageBox::setItemResourceInfo(MyGUI::ImageIndexInfo const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x76A077: MWGui::ResourceImageSetPointerFix::setImage(MyGUI::ImageBox*) (cursor.cpp:51)
==19843==    by 0x8935C89: MyGUI::PointerManager::setPointer(std::string const&, MyGUI::Widget*) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x893647A: MyGUI::PointerManager::_load(MyGUI::xml::Element*, std::string const&, MyGUI::Version) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==  Address 0x1561f170 is 480 bytes inside an unallocated block of size 214,496 in arena "client"
==19843== 
==19843== Invalid read of size 1
==19843==    at 0x4F96806: flipImageVertical(unsigned char*, unsigned char*, unsigned int, unsigned int) (in /usr/lib/libosg.so.3.2.0)
==19843==    by 0x4F96F2C: osg::Image::flipVertical() (in /usr/lib/libosg.so.3.2.0)
==19843==    by 0x187CFBAC: ReadDDSFile(std::istream&, bool) (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0x187D2859: ReaderWriterDDS::readImage(std::istream&, osgDB::Options const*) const (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0xA26FC6: Resource::ImageManager::getImage(std::string const&) (imagemanager.cpp:123)
==19843==    by 0xB20744: osgMyGUI::OSGTexture::loadFromFile(std::string const&) (myguitexture.cpp:89)
==19843==    by 0xB1B933: osgMyGUI::RenderManager::getTexture(std::string const&) (myguirendermanager.cpp:552)
==19843==    by 0x89A8347: MyGUI::texture_utility::getTextureSize(std::string const&, bool) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x88DD732: MyGUI::ImageBox::setItemResourceInfo(MyGUI::ImageIndexInfo const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x76A077: MWGui::ResourceImageSetPointerFix::setImage(MyGUI::ImageBox*) (cursor.cpp:51)
==19843==    by 0x8935C89: MyGUI::PointerManager::setPointer(std::string const&, MyGUI::Widget*) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x893647A: MyGUI::PointerManager::_load(MyGUI::xml::Element*, std::string const&, MyGUI::Version) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==  Address 0x1561ef44 is 0 bytes after a block of size 5,460 alloc'd
==19843==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19843==    by 0x187CF54F: ReadDDSFile(std::istream&, bool) (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0x187D2859: ReaderWriterDDS::readImage(std::istream&, osgDB::Options const*) const (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0xA26FC6: Resource::ImageManager::getImage(std::string const&) (imagemanager.cpp:123)
==19843==    by 0xB20744: osgMyGUI::OSGTexture::loadFromFile(std::string const&) (myguitexture.cpp:89)
==19843==    by 0xB1B933: osgMyGUI::RenderManager::getTexture(std::string const&) (myguirendermanager.cpp:552)
==19843==    by 0x89A8347: MyGUI::texture_utility::getTextureSize(std::string const&, bool) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x88DD732: MyGUI::ImageBox::setItemResourceInfo(MyGUI::ImageIndexInfo const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x76A077: MWGui::ResourceImageSetPointerFix::setImage(MyGUI::ImageBox*) (cursor.cpp:51)
==19843==    by 0x8935C89: MyGUI::PointerManager::setPointer(std::string const&, MyGUI::Widget*) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x893647A: MyGUI::PointerManager::_load(MyGUI::xml::Element*, std::string const&, MyGUI::Version) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x895DED4: MyGUI::ResourceManager::_loadImplement(std::string const&, bool, std::string const&, std::string const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843== 
==19843== Invalid write of size 1
==19843==    at 0x4F967F9: flipImageVertical(unsigned char*, unsigned char*, unsigned int, unsigned int) (in /usr/lib/libosg.so.3.2.0)
==19843==    by 0x4F96F2C: osg::Image::flipVertical() (in /usr/lib/libosg.so.3.2.0)
==19843==    by 0x187CFBAC: ReadDDSFile(std::istream&, bool) (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0x187D2859: ReaderWriterDDS::readImage(std::istream&, osgDB::Options const*) const (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0xA26FC6: Resource::ImageManager::getImage(std::string const&) (imagemanager.cpp:123)
==19843==    by 0xB20744: osgMyGUI::OSGTexture::loadFromFile(std::string const&) (myguitexture.cpp:89)
==19843==    by 0xB1B933: osgMyGUI::RenderManager::getTexture(std::string const&) (myguirendermanager.cpp:552)
==19843==    by 0x89A8347: MyGUI::texture_utility::getTextureSize(std::string const&, bool) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x88DD732: MyGUI::ImageBox::setItemResourceInfo(MyGUI::ImageIndexInfo const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x76A077: MWGui::ResourceImageSetPointerFix::setImage(MyGUI::ImageBox*) (cursor.cpp:51)
==19843==    by 0x8935C89: MyGUI::PointerManager::setPointer(std::string const&, MyGUI::Widget*) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x893647A: MyGUI::PointerManager::_load(MyGUI::xml::Element*, std::string const&, MyGUI::Version) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==  Address 0x1561ef44 is 0 bytes after a block of size 5,460 alloc'd
==19843==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19843==    by 0x187CF54F: ReadDDSFile(std::istream&, bool) (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0x187D2859: ReaderWriterDDS::readImage(std::istream&, osgDB::Options const*) const (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0xA26FC6: Resource::ImageManager::getImage(std::string const&) (imagemanager.cpp:123)
==19843==    by 0xB20744: osgMyGUI::OSGTexture::loadFromFile(std::string const&) (myguitexture.cpp:89)
==19843==    by 0xB1B933: osgMyGUI::RenderManager::getTexture(std::string const&) (myguirendermanager.cpp:552)
==19843==    by 0x89A8347: MyGUI::texture_utility::getTextureSize(std::string const&, bool) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x88DD732: MyGUI::ImageBox::setItemResourceInfo(MyGUI::ImageIndexInfo const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x76A077: MWGui::ResourceImageSetPointerFix::setImage(MyGUI::ImageBox*) (cursor.cpp:51)
==19843==    by 0x8935C89: MyGUI::PointerManager::setPointer(std::string const&, MyGUI::Widget*) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x893647A: MyGUI::PointerManager::_load(MyGUI::xml::Element*, std::string const&, MyGUI::Version) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x895DED4: MyGUI::ResourceManager::_loadImplement(std::string const&, bool, std::string const&, std::string const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843== 
==19843== Invalid read of size 1
==19843==    at 0x4F967F0: flipImageVertical(unsigned char*, unsigned char*, unsigned int, unsigned int) (in /usr/lib/libosg.so.3.2.0)
==19843==    by 0x4F96F2C: osg::Image::flipVertical() (in /usr/lib/libosg.so.3.2.0)
==19843==    by 0x187CFBAC: ReadDDSFile(std::istream&, bool) (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0x187D2859: ReaderWriterDDS::readImage(std::istream&, osgDB::Options const*) const (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0xA26FC6: Resource::ImageManager::getImage(std::string const&) (imagemanager.cpp:123)
==19843==    by 0xB20744: osgMyGUI::OSGTexture::loadFromFile(std::string const&) (myguitexture.cpp:89)
==19843==    by 0xB1B933: osgMyGUI::RenderManager::getTexture(std::string const&) (myguirendermanager.cpp:552)
==19843==    by 0x89A8347: MyGUI::texture_utility::getTextureSize(std::string const&, bool) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x88DD732: MyGUI::ImageBox::setItemResourceInfo(MyGUI::ImageIndexInfo const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x76A077: MWGui::ResourceImageSetPointerFix::setImage(MyGUI::ImageBox*) (cursor.cpp:51)
==19843==    by 0x8935C89: MyGUI::PointerManager::setPointer(std::string const&, MyGUI::Widget*) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x893647A: MyGUI::PointerManager::_load(MyGUI::xml::Element*, std::string const&, MyGUI::Version) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==  Address 0x1561ef45 is 1 bytes after a block of size 5,460 alloc'd
==19843==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19843==    by 0x187CF54F: ReadDDSFile(std::istream&, bool) (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0x187D2859: ReaderWriterDDS::readImage(std::istream&, osgDB::Options const*) const (in /usr/lib/osgPlugins-3.2.0/osgdb_dds.so)
==19843==    by 0xA26FC6: Resource::ImageManager::getImage(std::string const&) (imagemanager.cpp:123)
==19843==    by 0xB20744: osgMyGUI::OSGTexture::loadFromFile(std::string const&) (myguitexture.cpp:89)
==19843==    by 0xB1B933: osgMyGUI::RenderManager::getTexture(std::string const&) (myguirendermanager.cpp:552)
==19843==    by 0x89A8347: MyGUI::texture_utility::getTextureSize(std::string const&, bool) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x88DD732: MyGUI::ImageBox::setItemResourceInfo(MyGUI::ImageIndexInfo const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x76A077: MWGui::ResourceImageSetPointerFix::setImage(MyGUI::ImageBox*) (cursor.cpp:51)
==19843==    by 0x8935C89: MyGUI::PointerManager::setPointer(std::string const&, MyGUI::Widget*) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x893647A: MyGUI::PointerManager::_load(MyGUI::xml::Element*, std::string const&, MyGUI::Version) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843==    by 0x895DED4: MyGUI::ResourceManager::_loadImplement(std::string const&, bool, std::string const&, std::string const&) (in /usr/lib/libMyGUIEngine.so.3.2.1)
==19843== 
It looks like some DDS textures in openmw-template are triggering a bug in the OSG 3.2 DDS reader that has already been fixed in OSG 3.4. I haven't gone over the changes to see what the fix was, a git bisect might tell you that.
Last edited by scrawl on 10 Feb 2016, 23:42, edited 1 time in total.

User avatar
psi29a
Posts: 4736
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Cell preloading

Post by psi29a » 10 Feb 2016, 23:42

OK... I narrowed it down. The problem exists between these two commits:
commit 6ac688c0e2e16e4eec74ed5ef2d6a1a05a367d66
Author: scrawl <[email protected]>
Date: Fri Feb 5 19:28:52 2016 +0100

Change the way that texture filtering setting changes are applied at runtime to not require keeping a reference to textures

The references would be difficult to clean up because there may or may not be another reference to the texture in the osgDB::SharedStateManager.
^-- working
commit e8662bea3133ba9dbb09b86c3abb1af39425e90d
Author: scrawl <[email protected]>
Date: Fri Feb 5 20:23:41 2016 +0100

Change the way that image origin is converted to OpenGL's lower-left convention
^-- not working

Post Reply