Crash when adding .zip file

Bjørn Lindeijer b.lindeijer at gmail.com
Sat Feb 19 06:56:07 EST 2005


Hi,

We're integrating PhysFS in our project, The Mana World, at the
moment. It seems like a wonderful project that will just fit out needs
in terms of package manament.

We got it to compile, link and run, but now I'm stuck on a crash when
I'm adding a .zip file. Here is the backtrace:

#0  0xb7ec1fa4 in pthread_mutex_lock () from /lib/tls/libpthread.so.0
#1  0xb7d5265d in __PHYSFS_platformGrabMutex (mutex=0x0) at unix.c:572
#2  0xb7d4698b in PHYSFS_addToSearchPath (
    newDir=0x80d5ea4 "/home/bjorn/projects/tmw/data/heh.zip", appendToPath=1)
    at physfs.c:961
#3  0x0807e931 in ResourceManager::searchAndAddZipFiles (this=0x80d5688)
    at basic_string.h:1456
#4  0x0807ed05 in ResourceManager (this=0x80d5688)
    at resources/resourcemanager.cpp:48
#5  0x0807ed76 in ResourceManager::getInstance ()
    at resources/resourcemanager.cpp:172
#6  0x0804eee6 in Graphics (this=0x80d5db0) at graphic/graphic.cpp:169
#7  0x08086307 in init_engine () at main.cpp:272
#8  0x080875ba in main (argc=1, argv=0x0) at main.cpp:327

Our resource manager is a singleton object, creating itself, and then
scanning a certain directory for zip files to include in the phys
filesystem. The file heh.zip is simple a Makefile zipped up with the
"zip" utility. As you can see it crashes when we call
PHYS_addToSearchPath, somewhere in the pthread library. I've make a
debug build of PhysFS so that it shows the files and line numbers in
the library.

I hope somebody on this list can help me track this problem down. From
here I think it seems to be related to trying to grap a NULL pointer
as mutex at unix.c line 572, but I don't know what can be the cause of
that.

Thanks,
Bjørn Lindeijer



More information about the physfs mailing list