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

Semi-frequent crash when zoning #102

Closed
brainiac opened this issue Jun 11, 2020 · 0 comments
Closed

Semi-frequent crash when zoning #102

brainiac opened this issue Jun 11, 2020 · 0 comments
Assignees
Labels
bug plugin Issue pertains to the MQ2Nav plugin
Projects
Milestone

Comments

@brainiac
Copy link
Owner

The decompression routine used to open a navmesh file will dynamically resize the output buffer every block of memory that is read. This leads to a large number of allocations, potentially exhausting the available memory pool if it is heavily fragmented.

@brainiac brainiac added the bug label Jun 11, 2020
@brainiac brainiac added this to the MQ2Nav 1.3.3 milestone Jun 11, 2020
@brainiac brainiac self-assigned this Jun 11, 2020
@brainiac brainiac added the plugin Issue pertains to the MQ2Nav plugin label Jun 11, 2020
brainiac added a commit that referenced this issue Jun 11, 2020
Tries to prevent out-of-memory errors when loading nav mesh.

Introduce v5 mesh header which adds the following fields to the mesh file:
- header size (#104)
- decompressed size

The header size is used for forwards compatibility, in case we want to add
additional optional fields to the header in the future.

The decompressed size is so that we know how big the mesh data is. If we
don't have the decompressed size (v4 header) then we will decompress the
data twice - once to determine the size of the buffer.

This is all to fix the large number of allocations that are occurring in
the buffer because we don't know how large it should be.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug plugin Issue pertains to the MQ2Nav plugin
Projects
MQ2Nav
  
Awaiting triage
Development

No branches or pull requests

1 participant