Closed dpogue closed 1 year ago
@Hoikas I had the same thought... except that this appears to be consistent with the behaviour from before https://github.com/H-uru/Plasma/pull/264 was merged 🤷🏼♂️
Let's go ahead and preemptively fix that problem so we don't have any land mines waiting on us. Cyan tended to be pretty good about limiting themselves one or two PRPs per max file, but we need to be more resilient due to not being on the other side of the hallway from our users 😉
I exported the Nexus max files with this, and it appears that all the Object IDs are sequential.
So, it occurs to me that this has the same problem that libhsplasma had previously. What's happening here is that a PRP's ObjIDs are being sorted, then the PRP is written. Then, the next PRP's ObjIDs are sorted and the PRP is written. So, any cross-page references between PRPs may be shattered due to wrong ObjIDs being written if a reference is written out to another PRP before the other PRP is sorted. Therefore, the PrepForWrite function needs to be called on all RegistryPageNodes before any PRP is written.