Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: ezquake hangs on loading gpl maps in gpl maps pk3 #885

Open
ciscon opened this issue Jan 3, 2024 · 3 comments · Fixed by #891
Open

BUG: ezquake hangs on loading gpl maps in gpl maps pk3 #885

ciscon opened this issue Jan 3, 2024 · 3 comments · Fixed by #891
Assignees

Comments

@ciscon
Copy link
Collaborator

ciscon commented Jan 3, 2024

Client hangs when loading a gpl map from the pk3, if you explode them everything is fine. This problem was introduced with the api16 commit:

commit fbcf8a8 (HEAD)
Author: @qqshka ibolsunov@wallarm.com
Date: Sun Oct 22 05:21:18 2023 +0400

SERVER: add support for API16 so we could run latest KTX

Seems like there is some issues, minor testing was done under MacOS,
had to compile without optimizations since it crashed with optimizations,
unfortunatelly it doesn't crash without optimizations so was not able to debug it.

Also need to revisit cmodel.c since during "merge" it lost recent sanity checks validations.
@ciscon
Copy link
Collaborator Author

ciscon commented Jan 30, 2024

using the old cm_loadmap function in cmodel.c (and all the functions it calls) everything works fine, otherwise it just spins at
unzReadCurrentFile(vfsz->parent->handle, buffer, sizeof(buffer));
inside of vfs_zip.c.

it looks like the new cm_loadmap calls cm_openmap which does an fs_openvfs call and that's what does it, i assume this has all already been done in the client as the old function just loads it directly with fs_loadtempfile.

@ciscon
Copy link
Collaborator Author

ciscon commented Jan 30, 2024

@dsvensson could you take a look at this?

@dsvensson
Copy link
Collaborator

dsvensson commented Jan 31, 2024

Doesn't hang here, but it executes code labeled as Com_DPrintf("VFSZIP_MakeActive: Shockingly inefficient\n") and ends up not finding a map that has an entry in gpl_maps.pk3. Perhaps that code path in ezQuake has not been used before as cmodel.c used to just scoop up everything including textures in memory even on servers. I'll see if I can find something.

dsvensson added a commit to qw-ctf/ezquake-source that referenced this issue Jan 31, 2024
Most of the uses had already been removed, but remained in the case of a
seek. As cmodel now uses seeks during checksum, this uncovered the last
use case.

As iscompressed wasn't set, the vfsz->defer remained NULL, and thus
reading of pk3 content after a seek failed.

The origin of this file is FTE, ideally a newer version is imported but
the rest of the FTE VFS guts has evolved since last import.

fixes QW-Group#885
ciscon pushed a commit that referenced this issue Jan 31, 2024
Most of the uses had already been removed, but remained in the case of a
seek. As cmodel now uses seeks during checksum, this uncovered the last
use case.

As iscompressed wasn't set, the vfsz->defer remained NULL, and thus
reading of pk3 content after a seek failed.

The origin of this file is FTE, ideally a newer version is imported but
the rest of the FTE VFS guts has evolved since last import.

fixes #885
@dsvensson dsvensson reopened this Oct 16, 2024
hemostx pushed a commit to hemostx/ezquake-source that referenced this issue Jan 3, 2025
Most of the uses had already been removed, but remained in the case of a
seek. As cmodel now uses seeks during checksum, this uncovered the last
use case.

As iscompressed wasn't set, the vfsz->defer remained NULL, and thus
reading of pk3 content after a seek failed.

The origin of this file is FTE, ideally a newer version is imported but
the rest of the FTE VFS guts has evolved since last import.

fixes QW-Group#885
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants