Open SpiritQuaddicted opened 10 years ago
(Ignore most of this first part; cf. the update edit below.)
Any idea why it is using the external dzip-linux app instead of using dzlib.so? Did the console log show "Failed to load dzlib!" earlier?
In any case, a weird thing: it should be forking off dzip-linux both for the demo compress as well as for the verification. But that strace output only shows one child exit. I think it's for the compress. So what happened to the verification?
It's like the execvp in DZStartProcess failed (I don't think we'd see the Con_Printf in that case since the child process is doing it) but I don't know why execvp would work in the compress case but fail in the verify case.
Well... sleepytime now.
Quick edit: Actually it looks like the external app was used for compression because for some reason reQuiem will preferentially use the app (if available) over the library for compression. But for verification it will always use the library if it's available. Soooo that means that Dzip_Verify is returning false. Given that strace doesn't even show the dz file being opened, that means something is up with dzlib.so.
On Windows this code path works (using dzlib.dll)... I haven't explicitly traced through it, but I have made some dzipped demos. It would be worth dropping in a few debug printfs to see which part of Dzip_Verify is returning false when you use it on Linux.
Nice catch, I did not even think about that. Above examples were using dzlib.so. If I rename dzlib.so and thus force reQuiem to use the dzip-linux binary, demo compression works:
[02]Failed to load dzlib! (dzlib.so: cannot open shared object file: No such file or directory)
...
...
[02]Introduction
Playing audio track track004.ogg from id1
SpiritQuaddict entered the game
]record
recording to ./id1/start-Jul-02-2014-150245-SpiritQuaddict.dem
]stop
Completed demo
compressing start-Jul-02-2014-150245-SpiritQuaddict.dem (81.1%)
start-Jul-02-2014-150245-SpiritQuaddict.dz created using v2.9
checking start-Jul-02-2014-150245-SpiritQuaddict.dem: ok
Compressing demo... Verifying start-Jul-02-2014-150245-SpiritQuaddict.dz... Deleting start-Jul-02-2014-150245-SpiritQuaddict.dem... Done!
]quit
Client SpiritQuaddict removed
I wonder if there is any benefit of using the library instead of the binary for now. I think we do not have the source for the library while dzip-linux is freely available at http://speeddemosarchive.com/dzip/download.html . Of course using a library would be "cleaner".
I've been messing around with using the app and/or the library as part of debugging issue #30. I did come across a downside to using the app, filed as issue #43.
Both dz and zip compression fail for me. Archlinux 64 bit.
Ignore the different timestamps and percentages.
Engine stdout
strace -e file
The code handling this is in https://github.com/SpiritQuaddicted/reQuiem/blob/e976d4d4a1afc1da80ac102b7a1033a7d2b1741b/cl_demo.c