Image not found error on macOS 10.15.7
RayBB opened this issue · 12 comments
I installed using the brew command.
According to #5 it may be because I'm on a newer version of macOS.
When I crop an image I get the following error:
2021-04-03 10:11:39.750 perspec[10167:89305] -[NSIBObjectData initWithCoder:]: corrupt and unarchivable nib file
("/Users/210118/Downloads/1.jpeg","/Users/210118/Downloads/1-fixed.jpeg",(((194.99998,176.66666),(0.0,0.0)),((126.666664,1308.3333),(0.0,1137.001)),((1021.6666,1335.0),(848.63666,1137.001)),((996.6666,194.99998),(848.63666,0.0))),(848.63666,1137.001))
dyld: Library not loaded: /opt/X11/lib/libXt.6.dylib
Referenced from: /Applications/Perspec.app/Contents/Resources/./imagemagick/bin/convert
Reason: image not found
Loaded file /Users/210118/Downloads/1.jpeg (1200,1600)
with orientation Normal
Starting the app …
Target shape: (848.63666,1137.001)
Marked corners: ((194.99998,176.66666),(996.6666,194.99998),(1021.6666,1335.0),(126.666664,1308.3333))
Arguments for convert command:
/Users/210118/Downloads/1.jpeg
-auto-orient
-define
distort:viewport=848.63666x1137.001+0+0
-virtual-pixel
black
-distort
Perspective
194.99998,176.66666 0.0,0.0 126.666664,1308.3333 0.0,1137.001 1021.6666,1335.0 848.63666,1137.001 996.6666,194.99998 848.63666,0.0
+repage
/Users/210118/Downloads/1-fixed.jpeg
callProcess: ./imagemagick/bin/convert "/Users/210118/Downloads/1.jpeg" "-auto-orient" "-define" "distort:viewport=848.63666x1137.001+0+0" "-virtual-pixel" "black" "-distort" "Perspective" "194.99998,176.66666 0.0,0.0 126.666664,1308.3333 0.0,1137.001 1021.6666,1335.0 848.63666,1137.001 996.6666,194.99998 848.63666,0.0" "+repage" "/Users/210118/Downloads/1-fixed.jpeg" (exit -6): failed
PS: Thanks for all the hard work in making this app. It is very handy :)
Hi, can you try out the artifact here: https://github.com/ad-si/Perspec/actions/runs/718816997
I was currently working on the banner
branch, so this is the most recent version. Does that one work?
PS: Thanks for all the hard work in making this app. It is very handy :)
Glad you like it 😊
@ad-si
Ah I didn't think to checkout the other branch. I may give that a look later.
I tried downloading the artifact but when I open it by double clicking I see: The application "Perspec" can't be opened.
When I try opening it from CLI open Perspec.app
I see the following error:
LSOpenURLsWithRole() failed with error -10810 for the file /Users/ray/Downloads/Perspec.app.
Ah sorry, forgot to mention that you need fo fix the permissions as described in https://github.com/ad-si/Perspec#prebuilt
And then you need use right click, option + open to circumvent gatekeeper.
I tried downloading the latest build and running those commands. I got stuck between the macos can't verify this app (even with right click + option) and the same LSOpenURLsWithRole when running.
^^ I think this is could be due to some extra corporate lockdown on this computer.
However, I also switched to the latest commit of the banner branch and built from source. Then I got the same image not found
error.
Mh, then I'm at a loss. I tried it with the latest artifact and it works for me. But extra corporate lockdown could indeed be an issue. Maybe deactivating gate keeper is not possible on your machine.
Can you maybe also paste the output of neofetch
(brew install neofetch
)? Maybe this will give us some insights.
Here is the output of neofetch:
,xNMM. -------------------------
.OMMMMo OS: macOS Catalina 10.15.7 19H524 x86_64
OMMM0, Host: MacBookPro15,2
.;loddo:' loolloddol;. Kernel: 19.6.0
cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 2 days, 4 hours, 25 mins
.KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 166 (brew)
XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: zsh 5.7.1
;MMMMMMMMMMMMMMMMMMMMMMMM: Resolution: 1440x900
:MMMMMMMMMMMMMMMMMMMMMMMM: DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Quartz Compositor
kMMMMMMMMMMMMMMMMMMMMMMMMWd. WM Theme: Blue (Light)
.XMMMMMMMMMMMMMMMMMMMMMMMMMMk Terminal: Apple_Terminal
.XMMMMMMMMMMMMMMMMMMMMMMMMK. Terminal Font: SFMono-Regular
kMMMMMMMMMMMMMMMMMMMMMMd CPU: Intel i5-8259U (8) @ 2.30GHz
;KMMMMMMMWXXWMMMMMMMk. GPU: Intel Iris Plus Graphics 655
.cooc,. .,coo:. Memory: 10864MiB / 16384MiB
But also, don't fret too much about this. I actually was able to just use imagemagick directly for my use case.
@RayBB Can you please try it out with the latest version? I upgraded the dependencies and that might fix it.
https://github.com/feramhq/Perspec/actions/runs/1641384566#artifacts
(Please remember to fix the rights of the files as described in https://github.com/feramhq/Perspec#macos and use right click > open)
@ad-si
I tried it on my new computer and it opened and let me drag a picture but closed with this error when I hit enter.
2022-01-05 18:19:03.345 perspec[56083:1973860] -[NSIBObjectData initWithCoder:]: corrupt and unarchivable nib file
dyld[56088]: Library not loaded: /opt/X11/lib/libfreetype.6.dylib
Referenced from: /private/var/folders/4_/816hx7j147v25wscsbd8fb_00000gn/T/AppTranslocation/F07A8EE4-69AD-4B12-AE51-F56CB2113E86/d/Perspec.app/Contents/Resources/imagemagick/bin/convert
Reason: tried: '/private/var/folders/4_/816hx7j147v25wscsbd8fb_00000gn/T/AppTranslocation/F07A8EE4-69AD-4B12-AE51-F56CB2113E86/d/Perspec.app/Contents/Resources/imagemagick/lib/libfreetype.6.dylib' (no such file), '/opt/X11/lib/libfreetype.6.dylib' (no such file), '/usr/local/lib/libfreetype.6.dylib' (no such file), '/usr/lib/libfreetype.6.dylib' (no such file)
Loaded file /Users/ray/Downloads/PXL_20210925_201122327 copy.jpg (1593,1593)
with orientation Normal
Starting the app …
GLFW backend: Error'PlatformError "Cocoa: Failed to find service port for display"
Target shape: (1270.7494,908.0137)
Marked corners: ((306.98438,355.93594),(1523.3063,711.04224),(1433.7,1433.7),(159.3,1433.7))
Arguments for convert command:
/Users/ray/Downloads/PXL_20210925_201122327 copy.jpg
-auto-orient
-define
distort:viewport=1270.7494x908.0137+0+0
-virtual-pixel
black
-distort
Perspective
306.98438,355.93594 0.0,0.0 159.3,1433.7 0.0,908.0137 1433.7,1433.7 1270.7494,908.0137 1523.3063,711.04224 1270.7494,0.0
+repage
/Users/ray/Downloads/PXL_20210925_201122327 copy-fixed.jpg
callProcess: ./imagemagick/bin/convert "/Users/ray/Downloads/PXL_20210925_201122327 copy.jpg" "-auto-orient" "-define" "distort:viewport=1270.7494x908.0137+0+0" "-virtual-pixel" "black" "-distort" "Perspective" "306.98438,355.93594 0.0,0.0 159.3,1433.7 0.0,908.0137 1433.7,1433.7 1270.7494,908.0137 1523.3063,711.04224 1270.7494,0.0" "+repage" "/Users/ray/Downloads/PXL_20210925_201122327 copy-fixed.jpg" (exit -6): failed
When I run neofetch:
'c. ray@Rays-MBP.home
,xNMM. -----------------------
.OMMMMo OS: macOS 12.1 21C52 arm64
OMMM0, Host: MacBookPro18,3
.;loddo:' loolloddol;. Kernel: 21.2.0
cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 21 days, 1 hour, 3 mins
.KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 109 (brew)
XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: zsh 5.8
;MMMMMMMMMMMMMMMMMMMMMMMM: Resolution: 1512x982
:MMMMMMMMMMMMMMMMMMMMMMMM: DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Rectangle
kMMMMMMMMMMMMMMMMMMMMMMMMWd. Terminal: Apple_Terminal
.XMMMMMMMMMMMMMMMMMMMMMMMMMMk Terminal Font: SFMono-Regular
.XMMMMMMMMMMMMMMMMMMMMMMMMK. CPU: Apple M1 Pro
kMMMMMMMMMMMMMMMMMMMMMMd GPU: Apple M1 Pro
;KMMMMMMMWXXWMMMMMMMk. Memory: 2867MiB / 16384MiB
.cooc,. .,coo:.
Damn 🙈, thanks for the heads up! I'll try to get my hands on a clean macOS installation the upcoming days and try to figure out what's going on.
In the meantime brew install imagemagick
, or brew install xquartz
, or maybe brew install freetype
might fix the problem 😅
@ad-si
brew install xquartz
alone fixed it so it makes the output image
However it did log another error.
2022-01-06 13:32:45.985 perspec[77261:2219153] -[NSIBObjectData initWithCoder:]: corrupt and unarchivable nib file
Loaded file /Users/ray/Downloads/PXL_20210925_201122327 copy.jpg (1593,1593)
with orientation Normal
Starting the app …
GLFW backend: Error'PlatformError "Cocoa: Failed to find service port for display"
Target shape: (1244.117,1173.3535)
Marked corners: ((237.29063,364.23282),(1433.7,159.3),(1433.7,1433.7),(159.3,1433.7))
Arguments for convert command:
/Users/ray/Downloads/PXL_20210925_201122327 copy.jpg
-auto-orient
-define
distort:viewport=1244.117x1173.3535+0+0
-virtual-pixel
black
-distort
Perspective
237.29063,364.23282 0.0,0.0 159.3,1433.7 0.0,1173.3535 1433.7,1433.7 1244.117,1173.3535 1433.7,159.3 1244.117,0.0
+repage
/Users/ray/Downloads/PXL_20210925_201122327 copy-fixed.jpg
✅ Successfully saved converted image
ExitSuccess
PS: you can get a clean enough macOS install but just creating a new user on your machine :)
brew install xquartz alone fixed it so it makes the output image
Good to know, thanks for figuring it out. =)
However it did log another error.
You mean the Error'PlatformError
, right?
This seems to be an issue with GLFW and Apple Silicon's Rosetta technology (which can apparently not be fixed in user space ^^). But everything worked now nevertheless, right?
I guess I should at least hide it 😅
You can get a clean enough macOS install but just creating a new user on your machine
I tried that, but I don't think it's clean enough. There is a lot of stuff installed globally…
Even the official macOS installation of ImageMagick is broken 🙈 ImageMagick/ImageMagick#4676.
Hopefully they'll fix it upstream, before I have to build it myself from source without freetype support.