erkle64 / Duplicationer

Copy paste tool for the game Foundry.
MIT License
6 stars 1 forks source link

Odd issue with selecting previously saved blueprints #2

Closed SciMan314 closed 3 weeks ago

SciMan314 commented 3 weeks ago

There is an odd issue I am having where I am trying to load previously saved blueprints of mine but they are unable to be selected in the blueprint selection screen. I don't remember the exact number of blueprints I had saved but I was most of the way thru the third row of blueprints in the main folder. I hadn't made any sub-folders yet but I appear to be able to still do so even with this bug happening. That's WHEN the issue showed up, here's WHAT happened: I saved one more blueprint, and now when I try to load any blueprints I only see the first 5 that I had saved at that time. I can apparently create subfolders and they show up fine, but it is the contents of the main blueprints folder that I wish to access, and can't select them because their GUI elements don't exist (clicking in empty spaces does nothing).

The second issue I'm having (which may or may not be linked to the first, but they showed up at the same instant) is that when I click the "load" button in the blueprint panel, the blueprint selection GUI does show up like it should, but my mouse cursor doesn't show up and moving the mouse shifts my point of aim instead of moving around a mouse cursor. If I hit "esc" a few times, it does the following:

  1. "does nothing" (but because of what it does next I know that it's probably acting like I told it to exit out of the "select a blueprint to load" screen,
  2. exits out of the Blueprint Panel,
  3. If I had anything in the blueprint clipboard, the third press will exit out of the Blueprint mode of the Tablet (as if I had pressed K), and this returns me to the "normal Foundry experience without Duplicationer"

The closest thing I can give for "instructions to reproduce" is to just save (or download) a whole lot of blueprints into the main folder without any subfolders, that's what happened naturally to me and I think the issue showed up when the 4th row of blueprints to display was supposed to be rendered. Not 100% sure about exactly when it showed up but I know that 50 blueprints of different things in the main folder SHOULD be more than enough to make the issue show up, because I know that I had less than that when the issue showed up.

Here's my complete mod list right now: Unfoundry Configurator BulkDemolishTerrain Duplicationer (this mod I'm submitting a bug report about at this moment) InventorySortOrder FarPainter (could uninstall this one, don't really paint or decorate much, it's all about "build more factory" for me so far) StackMultiplier OreMultiplier FastMiner FastEscalators Embiggenator FoundryCommands (could uninstall this one too, haven't done a thing with it but I thought it might be useful) WaterPlacer Research Queue Cargo Destinations

That's all the mods I have installed right now, but up to this point I've had zero problems that would indicate that anything's incompatible with anything else.

System specs (general consensus: Massively overkill for a simple Unity game like Foundry): CPU: Intel Core i7-9700k (overclocked to 4.6ghz from 3.6ghz stock, never had so much as a hiccup that I can blame on the overclock or the CPU itself being faulty since I built this PC in 2019) (water cooled, custom water cooling loop, thermals never exceed 50c) GPU: Nvidia RTX 3070 Ti (also water cooled on the same loop as the CPU, likewise thermals never exceed 50c) RAM: 32GB DDR4-3200 CL14-14-14-39 (G.Skill Ripjaws V, it's the good "Samsung B-Die" stuff and yes I know CL14 is crazy but those are the XMP defaults that it's always run at flawlessly) Mobo: Asus ROG Maximus XI Hero (Wi-Fi) Z390 Gaming motherboard LGA1151 socket (PCIe 3.0 mobo, best I could get at the time) Storage (OS): Samsung 1tb "960 PRO" M.2 NVMe SSD Storage (Games): Samsung 2TB "970 PRO" M.2 NVMe SSD Storage (Media and non-critical files) WD Blue 1TB 7200rpm 512MB cache HDD (none of my games are stored here) Storage (Games from old PC) Samsung 128GB SATA SSD (I have mostly transferred all of these games to other SSD's) Montior: Asus ROG XG43UQ (43" 4k 144hz, supports HDR and DSC, connected to GPU via DisplayPort cable, but I have the game's settings limiting it to 1080p 60fps so that my room stays cooler in the summer)

SciMan314 commented 3 weeks ago

One final detail I appear to have left out, it seems that I can still save and over-write new and existing blueprints without issue, it seems to be confined purely to LOADING blueprints. Still have no idea what is going on, but I wish I could provide more detail that is relevant.

erkle64 commented 3 weeks ago

Thanks for the detailed report. If you could attach %AppData%\..\LocalLow\Channel 3 Entertainment\Foundry\Player.log that would help a lot.

SciMan314 commented 3 weeks ago

Here you go! (I've never cleared that file since I installed the game, but I replicated the bug in the most recent play session, hope that helps you find the issue in that text file) Player.log

SciMan314 commented 3 weeks ago

Would love to see this fixed soon (if it's easy, but knowing a little bit of coding chances are it's not easy), so I'm checking back in on this frequently. EDIT: If you need anything else, please let me know and I'll try to provide it as soon as I'm aware of the request.

erkle64 commented 3 weeks ago

Are you using an out-of-date version of Duplicationer? The error in the log suggests you've got a blueprint saved with v0.4.20 and are using a version from before v0.4.20.

SciMan314 commented 3 weeks ago

As far as I know I'm not using an out of date version? Besides the issue showed up in the middle of a play session, not after a restart. I think I've been updating my mods every time I run the game, unless that's not what the "Apply and run Foundry with Steam" button does in Foundry Mod Manager. EDIT: I've been using this mod for a while now, but I've never downloaded blueprints from anyone else, and if I've never updated Duplicationer that means that I can't have created a blueprint with a newer version than the one I'm using.

erkle64 commented 3 weeks ago

The file causing the error is called Olumic Acid Tileable Slice.ebp. If you can attach that I should be able to investigate it further.

I'm working on a Duplicationer update at the moment. I'll include some code to ignore any kind of corrupted blueprints in that, so you'll at least be able to see the valid ones.

erkle64 commented 3 weeks ago

Actually, upon further reading, Olumic Acid Tileable Slice.ebp was the last blueprint saved, not the one that caused the error. I don't think I'll be able to track it down until I upload v0.4.21.

erkle64 commented 3 weeks ago

I've just uploaded v0.4.21 which includes try/catch that should ignore blueprints that fail to load. In theory it should mean you'll see all the valid blueprints and just the corrupted one will be missing. It will also name the invalid blueprint in Player.log.

SciMan314 commented 3 weeks ago

Had some family obligations to take care of but I'm about to start up Foundry again, I'll try loading and saving blueprints so that if anything weird happens it should get caught in the Player.log, and even if it's all normal I'll still upload Player.log so that you have an opportunity to see if anything weird happened (or which blueprint was causing the issue). If I look thru Player.log on my own (after I upload it) and see a clue of what's corrupted, I'll probably upload the corrupted blueprint here (if it's not too gigantic) too, that way you get a chance to look and see how it got corrupted.

SciMan314 commented 3 weeks ago

Seems everything is operating normally once again, as promised here's the player.log from that short play session: Player.log

erkle64 commented 3 weeks ago

Thanks. It looks like the issue is in 4T2Belt T2Container Buffer Start.

SciMan314 commented 3 weeks ago

Looked thru Player.log some in Notepad++, searching "error" quickly brought up the following: duplicationer: Error loading blueprint info from 'C:/Users/Aaron/AppData/LocalLow/Channel 3 Entertainment/Foundry\duplicationer\4T2Belt T2Container Buffer Start.ebp': System.FormatException: Too many bytes in what should have been a 7 bit encoded Int32. at System.IO.BinaryReader.Read7BitEncodedInt () [0x00013] in <653ac7e66c1d432d801567dc13c77d18>:0 at System.IO.BinaryReader.ReadString () [0x0000f] in <653ac7e66c1d432d801567dc13c77d18>:0 at Duplicationer.Blueprint.TryLoadFileHeader (System.String path, Duplicationer.Blueprint+FileHeader& header, System.String& name) [0x000e0] in <c52c897971324fc9ad87d6671925acbd>:0 at Duplicationer.LibraryFrame.FillLibraryGrid (System.String relativePath, Duplicationer.SaveFrame saveFrame) [0x0043e] in <c52c897971324fc9ad87d6671925acbd>:0 duplicationer: Idle: 503.8883 431.2659 duplicationer: Idle: 508.9724 431.2659 duplicationer: Idle: 510.7412 431.2659 duplicationer: Idle: 546.2552 431.2659 duplicationer: Error loading blueprint info from 'C:/Users/Aaron/AppData/LocalLow/Channel 3 Entertainment/Foundry\duplicationer\4T2Belt T2Container Buffer Start.ebp': System.FormatException: Too many bytes in what should have been a 7 bit encoded Int32. at System.IO.BinaryReader.Read7BitEncodedInt () [0x00013] in <653ac7e66c1d432d801567dc13c77d18>:0 at System.IO.BinaryReader.ReadString () [0x0000f] in <653ac7e66c1d432d801567dc13c77d18>:0 at Duplicationer.Blueprint.TryLoadFileHeader (System.String path, Duplicationer.Blueprint+FileHeader& header, System.String& name) [0x000e0] in <c52c897971324fc9ad87d6671925acbd>:0 at Duplicationer.LibraryFrame.FillLibraryGrid (System.String relativePath, Duplicationer.SaveFrame saveFrame) [0x0043e] in <c52c897971324fc9ad87d6671925acbd>:0 duplicationer: Idle: 550.2012 431.2659 duplicationer: Idle: 555.0146 431.2659 duplicationer: Idle: 555.8745 431.2659 And here's that blueprint so you can investigate what went wrong with it (rename to .ebp after downloading since Github doesn't support it natively): 4T2Belt T2Container Buffer Start.txt

SciMan314 commented 3 weeks ago

Now that you told me what you're looking for specifically, I can offer a little more help than I was before, hope this all helps you track down what went wrong! In any case now that I've uploaded it, I'm going to move it out of that folder so it stops throwing errors for no good reason.

erkle64 commented 3 weeks ago

Thanks. I'll see if I can find the cause. Presumably the blueprint saving code did something wrong with that one blueprint.

erkle64 commented 3 weeks ago

Tracked the issue down to the rename blueprint code. It wasn't updated for v0.4.20 blueprints. That blueprint was unrecoverable, but I've released v0.4.22 with the fix to stop it happening again.

erkle64 commented 3 weeks ago

Also, thanks for all the help. You've been very helpful.

SciMan314 commented 3 weeks ago

I know what I saved in that blueprint, so it being unrecoverable isn't a problem, I still have the save file with that construction in it so I can just re-save it again if I desire to. Glad I was able to help track it down regardless!