lezgomatt / ezntfs

An easy-to-use wrapper for NTFS-3G on macOS
zlib License
56 stars 6 forks source link

zsh: illegal hardware instruction ezntfs-app #10

Closed startergo closed 1 year ago

startergo commented 1 year ago
ezntfs-app                                          
2023-09-18 21:13:49.998 Python[46102:694240] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x6000021a9830
2023-09-18 21:13:49.998 Python[46102:694240] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x6000021a9830
2023-09-18 21:13:50.250 Python[46102:694240] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x600002131a70
zsh: illegal hardware instruction  ezntfs-app
lezgomatt commented 1 year ago

Hey @startergo, I'll need a little more info before I can help you here.

Please run the following commands in your terminal:

And paste their output here.

Also, is your machine an Intel or Apple Silicon (M1, M2, etc)?

FWIW, I'm currently using an M2 Macbook, and it runs without issue for me.

startergo commented 1 year ago

OK I will. Out of curiosity what are you doing on M2 with NTFS? I am using Intel Mac

startergo commented 1 year ago
  • file $(head -n 1 $(which ezntfs-app) | cut -c 3-)
  • file $(which ntfs-3g)
file $(head -n 1 $(which ezntfs-app) | cut -c 3-)
/usr/local/opt/python@3.11/bin/python3.11: Mach-O 64-bit executable x86_64
mbp151@MBP151s-MBP ~ % file $(which ntfs-3g)
/opt/local/bin/ntfs-3g: Mach-O 64-bit executable x86_64
mbp151@MBP151s-MBP ~ % /usr/local/opt/python@3.11/bin/python3.11
Python 3.11.5 (main, Aug 24 2023, 15:18:16) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/__init__.py", line 38, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
    ^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_tkinter'
>>> quit()
lezgomatt commented 1 year ago

OK I will. Out of curiosity what are you doing on M2 with NTFS?

I use it for my external HDD, which I sometimes access on a Windows machine. This should work on Intel machines as well though (that's where this was originally developed and used).

I am using Intel Mac

Oh, I did not expect that. My initial hypothesis was that you were running the Intel version of Python on Apple Silicon, but that's not the case here. TBH, I'm not quite sure how to diagnose this.

lezgomatt commented 1 year ago

Could you check ~/Library/Logs/com.lezgomatt.ezntfs.log and see if there's a stack trace there?

startergo commented 1 year ago
2023-09-18 15:47:54.313 python3.11[57254:162414] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x60000328c090
2023-09-18 15:47:54.313 python3.11[57254:162414] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x60000328c090
2023-09-18 15:47:54.313 python3.11[57254:162414] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x60000328c3f0
startergo commented 1 year ago

Reinstalled it again:

file $(head -n 1 $(which ezntfs-app) | cut -c 3-)
/usr/bin/env: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/env (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/env (for architecture arm64e): Mach-O 64-bit executable arm64e
bash:         cannot open `bash' (No such file or directory)
file $(which ntfs-3g)
/usr/local/bin/ntfs-3g: Mach-O 64-bit executable x86_64

This command works fine:

sudo ezntfs all                                  
Found 1 NTFS volume(s).

Volume: BOOTCAMP [350.2 GB]
BOOTCAMP is already writable.

But this does not:

ezntfs-app           
2023-09-20 10:48:20.912 python3.11[8605:1509744] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x6000022c35a0
2023-09-20 10:48:20.912 python3.11[8605:1509744] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x6000022c35a0
2023-09-20 10:48:20.913 python3.11[8605:1509744] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x6000022c36c0
zsh: illegal hardware instruction  ezntfs-app

Is there any SIP requirement?

lezgomatt commented 1 year ago

Hm... Okay, so the issue really seems to be related to pyobjc (or how I'm using it).

What version of pyobjc and macOS are you using? You should be able to check this using pip show pyobjc. I'm using v8.5 on Ventura, so if you're using something else maybe trying installing this version instead.

Is there any SIP requirement?

Nope. For newer versions of macOS, you need to enable kernel extensions for FUSE (and therefore ntfs-3g) to work. If sudo ezntfs all works for you, then that should already be okay.

startergo commented 1 year ago
pip show pyobjc                                                                        
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Name: pyobjc
Version: 5.3
 pip3 show  pyobjc                                                                      
Name: pyobjc
Version: 9.2

pyobjc was not installed. After installation:

ezntfs-app 
2023-09-21 10:14:24.781 Python[36151:1969049] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x6000007f3f30
2023-09-21 10:14:24.781 Python[36151:1969049] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x6000007f3f30
2023-09-21 10:14:25.261 Python[36151:1969049] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x600000740570
which pip
/Users/mbp151/.pyenv/shims/pip
mbp151@MBP151s-MacBook-Pro 3.9 % /Users/mbp151/.pyenv/shims/pip show pyobjc
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Name: pyobjc
Version: 5.3
which pip3
/Users/mbp151/.pyenv/shims/pip3
mbp151@MBP151s-MacBook-Pro 3.9 % /Users/mbp151/.pyenv/shims/pip3 show pyobjc
Name: pyobjc
Version: 9.2
python
Python 2.7.18 (default, Sep 20 2023, 18:03:48) 
[GCC Apple LLVM 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
mbp151@MBP151s-MacBook-Pro 3.9 % pyenv global 3.11.5
mbp151@MBP151s-MacBook-Pro 3.9 % which pip
/Users/mbp151/.pyenv/shims/pip
mbp151@MBP151s-MacBook-Pro 3.9 % /Users/mbp151/.pyenv/shims/pip show pyobjc 
Name: pyobjc
Version: 9.2
ezntfs-app 
2023-09-21 10:20:55.690 python3.11[36485:1974918] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x600002d483f0
2023-09-21 10:20:55.690 python3.11[36485:1974918] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x600002d483f0
2023-09-21 10:20:55.690 python3.11[36485:1974918] -[_NSViewBackingLayer NS_setView:]: unrecognized selector sent to instance 0x600002d486c0
zsh: illegal hardware instruction  ezntfs-app
lezgomatt commented 1 year ago

Hm, it seems like there's an issue with the newer versions of pyobjc. I was able to reproduce the error messages when I upgraded mine to the latest version. Downgrading to v8.5 fixed it again though.

To downgrade, you can run pip3 install --force-reinstall -v "pyobjc==8.5".

Please let me know if that fixes it or if you still encounter issues. Thanks!

startergo commented 1 year ago

This worked!.