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

Some LGB files are parsed incorrectly and fail #3

Open
ff-meli opened this issue Mar 17, 2020 · 4 comments
Open

Some LGB files are parsed incorrectly and fail #3

ff-meli opened this issue Mar 17, 2020 · 4 comments
Labels
bug Something isn't working file parsing Parsing game data files

Comments

@ff-meli
Copy link

ff-meli commented Mar 17, 2020

There seem to be multiple different issues, but I only have details on one so far.

A number of planner.lgb files have a chunk header that is seemingly different from others, and will parse incorrectly and throw an OOM exception due to an invalid layer count being read from the chunk header.

One example of this is bg/ffxiv/wil_w1/twn/w1t1/level/planner.lgb

In that particular file, it appears that the actual chunk header (the 'LGP1' magic) starts at byte 32, instead of byte 12 as the code assumes. Byte 12 is a 0x1, followed by all 0s until byte 32, so I'm not sure what if anything might ever go there.

Unfortunately, the general structure still seems wrong even accounting for the unexplained 20 bytes (ie, reading the header from where LGP1 is found will still result in incorrect data for at least some fields)

This doesn't occur with every planner file, but it does happen with a number of them.

@NotAdam
Copy link
Owner

NotAdam commented Mar 17, 2020

I'm not totally across what the difference between the two files are, but last time I checked it'd pretty much require those files in particular to be handled separately which is pretty annoying.

Is there something in particular that you need from planner files or?

@NotAdam NotAdam added bug Something isn't working file parsing Parsing game data files labels Mar 17, 2020
@ff-meli
Copy link
Author

ff-meli commented Mar 18, 2020

I don't personally have a use for this, it was just something I came across while trying to track down the issues Miu was having.

It sounded later like he probably doesn't actually need planner files either, since they don't seem to have much in them, so this can probably just be ignored, or those files skipped etc.

@takhlaq
Copy link
Contributor

takhlaq commented Jul 4, 2020

fixed in #4

@NotAdam
Copy link
Owner

NotAdam commented Jul 7, 2020

Left it open for now because I want to actually look at what the LGP shit actually is at some point

Soreepeong pushed a commit to Soreepeong/NotAdam-Lumina that referenced this issue Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working file parsing Parsing game data files
Projects
None yet
Development

No branches or pull requests

3 participants