Error when converting directory on OSX, .DS_Store causes runtime error
velara3 opened this issue ยท 18 comments
When defining a directory I'm getting an error:
Command:
waifu2x-converter-cpp --model-dir /Users/user/Documents/waifu2x-converter-cpp/models --scale-
ratio 2 -i /Users/user/Documents/testfolder -o /Users/user/Documents/testoutput
Error:
We're going to be operating in a directory. dir:"/Users/user/Documents/testfolder"
libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: basic_string
Abort trap: 6
waifu2x-converter-cpp --version
waifu2x-converter-cpp version: v5.2.4 (master-1eea2b3)
FYI using OSX
I edited some codes can affect to this issue. please re-compile project with latest codes (It should be master-a268359)
sorry I created many PRs in yesterday and there is some commits that i forgot to push. I will make new PR in a hour and please try that version. I will add comment when codes are ready
please try in osx_dir_support branch.
'git checkout osx_dir_support'
checkout to osx_dir_support branch then try to build again in normal way.
version string should be v5.2.4 (osx_dir_support-7e6a1ea)
I ran: ./waifu2x-converter-cpp --version
./waifu2x-converter-cpp version: v5.2.4 (osx_dir_support-7e6a1ea)'.
Then I run /Users/user/Documents/waifu2x-converter-cpp/waifu2x-converter-cpp --jobs 2 --scale-ratio 2 --mode noise-scale --noise-level 3 -c 0 -f png --input '/Users/user/Documents/test/' --output '/Users/user/Documents/test2/'
And getting the same error:
CPU: Intel(R)...
We're going to be operating in a directory. dir:"/Users/user/Documents/test/"
libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: basic_string
Abort trap: 6
Is it possible to checkout an earlier release and that would fix the issue?
I switched to 5.4.2 and when running cmake again it had this message:
-- Found git, set version to: v5.2.4 (HEAD-b4566c0)
-- System is: Darwin (Apple)
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE >CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
-- CUDA not found. disabled.
-- Configuring done
-- Generating done
I then built using > make -j4
and ran previous command as before. The output was better but stumbled on DS_Store.
CPU: Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
We're going to be operating in a directory. dir:"/Users/user/Documents/test"
[1/3] ".DS_Store"
Floating point exception: 8
When I removed .DS_Store
it ran successfully.
However the message above when using cmake
is new:
CUDA_TOOLKIT_ROOT_DIR not found or specified
FYI I rechecked out osx_directory_support
and master
and it also works now.
It looks like the original error is caused by the .DS_Store
being in the directory. If I remove that file all versions appear to work correctly. FYI .DS_Store is hidden by default on OSX.
when i create .DS_Store in windows, it does not make error. (so i cannot reproduce this situation)
it looks like format checking function making error in osx.
in branch integrated_unicode_support
could fix this problem (crashing due to .DS_Store)
Version:
$ ./waifu2x-converter-cpp --version
./waifu2x-converter-cpp version: v5.2.4 (integrated_unicode_support-3638728)
Same error:
libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: basic_string
Abort trap: 6
When delete of .DS_Store directory conversion is successful, when .DS_Store exists error.
PS .DS_Store is automatically created by OSX sometimes on various user operations.
could you please testing in branch integrated_unicode_support, d4b5a2f
I added some check function to catch file not supported.
PS. Did you build with OpenCV or not??
I am running cmake
and make
commands mentioned in the Build document each time I have changed to a different branch.
cmake -DOPENCV_PREFIX=/usr/local/Cellar/opencv/4.1.0_1 .
waifu2x-converter-cpp --version
./waifu2x-converter-cpp version: v5.2.4 (integrated_unicode_support-d4b5a2f)
It is now working in my tests. When .DS_Store
is encountered it shows this message:
We're going to be operating in a directory. dir:"/Users/test/Documents/test"
Skipping file '.DS_Store' for having an unsupported file extension ()
[1/2] "test.jpg"
OK! It is working what it should be.
Thank you for your help!