Thread 1 "RoR" received signal SIGSEGV, Segmentation fault.
0x00007ffff78ef727 in Ogre::ResourceGroupManager::openResourceImpl (this=0x555555c792c0, resourceName="a1da0UID-nhelens.terrn2", groupName="General", searchGroupsIfNotFound=searchGroupsIfNotFound@entry=false, resourceBeingLoaded=resourceBeingLoaded@entry=0x0, throwOnFailure=true) at /home/babis/Downloads/ror-dependencies/Source/ogre/OgreMain/src/OgreResourceGroupManager.cpp:695
695 DataStreamPtr stream = pArch->open(resourceName);
(gdb) bt
#0 0x00007ffff78ef727 in Ogre::ResourceGroupManager::openResourceImpl (this=0x555555c792c0, resourceName="a1da0UID-nhelens.terrn2",
groupName="General", searchGroupsIfNotFound=searchGroupsIfNotFound@entry=false, resourceBeingLoaded=resourceBeingLoaded@entry=0x0,
throwOnFailure=true) at /home/babis/Downloads/ror-dependencies/Source/ogre/OgreMain/src/OgreResourceGroupManager.cpp:695
#1 0x000055555598caea in Ogre::ResourceGroupManager::openResource (throwOnFailure=true, resourceBeingLoaded=0x0, groupName=...,
resourceName="a1da0UID-nhelens.terrn2", this=<optimized out>)
at /home/babis/Downloads/ror-dependencies/Dependencies_Linux/include/OGRE/OgreResourceGroupManager.h:668
#2 RoR::TerrainManager::LoadAndPrepareTerrain (entry=entry@entry=0x55555806f2e0)
at /home/babis/Downloads/ror-dependencies/rigs-of-rods/source/main/terrain/TerrainManager.cpp:137
#3 0x000055555562120a in RoR::GameContext::LoadTerrain (this=<optimized out>, filename_part="a1da0UID-nhelens.terrn2")
at /home/babis/Downloads/ror-dependencies/rigs-of-rods/source/main/GameContext.cpp:114
#4 0x00005555555ed2a2 in main (argc=<optimized out>, argv=<optimized out>)
at /home/babis/Downloads/ror-dependencies/rigs-of-rods/source/main/main.cpp:516
XXX_HOME
environment variables manually? I'm currently browsing through the CMake code and up to now don't see another way how Ogre could find it.
$OGRE_HOME/include/OGRE/Hlms/Common
is not in my include paths, although I've added OGRE_INCLUDE_DIRS
, OGRE_HlmsPbs_INCLUDE_DIRS
and OGRE_HlmsUnlit_INCLUDE_DIRS
.
file
is a std::string
which contains full path (like /home/user/.rigsofrods/mods/mod.zip
)
Ogre::Archive* arc = nullptr;
try
{
arc = Ogre::ArchiveManager::getSingleton().load(file, "Zip", true);
}
catch (...) {}
if (arc != nullptr)
{
Ogre::ArchiveManager::getSingleton().unload(file);
}
Ogre::FileSystemLayer::removeFile(file);
I'm afraid I need advice how to deal with pre-existing material manipulation code.
In Rigs of Rods, we allow content creators to just specify texture files and we fill them in pre-made materials.
doc: https://docs.rigsofrods.org/vehicle-creation/fileformat-truck/#managedmaterials
materials: https://github.com/RigsOfRods/rigs-of-rods/tree/master/resources/managed_materials
code (snippet to illustrate): https://github.com/RigsOfRods/rigs-of-rods/blob/master/source/main/physics/ActorSpawner.cpp#L2238-L2241
It completely relied on texture_unit names which are gone in OGRE13 - the name is now set to texture_alias and even that is deprecated.
The logged warning suggests using variables, but I can't find any API to define them in code - is there such option?
I realize I have resarch of RTSS to do, but if I can get some beginner tips it would be great.
findResourceFileInfo()
https://github.com/RigsOfRods/rigs-of-rods/blob/master/source/main/resources/CacheSystem.cpp#L992