Sign in to follow this  
DrEvil

PhysFS bug?

Recommended Posts

DrEvil    1148
I have created a dll addon to a game(Enemy Territory). Inside that addon I use the PhysFS file system. Great library btw. It recently came to my attention that there appears to be a bug in linux with PhysFS. Here's a rundown of how it works. The game loads the dll newly every map change. Inside my dll I am mounting 3 folders for use in my file system. During unloading of the dll I call PHYSFS_deinit, which should release all mounted assets, I have verified this is all getting called as expected. The problem is that every time the game re-loads the dll, despite the previous load being PHYSFS_deinit'ed, it doesn't seem to free the handle to those 3 folders. the lsof command shows handles building up and building up, until some of our users recently started reporting an error with too many files open after running for several days. This seems like a PhysFS bug, as I would expect PHYSFS_deinit to free those handles, as its documentation suggests as well. Anyone have any ideas of how to fix this? Another interesting thing, though currently I file this under differences in the file system. If I run process explorer for the same process in windows, those 3 folders don't show up under the handles for the process, so I'm sort of assuming maybe the mounting process works differently between windows and linux.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this