/home/nemo/.hedgewars/Data/wrapper.hwp - //Scripts/Multiplayer/birdy.lua fileName: /Scripts/Multiplayer/birdy.hwp dir: /Scripts/Multiplayer/birdy.hwp attempting handle mount: /Scripts/Multiplayer/birdy.hwp Debug Debug2 Debug3 Debug4 Debug5 1 [XYZZY] is in the search path. [/home/nemo/.hedgewars/Data/wrapper.hwp] is in the search path. [/home/nemo/.hedgewars/Data/kobewis-themes-official-edition.hwp] is in the search path. [/home/nemo/.hedgewars/Data/NewThemesByLuelle_v2.hwp] is in the search path. [/home/nemo/.hedgewars/Data] is in the search path. [/home/nemo/.hedgewars] is in the search path. [/home/nemo/games/Data] is in the search path. ... ... .. .. Loading /Graphics/Birdy.png [flags: 7] XYZZY - /Graphics/Birdy.png An unhandled exception occurred at $0000000000000000 : EAccessViolation : Access violation $0000000000000000 $00007F147377A4DE $00007F147376C946 $00007F147377CE8F $00007F147377D179 $00007F1473770E24 $00007F1473990498 $00000000004A765D $000000000043EE09 $000000000043F0ED $000000000043F12D $000000000043E1A0 $0000000000404F6B $0000000000405B84 $000000000040645A $00000000004064C3 $0000000000406917 (gdb) bt #0 0x0000000000000000 in ?? () #1 0x00007f40eb961273 in mz_inflateInit2 (pStream=0x66ef258, window_bits=-15) at /home/nemo/hg/hedgewars/clean/misc/libphysfs/physfs_miniz.h:535 #2 0x00007f40eb9624de in ZIP_duplicate (io=0x2b67ff0) at /home/nemo/hg/hedgewars/clean/misc/libphysfs/archiver_zip.c:475 #3 0x00007f40eb954946 in handleIo_duplicate (io=0x2b69440) at /home/nemo/hg/hedgewars/clean/misc/libphysfs/physfs.c:426 #4 0x00007f40eb964e8f in zip_get_io (io=0x2b69440, inf=0x2b694a0, entry=0x2b69930) at /home/nemo/hg/hedgewars/clean/misc/libphysfs/archiver_zip.c:1642 #5 0x00007f40eb965179 in ZIP_openRead (opaque=0x2b694a0, filename=0x7ffe57926678 "Graphics/Birdy.png") at /home/nemo/hg/hedgewars/clean/misc/libphysfs/archiver_zip.c:1702 #6 0x00007f40eb958e24 in PHYSFS_openRead ( _fname=0x873b10 "/Graphics/Birdy.png") at /home/nemo/hg/hedgewars/clean/misc/libphysfs/physfs.c:2473 #7 0x00007f40ebb78498 in PHYSFSRWOPS_openRead ( fname=0x873b10 "/Graphics/Birdy.png") at /home/nemo/hg/hedgewars/clean/misc/libphyslayer/physfsrwops.c:212 #8 0x00000000004a765d in RWOPSOPENREAD (FNAME=...) at uPhysFSLayer.pas:76 #9 0x000000000043ee09 in LOADIMAGE (FILENAME=..., IMAGEFLAGS=7) at uStore.pas:640 #10 0x000000000043f0ed in LOADDATAIMAGE (PATH=PTGRAPHICS, FILENAME=..., IMAGEFLAGS=7) at uStore.pas:688 #11 0x000000000043f12d in LOADDATAIMAGEALTPATH (PATH=PTGRAPHICS, ALTPATH=PTNONE, FILENAME=..., IMAGEFLAGS=7) at uStore.pas:699 #12 0x000000000043e1a0 in STORELOAD (RELOAD=false) at uStore.pas:426 #13 0x0000000000404f6b in DOTIMER (LAG=2041) at hwengine.pas:89 #14 0x0000000000405b84 in MAINLOOP () at hwengine.pas:306 #15 0x000000000040645a in GAMEROUTINE () at hwengine.pas:454 #16 0x00000000004064c3 in GAME () at hwengine.pas:460 #17 0x0000000000406917 in main () at hwengine.pas:634 (gdb) quit PHYSFS_DECL void hedgewarsMountPackage(char * fileName) { int fileNameLength = strlen(fileName); int dirLength = 0; printf("fileName: %s\n",fileName); if (fileNameLength > 4) if (strcmp(fileName + fileNameLength - 4, ".hwp") == 0) { const char * dir = PHYSFS_getRealDir(fileName); if(dir) { printf("dir: %s\n",fileName); dirLength = strlen(dir); if (dirLength > 4) { if (strcmp(dir + dirLength - 4, ".hwp") == 0) { printf("attempting handle mount: %s\n",fileName); PHYSFS_File* physDir = PHYSFS_openRead(fileName); if (!physDir) printf(PHYSFS_getLastError()); PHYSFS_mountHandle(physDir, "XYZZY", NULL, 0); char **i; for (i = PHYSFS_getSearchPath(); *i != NULL; i++) printf("[%s] is in the search path.\n", *i); } else { char * fullPath = (char *)malloc(strlen(dir) + fileNameLength + 2); strcpy(fullPath, dir); strcat(fullPath, "/"); strcat(fullPath, fileName); printf("attempting normal mount: %s\n",fullPath); PHYSFS_mount(fullPath, NULL, 0); free(fullPath); } DEBUG STUFF int PHYSFS_exists(const char *fname) { if (PHYSFS_getRealDir(fname) != NULL) printf("%s - %s\n",PHYSFS_getRealDir(fname),fname); return (PHYSFS_getRealDir(fname) != NULL); } /* PHYSFS_exists */ MORE DEBUG STUFF int PHYSFS_mountHandle(PHYSFS_File *file, const char *fname, const char *mountPoint, int appendToPath) { int retval = 0; PHYSFS_Io *io = NULL; printf("Debug\n"); BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0); printf("Debug2\n"); io = __PHYSFS_createHandleIo(file); printf("Debug3\n"); BAIL_IF_MACRO(!io, ERRPASS, 0); printf("Debug4\n"); retval = doMount(io, fname, mountPoint, appendToPath); printf("Debug5 %d\n", retval); if (!retval) { printf("Debug6\n"); /* docs say not to destruct in case of failure, so cheat. */ io->opaque = NULL; io->destroy(io); } /* if */ return retval; } /* PHYSFS_mountHandle */