Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache update fails with numerous mods #3217

Open
Bob-Z opened this issue Jan 22, 2025 · 2 comments
Open

Cache update fails with numerous mods #3217

Bob-Z opened this issue Jan 22, 2025 · 2 comments

Comments

@Bob-Z
Copy link
Contributor

Bob-Z commented Jan 22, 2025

This bug happens on Linux. I didn't check on Windows.

When starting RoR with many (> 1000) new mods files, the update fails and there is no mods available in RoR's content selector.

To reproduce this: remove all files from "mods" directory. Start RoR: 0 mods available, this is correct ! Exit from RoR. Put more than 1000 mods files in "mods" directory. Start RoR: still 0 mods available.

I think we reach the maximum open file limit (which is 1024 on my system).
If I type "ulimit -n 4096" before running RoR, everything is working correctly.

Error in RoR.log:

15:21:31: FileNotFoundException: Cannot open file: mods.cache in create at /home/runner/.conan2/p/b/ogre393a60adbaf6f6/b/OgreMain/src/OgreFileSystem.cpp (line 431)
15:21:31: [RoR] Error writing JSON file 'mods.cache' (resource group 'Cache'), message: 'FileNotFoundException: Cannot open file: mods.cache in create at /home/runner/.conan2/p/b/ogre393a60adbaf6f6/b/OgreMain/src/OgreFileSystem.cpp (line 431)'
15:21:31: FileNotFoundException: Cannot open file: /home/bobz/.rigsofrods/cache/mods.cache in _openFileStream at /home/runner/.conan2/p/b/ogre393a60adbaf6f6/b/OgreMain/src/OgreFileSystem.cpp (line 388)
15:21:31: [RoR|ModCache] Error, cache file still invalid after check/update, content selector will be empty.
15:21:31: [RoR|ModCache] Cache loaded

@CuriousMike56
Copy link
Member

This is definitely exclusive to Linux, I've never encountered this under Windows with over 2k files installed.

@ohlidalp
Copy link
Member

If I type "ulimit -n 4096" before running RoR, everything is working correctly.

Thanks for the thorough investigation, I'm no Linux user so I wouldn't even know this command.

Unfortunately, this appears to be related to OGRE framework which we use for resource management. Our code examines the files strictly one-by-one, we never keep more than ~5 streams open (ZIP, thumbnail, document, cachefile...). To make things worse, we use an outdated OGRE (1.11.6) version so I can't even request support. This may also be related to the 3rd party ZIP archive library used by OGRE (zziplib for 1.11x, libz since 1.13).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants