[physfs] Possible PhysFS bug?

Edward Rudd eddie at omegaware.com
Tue May 8 09:44:55 EDT 2007

Jeremy wrote:
> 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.

Is the return value of the PHYSFS_deinit call set correctly to 1? or is
an error thrown?

> 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.

You may want to write a small test app that runs outside of enemy
territory that recreates the bug and run it through the debugger being
careful to watch the 2 calls to closeFileHandleList() that occur from
PHYSFS_deinit (the second is from within freeSearchPath called by

Also, what version of PhysFS are you using?

Edward Rudd

More information about the physfs mailing list