GithubHelp home page GithubHelp logo

[7z files] System.IO.FileNotFoundException: Could not find file 'C:\users\steamuser\Temp\AngelLoader\FMScan\<abc>.txt' about angelloader HOT 10 CLOSED

jonathanlinat avatar jonathanlinat commented on July 23, 2024
[7z files] System.IO.FileNotFoundException: Could not find file 'C:\users\steamuser\Temp\AngelLoader\FMScan\.txt'

from angelloader.

Comments (10)

FenPhoenix avatar FenPhoenix commented on July 23, 2024 1

Your log said "couldn't find file", so I don't think the zero size is anything to do with that. I believe there are some places in the scanner where file size is assumed to be >0 (.mis files for example), but my strategy has been to simply let those throw and fail on purpose because we'd be on a corrupt FM anyway and there'd be no point trying to scan any further.

from angelloader.

FenPhoenix avatar FenPhoenix commented on July 23, 2024 1

Okay, I figured out what's going on. When it iterates the archive to build the files-to-extract list, it only adds readmes that are >0 length. So 0 length readmes don't get extracted. But it still adds those readmes to the "file info" list, and when it goes through that list later to read the readmes in from disk, it doesn't check if the file it's about to read actually exists (it assumes it does). So a slight logic bug. I'm fixing it for the next version.

Note that, of course, you still won't get any useful data out of scanning these corrupt 7z files, but at least it won't fail the entire scan in future.

from angelloader.

FenPhoenix avatar FenPhoenix commented on July 23, 2024 1

Yes, 7z files are much slower to scan due to their nature. They're solid archives (technically they can be non-solid, but in practice they're basically always solid). That means their data is one big compressed blob, so the scanner can't skip around and pluck out the files it needs, and it can't stream them into memory either (no api for it). Instead, it has to just decompress through the entire blob (which could be very large) until it's come across and extracted all the files it needs. This combined with the fact that 7z's LZMA format is much slower to decompress to begin with, and is also not able to be multithreaded during decompression either, makes zip files a far better fit for FMs IMO, in this age of dirt cheap storage. That's my opinion anyway, but if you're cool with making the speed/size tradeoff then go for it. But just know that I won't be able to make 7z files go any faster, I'm already extracting the minimum and calling directly out to the official native 7z.exe for max speed.

from angelloader.

FenPhoenix avatar FenPhoenix commented on July 23, 2024 1

Ah, in that case it makes sense then.

from angelloader.

jonathanlinat avatar jonathanlinat commented on July 23, 2024

I'm going to close this issue since it appears to stem from an incorrect conversion from the original Zip format to 7z. Some vital files have been corrupted. Please examine the file sizes, particularly the FortyEight.txt file.

Original Zip file vs Converted 7z file

image

image

from angelloader.

FenPhoenix avatar FenPhoenix commented on July 23, 2024

The 7z scan first extracts the files it needs to a temp folder, and then later in the scan it reads the files back in from disk, expecting them to be there. The extract obviously must have failed, although I would expect to see a 7z error in the log if that was the case (something like "c:\archives\the_fm.7z: fm is 7z: 7z.exe path: c:\AngelLoader\7z64\7z.exe: [error info]")

I'll look over my error handling code and see if I'm missing some situation in which an error occurs but I don't set the error flag.

from angelloader.

FenPhoenix avatar FenPhoenix commented on July 23, 2024

Can you send me one of your broken 7z files? I want to test 7z.exe's error output with it.

from angelloader.

jonathanlinat avatar jonathanlinat commented on July 23, 2024

@FenPhoenix Here's the link for reference:

https://ufile.io/sfkg8fph

image

It's worth mentioning that I can access and extract the so-called "corrupted" 7z file. Yet, AngelLoader struggles to interpret specific files due to their lack of content. This is what I think.

image

I'm currently troubleshooting my Python conversion script to pinpoint the root of this issue. It's like it is not to be able to do the job as intended. It erases the content of specific files, or it cannot parse them correctly during the conversion process and output empty files.

from angelloader.

jonathanlinat avatar jonathanlinat commented on July 23, 2024

Great, thanks Fen.

I've transitioned my Python program over to a Bash script, and it's converting correctly now. The space savings are significant. However, I've noticed that AngelLoader processes 7z files slower compared to Zip and Rar, which seems to be expected.

image

We can close the issue.

from angelloader.

jonathanlinat avatar jonathanlinat commented on July 23, 2024

That's okay. And TY for the explanations. That makes sense.

I'm aiming to save space since I have to store these files on a server I pay for monthly. If I can save upwards of 30GB of data, it's worth it.

from angelloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.