Comments (6)
Thanks! I wonder if this problem is this issue, since my compiled release might not have included/referenced libmagic in a portable form.
Did it export any files at all to the target folder, or the bar moves and no files are written?
Would also be interested in seeing how it runs if you compile it yourself. If there are issues compiling let me know as i haven’t done it in a while.
from openbackupextractor.
So I got it compiling and running and reproduced the error in a debug build. The problem seems to be in lines 272-273 of ViewController.swift:
let magic_full = magic_file(magic_cookie, unsortedFilePath);
let type = String.init(cString: magic_full!)
I get this error on line 273: Thread 15: Fatal error: Unexpectedly found nil while unwrapping an Optional value
I believe this means that the magic_file
function is returning nil and that case is not handled. It does export many files to the target folder and the bar moves almost to the end before this happens.
from openbackupextractor.
Well I made a change to ignore NULL magic_file results and that seems to have fixed the issue. Apparently there is some type of file in my backup that causes libmagic to have an error:
The magic_file() function returns a textual description of the contents of the filename argument, or NULL if an error occurred. If the filename is NULL, then stdin is used.
I'm just looking for images and video so I assume I'm not skipping anything important for me this way. Thanks again for creating this tool!
from openbackupextractor.
Oh, interesting. Would you be able to find the type of file that is returning null, out of curiosity? (maybe by printing file names before the crash)
Would also be interested in a PR with the null check, if you’re willing!
from openbackupextractor.
I did some debugging and found that there are 3 files in my backup for which the magic_file
function returns NULL. All 3 are jpegs. Two of them are identical so I really only have 2 unique examples. So I guess libmagic isn't always able to recognize a jpeg without error.
from openbackupextractor.
Huh, that's too bad. It would be nice to not to miss those files if they are actually valid JPEGs, but if libmagic can't tell what they are I'm not sure what else we could do.
from openbackupextractor.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openbackupextractor.