Lumina icon indicating copy to clipboard operation
Lumina copied to clipboard

Some LGB files are parsed incorrectly and fail

Open ff-meli opened this issue 5 years ago • 4 comments

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.

ff-meli avatar Mar 17 '20 18:03 ff-meli

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 avatar Mar 17 '20 22:03 NotAdam

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.

ff-meli avatar Mar 18 '20 09:03 ff-meli

fixed in https://github.com/NotAdam/Lumina/pull/4

takhlaq avatar Jul 04 '20 16:07 takhlaq

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

NotAdam avatar Jul 07 '20 00:07 NotAdam