Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac版本闪退 #82

Closed
3 tasks done
feichen78 opened this issue Feb 6, 2024 · 36 comments
Closed
3 tasks done

Mac版本闪退 #82

feichen78 opened this issue Feb 6, 2024 · 36 comments
Labels
help wanted Extra attention is needed

Comments

@feichen78
Copy link

在提问之前...

  • 我已经搜索了现有的 issues
  • 我在提问题之前至少花费了 5 分钟来思考和准备
  • 我正在使用最新版本

描述你的问题

原来使用的 20231014mac版一切正常,120240127的mac版在Mac OS 10.15.7和14.3都是闪退。不同的是14.3下反复多次尝试后,能够启动了,10.15.7则启动不了。

如何复现

  1. 前往 '...'
  2. 点击 '....'
  3. 滑动到 '....'
  4. 出现问题

预期行为

更新mac版

相关 Logs

No response

截图

No response

还有别的吗?

No response

@sqzw-x

This comment was marked as outdated.

@sqzw-x sqzw-x added the help wanted Extra attention is needed label Feb 7, 2024
@northsea4
Copy link
Collaborator

有一个已知问题。
目前打包的是x86_64版本,测试在Apple Silicon芯片mac设备(比如M1 14 Pro)系统里,会有启动缓慢的问题。
具体现象:运行应用后,可以看到Dock栏有应用图标,但很快图标消失,给人一种”闪退“的假象。
但是,等待一小段时间后,可以看到应用界面,应用启动成功,这个”一小段时间“可能会在不同设备和系统有不同,可能是十来秒,半分钟,甚至更长。

暂时没有条件测试x86_64系统上是否存在这个情况。

@AjianNie
Copy link

AjianNie commented Feb 7, 2024

Intel macOS 13.6 闪退, 估计与macOS版本没太大关系, 是构建的问题

@northsea4
Copy link
Collaborator

Intel macOS 13.6 闪退, 估计与macOS版本没太大关系, 是构建的问题

试试通过终端运行查看报错。以下方式选一个:
方式1:打开终端,执行/Applications/MDCx.app/Contents/MacOS/MDCx
方式2:打开Finder,菜单”Go > Go to Folder",粘贴路径/Applications/MDCx.app/Contents/MacOS后回车,然后双击该目录下的MDCx

观察终端里的输出。

@AjianNie
Copy link

AjianNie commented Feb 8, 2024

试试通过终端运行查看报错。以下方式选一个: 方式1:打开终端,执行/Applications/MDCx.app/Contents/MacOS/MDCx 方式2:打开Finder,菜单”Go > Go to Folder",粘贴路径/Applications/MDCx.app/Contents/MacOS后回车,然后双击该目录下的MDCx

观察终端里的输出。

好像是是权限不够, sudo命令可以正常打开包内的可执行程序. (软件的简介窗口, 我的权限默认是读与写

@northsea4
Copy link
Collaborator

Intel macOS 13.6 闪退, 估计与macOS版本没太大关系, 是构建的问题

试试通过终端运行查看报错。以下方式选一个: 方式1:打开终端,执行/Applications/MDCx.app/Contents/MacOS/MDCx 方式2:打开Finder,菜单”Go > Go to Folder",粘贴路径/Applications/MDCx.app/Contents/MacOS后回车,然后双击该目录下的MDCx
观察终端里的输出。

好像是是权限不够, sudo命令可以正常打开包内的可执行程序. (软件的简介窗口, 我的权限默认是读与写

不用sudo运行时,没有任何信息吗?有的话请贴出来

@feichen78
Copy link
Author

Intel macOS 13.6 闪退, 估计与macOS版本没太大关系, 是构建的问题

试试通过终端运行查看报错。以下方式选一个: 方式1:打开终端,执行/Applications/MDCx.app/Contents/MacOS/MDCx 方式2:打开Finder,菜单”Go > Go to Folder",粘贴路径/Applications/MDCx.app/Contents/MacOS后回车,然后双击该目录下的MDCx

观察终端里的输出。

[882] Error loading Python lib '/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib': dlopen: dlopen(/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib, 10): Symbol not found: _preadv
Referenced from: /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib (which was built for Mac OS X 11.7)
Expected in: /usr/lib/libSystem.B.dylib
in /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib

@feichen78
Copy link
Author

我没有保留20231014mac版,网上也没找到。请问作者在哪可以下载到呢?

@AjianNie
Copy link

AjianNie commented Feb 8, 2024

我没有保留20231014mac版,网上也没找到。请问作者在哪可以下载到呢?

win & Mac 20231014
https://drive.google.com/drive/folders/1fvMJV4-7m4HazIzTJ8m_AUH-9pHHXkSH?usp=share_link

@AjianNie
Copy link

AjianNie commented Feb 8, 2024

不用sudo运行时,没有任何信息吗?有的话请贴出来

Traceback (most recent call last):
File "models/config/resources.py", line 182, in _get_or_generate_local_data
PermissionError: [Errno 13] Permission denied: '/Users/mr-wang/.mdcx/userdata/mapping_actor.xml'

Traceback (most recent call last):
File "controllers/main_window/main_window.py", line 1400, in show_log_text
AttributeError: 'NoneType' object has no attribute 'write'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "controllers/main_window/main_window.py", line 1408, in show_log_text
PermissionError: [Errno 13] Permission denied: '/Users/mr-wang/.mdcx/Log/2024-02-08-16-36-38.txt'
Fatal Python error: Aborted

Current thread 0x00007ff84b27e700 (most recent call first):
File "models/signals.py", line 64 in show_log_text
File "controllers/main_window/load_config.py", line 1165 in load_config
File "controllers/main_window/main_window.py", line 143 in init
File "main.py", line 53 in <module>

@northsea4
Copy link
Collaborator

northsea4 commented Feb 8, 2024

不用sudo运行时,没有任何信息吗?有的话请贴出来

Traceback (most recent call last): File "models/config/resources.py", line 182, in _get_or_generate_local_data PermissionError: [Errno 13] Permission denied: '/Users/mr-wang/.mdcx/userdata/mapping_actor.xml'

Traceback (most recent call last): File "controllers/main_window/main_window.py", line 1400, in show_log_text AttributeError: 'NoneType' object has no attribute 'write'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "controllers/main_window/main_window.py", line 1408, in show_log_text PermissionError: [Errno 13] Permission denied: '/Users/mr-wang/.mdcx/Log/2024-02-08-16-36-38.txt' Fatal Python error: Aborted

Current thread 0x00007ff84b27e700 (most recent call first): File "models/signals.py", line 64 in show_log_text File "controllers/main_window/load_config.py", line 1165 in load_config File "controllers/main_window/main_window.py", line 143 in init File "main.py", line 53 in <module>

如果这是全部日志,那~/.mdcx目录应该是存在的,因为在获取该目录路径时如果检测到不存在会自动创建,如果创建时出错会有相关的错误。
所以,有可能是你先以root用户成功运行MDCx,此时创建的~/.mdcx目录自然也是属于root用户的。然后,当你再以普通用户(mr-wang)去运行MDCx,因为此时~/.mdcx目录权限是755,只有root能读写,所以有这种错误日志。

检查是否存在~/.mdcx目录,在终端执行:

ls -ld ~/.mdcx

如果目录存在,执行结果可以看到目录权属和所属用户,看是否验证我所说的可能。
如果就是我所说的,那先删掉目录:sudo rm -rf ~/.mdcx
接着,再尝试正常方式运行MDCx,如果超过5分钟仍未启动成功,再尝试通过终端启动(不要sudo),观察终端的输出。

@northsea4
Copy link
Collaborator

Intel macOS 13.6 闪退, 估计与macOS版本没太大关系, 是构建的问题

试试通过终端运行查看报错。以下方式选一个: 方式1:打开终端,执行/Applications/MDCx.app/Contents/MacOS/MDCx 方式2:打开Finder,菜单”Go > Go to Folder",粘贴路径/Applications/MDCx.app/Contents/MacOS后回车,然后双击该目录下的MDCx
观察终端里的输出。

[882] Error loading Python lib '/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib': dlopen: dlopen(/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib, 10): Symbol not found: _preadv Referenced from: /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib (which was built for Mac OS X 11.7) Expected in: /usr/lib/libSystem.B.dylib in /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib

请问这个是在10.15.7运行时出现的情况?

@feichen78
Copy link
Author

Intel macOS 13.6 闪退, 估计与macOS版本没太大关系, 是构建的问题

试试通过终端运行查看报错。以下方式选一个: 方式1:打开终端,执行/Applications/MDCx.app/Contents/MacOS/MDCx 方式2:打开Finder,菜单”Go > Go to Folder",粘贴路径/Applications/MDCx.app/Contents/MacOS后回车,然后双击该目录下的MDCx
观察终端里的输出。

[882] Error loading Python lib '/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib': dlopen: dlopen(/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib, 10): Symbol not found: _preadv Referenced from: /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib (which was built for Mac OS X 11.7) Expected in: /usr/lib/libSystem.B.dylib in /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIxQp1ME/libpython3.9.dylib

请问这个是在10.15.7运行时出现的情况?

是的。intel, 10.15.7

@heavyfei
Copy link

macOS 版是自动构建的,我没有 mac 设备,没法调试。参考 #36 另外 @northsea4 请你看下是否能复现此问题?

请问以前的MDCx-mac-20230617.dmg这种dmg文件是怎么生成的呢,现在还能发布这种文件吗?

@sqzw-x
Copy link
Owner

sqzw-x commented Feb 14, 2024

macOS 版是自动构建的,我没有 mac 设备,没法调试。参考 #36 另外 @northsea4 请你看下是否能复现此问题?

请问以前的MDCx-mac-20230617.dmg这种dmg文件是怎么生成的呢,现在还能发布这种文件吗?

之前的开发者是在 mac 上工作的,可以调试解决构建问题,而且他是本地构建二进制文件再手动上传的,我在 Windows 上没办法掌握 mac 构建的细节,构建是通过 action 自动进行的,我也没法运行调试 mac 可执行文件

@northsea4
Copy link
Collaborator

macOS 版是自动构建的,我没有 mac 设备,没法调试。参考 #36 另外 @northsea4 请你看下是否能复现此问题?

请问以前的MDCx-mac-20230617.dmg这种dmg文件是怎么生成的呢,现在还能发布这种文件吗?

dmg应该是用py2app打包的,之前尝试过这个打包方案,但没有成功,之后有空再研究一下。目前用的是pyinstaller

@llonline
Copy link

打开会弹几下,然后就消失了,我等了一小段时间,45秒,就启动出来了。m2芯片

@sqzw-x
Copy link
Owner

sqzw-x commented Feb 16, 2024

@northsea4
Copy link
Collaborator

northsea4 commented Feb 16, 2024

补充一些信息:

  1. py2app可以直接打包为dmg,但不是唯一选择,实际上用系统自带的hdiutil即可,而且有更易于使用的hdiutil封装工具,如create-dmg,目前的自动打包已实现该打包方式,Release里可以下载dmg文件。@heavyfei

  2. x86_64版本在arm64系统运行,打开耗时较长,猜测是转换需要时间,具体耗时可能看设备的性能。在m1 14p上大概30s打开,如果是aarch64版,则可以秒开。 @llonline

  3. 10.15.7系统测试,可以复现Symbol not found: _preadv这个问题。初步调查应该是opencv-contrib-python-headless这个包不兼容导致的。测试opencv-contrib-python-headless=4.6.0.6610.15.7上运行成功(python 3.9.10)。
    相关资料:https://pypi.org/project/opencv-contrib-python-headless/

Starting from version 4.7.0 the Mac OS GitHub Actions build environment was update to version 11. Mac OS 10.x support depricated. See actions/runner-images#5583

这是在10.15.7上使用opencv-contrib-python-headless=4.7.0.68时的运行错误:

(venv) ➜  sqzw-mdcx git:(master) python main.py 
Traceback (most recent call last):
  File "/Users/meme/dev/python/sqzw-mdcx/main.py", line 13, in <module>
    from controllers.main_window.main_window import MyMAinWindow
  File "/Users/meme/dev/python/sqzw-mdcx/src/controllers/main_window/main_window.py", line 14, in <module>
    from controllers.cut_window import CutWindow
  File "/Users/meme/dev/python/sqzw-mdcx/src/controllers/cut_window.py", line 10, in <module>
    import models.core.file
  File "/Users/meme/dev/python/sqzw-mdcx/src/models/core/file.py", line 18, in <module>
    from models.core.utils import get_movie_path_setting, get_new_release, nfd2c
  File "/Users/meme/dev/python/sqzw-mdcx/src/models/core/utils.py", line 10, in <module>
    import cv2
  File "/Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/cv2.abi3.so, 2): Symbol not found: _VTRegisterSupplementalVideoDecoderIfAvailable
  Referenced from: /Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/.dylibs/libavcodec.59.37.100.dylib (which was built for Mac OS X 11.0)
  Expected in: /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox
 in /Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/.dylibs/libavcodec.59.37.100.dylib

实际上我对这些细节都不太了解,暂时不能确定更换opencv-contrib-python-headless包版本会不会带来新的问题。做这些测试也是需要相关环境和时间的,我有空有条件可以再研究一下,也欢迎各位能给些指点和建议。

@heavyfei
Copy link

https://github.com/sqzw-x/mdcx/releases/tag/pre-20240216

这个版本在14.3.1下面测试可以安装,打开后大约花费1分钟多能运行。活动监视器里看到有2个MDCx进程。刮削1个HEYZO文件,花了521.37秒,貌似比以前慢,暂不确定原因。

@northsea4
Copy link
Collaborator

https://github.com/sqzw-x/mdcx/releases/tag/pre-20240216

这个版本在14.3.1下面测试可以安装,打开后大约花费1分钟多能运行。活动监视器里看到有2个MDCx进程。刮削1个HEYZO文件,花了521.37秒,貌似比以前慢,暂不确定原因。

两个MDCx进程是正常的,有兴趣可以看一下 pyinstaller文档

至于刮削耗时比以前慢,我不清楚具体是什么时候的”以前“,我感觉没什么区别,我一般用docker版(或者说linux版),macOS测试时才用,感觉刮削速度没什么区别(网络是一样的)。建议多刮削一些,开启详细刮削日志,分析一下耗时。

@kitawa1981
Copy link

补充一些信息:

  1. py2app可以直接打包为dmg,但不是唯一选择,实际上用系统自带的hdiutil即可,而且有更易于使用的hdiutil封装工具,如create-dmg,目前的自动打包已实现该打包方式,Release里可以下载dmg文件。@heavyfei
  2. x86_64版本在arm64系统运行,打开耗时较长,猜测是转换需要时间,具体耗时可能看设备的性能。在m1 14p上大概30s打开,如果是aarch64版,则可以秒开。 @llonline
  3. 10.15.7系统测试,可以复现Symbol not found: _preadv这个问题。初步调查应该是opencv-contrib-python-headless这个包不兼容导致的。测试opencv-contrib-python-headless=4.6.0.6610.15.7上运行成功(python 3.9.10)。
    相关资料:https://pypi.org/project/opencv-contrib-python-headless/

Starting from version 4.7.0 the Mac OS GitHub Actions build environment was update to version 11. Mac OS 10.x support depricated. See actions/runner-images#5583

这是在10.15.7上使用opencv-contrib-python-headless=4.7.0.68时的运行错误:

(venv) ➜  sqzw-mdcx git:(master) python main.py 
Traceback (most recent call last):
  File "/Users/meme/dev/python/sqzw-mdcx/main.py", line 13, in <module>
    from controllers.main_window.main_window import MyMAinWindow
  File "/Users/meme/dev/python/sqzw-mdcx/src/controllers/main_window/main_window.py", line 14, in <module>
    from controllers.cut_window import CutWindow
  File "/Users/meme/dev/python/sqzw-mdcx/src/controllers/cut_window.py", line 10, in <module>
    import models.core.file
  File "/Users/meme/dev/python/sqzw-mdcx/src/models/core/file.py", line 18, in <module>
    from models.core.utils import get_movie_path_setting, get_new_release, nfd2c
  File "/Users/meme/dev/python/sqzw-mdcx/src/models/core/utils.py", line 10, in <module>
    import cv2
  File "/Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/cv2.abi3.so, 2): Symbol not found: _VTRegisterSupplementalVideoDecoderIfAvailable
  Referenced from: /Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/.dylibs/libavcodec.59.37.100.dylib (which was built for Mac OS X 11.0)
  Expected in: /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox
 in /Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/.dylibs/libavcodec.59.37.100.dylib

实际上我对这些细节都不太了解,暂时不能确定更换opencv-contrib-python-headless包版本会不会带来新的问题。做这些测试也是需要相关环境和时间的,我有空有条件可以再研究一下,也欢迎各位能给些指点和建议。

能否提供下aarch64版?x86在Apple Silicon下实在太慢了

@northsea4
Copy link
Collaborator

@kitawa1981 https://github.com/northsea4/mdcx/releases/download/120240217/MDCx-120240217-macos-aarch64.dmg

这是我测试self-hosted runner打包的aarch64版本,你可以试一下。请忽略文件名中的版本,实际版本是120240207

@kitawa1981
Copy link

kitawa1981 commented Feb 17, 2024

@kitawa1981 https://github.com/northsea4/mdcx/releases/download/120240217/MDCx-120240217-macos-aarch64.dmg

这是我测试self-hosted runner打包的aarch64版本,你可以试一下。请忽略文件名中的版本,实际版本是120240207

谢谢,太感谢了

@allenchou217
Copy link

@kitawa1981 https://github.com/northsea4/mdcx/releases/download/120240217/MDCx-120240217-macos-aarch64.dmg

这是我测试self-hosted runner打包的aarch64版本,你可以试一下。请忽略文件名中的版本,实际版本是120240207

不管是x86的dmg/app还是aarch64的dmg都只能在dock栏弹两下 无法正常打开使用

@northsea4
Copy link
Collaborator

northsea4 commented Feb 20, 2024 via email

@northsea4
Copy link
Collaborator

需要arm64(aarch64)版本MDCx的可以到 这里 下载。
不保证在正式仓库发布多久后跟进,尽量有空就会构建。

@heavyfei
Copy link

需要arm64(aarch64)版本MDCx的可以到 这里 下载。 不保证在正式仓库发布多久后跟进,尽量有空就会构建。

非常感谢!在14.3.1的M2下,启动速度似乎也快了一些。

@feichen78
Copy link
Author

需要arm64(aarch64)版本MDCx的可以到 这里 下载。 不保证在正式仓库发布多久后跟进,尽量有空就会构建。

非常感谢!在14.3.1的M2下,启动速度似乎也快了一些。

MDCx-120240220-macos-x86_64.dmg在10.15.7下无法启动。报错:

[2332] Error loading Python lib '/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib': dlopen: dlopen(/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib, 10): Symbol not found: _preadv
Referenced from: /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib (which was built for Mac OS X 11.7)
Expected in: /usr/lib/libSystem.B.dylib
in /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib

@northsea4
Copy link
Collaborator

需要arm64(aarch64)版本MDCx的可以到 这里 下载。 不保证在正式仓库发布多久后跟进,尽量有空就会构建。

非常感谢!在14.3.1的M2下,启动速度似乎也快了一些。

MDCx-120240220-macos-x86_64.dmg在10.15.7下无法启动。报错:

[2332] Error loading Python lib '/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib': dlopen: dlopen(/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib, 10): Symbol not found: _preadv Referenced from: /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib (which was built for Mac OS X 11.7) Expected in: /usr/lib/libSystem.B.dylib in /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib

这个问题上面已经详细说明过了,没有进行“修复”(如果有相关修改一般会在发布里说明),因为暂时没有详细测试。
你可以试一下这个我测试打包的:
https://github.com/northsea4/mdcx/releases/download/120240220-test/MDCx-120240220-test-macos-x86_64-cv4.6.0.66.dmg

@feichen78
Copy link
Author

需要arm64(aarch64)版本MDCx的可以到 这里 下载。 不保证在正式仓库发布多久后跟进,尽量有空就会构建。

非常感谢!在14.3.1的M2下,启动速度似乎也快了一些。

MDCx-120240220-macos-x86_64.dmg在10.15.7下无法启动。报错:
[2332] Error loading Python lib '/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib': dlopen: dlopen(/var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib, 10): Symbol not found: _preadv Referenced from: /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib (which was built for Mac OS X 11.7) Expected in: /usr/lib/libSystem.B.dylib in /var/folders/n3/3z604z4j63nd9b13_0snw2m00000gn/T/_MEIhO8HXs/libpython3.9.dylib

这个问题上面已经详细说明过了,没有进行“修复”(如果有相关修改一般会在发布里说明),因为暂时没有详细测试。 你可以试一下这个我测试打包的: https://github.com/northsea4/mdcx/releases/download/120240220-test/MDCx-120240220-test-macos-x86_64-cv4.6.0.66.dmg

测试了,无法使用。打开后弹了几下,活动监视器里看到有MDCx的进程几秒钟,就再也没有动静了。用https://drive.google.com/drive/folders/1fvMJV4-7m4HazIzTJ8m_AUH-9pHHXkSH?usp=share_link这个替换,可以瞬间打开。

@rosspsp
Copy link

rosspsp commented Feb 26, 2024

需要arm64(aarch64)版本MDCx的可以到 这里 下载。 不保证在正式仓库发布多久后跟进,尽量有空就会构建。

您好,我使用的是您构建的arm最新版,发现三个bug,已提issue
iShot_2024-02-27_07 39 00

@northsea4
Copy link
Collaborator

@feichen78

测试了,无法使用。打开后弹了几下,活动监视器里看到有MDCx的进程几秒钟,就再也没有动静了。用https://drive.google.com/drive/folders/1fvMJV4-7m4HazIzTJ8m_AUH-9pHHXkSH?usp=share_link这个替换,可以瞬间打开。

那用终端运行,看看有没有报错,不然根据你这个描述没法排查问题。

@northsea4
Copy link
Collaborator

northsea4 commented Feb 27, 2024

需要arm64(aarch64)版本MDCx的可以到 这里 下载。 不保证在正式仓库发布多久后跟进,尽量有空就会构建。

您好,我使用的是您构建的arm最新版,发现三个bug,已提issue iShot_2024-02-27_07 39 00

如果是我fork的仓库的最新的release(120240220-test3),是没有arm版的,请具体说明下载的是哪个,而且你这3个issue都应该说明一下系统、应用版本等信息。

@rosspsp
Copy link

rosspsp commented Feb 27, 2024

需要arm64(aarch64)版本MDCx的可以到 这里 下载。 不保证在正式仓库发布多久后跟进,尽量有空就会构建。

您好,我使用的是您构建的arm最新版,发现三个bug,已提issue iShot_2024-02-27_07 39 00

如果是我fork的仓库的最新的release(120240220-test3),是没有arm版的,请具体说明下载的是哪个,而且你这3个issue都应该说明一下系统、应用版本等信息。

不好意思
我的系统mac m1 macos 14.1
下载的版本下图
iShot_2024-02-27_11 28 44

@sqzw-x sqzw-x closed this as completed Mar 15, 2024
@wdcew
Copy link

wdcew commented Apr 10, 2024

补充一些信息:

  1. py2app可以直接打包为dmg,但不是唯一选择,实际上用系统自带的hdiutil即可,而且有更易于使用的hdiutil封装工具,如create-dmg,目前的自动打包已实现该打包方式,Release里可以下载dmg文件。@heavyfei
  2. x86_64版本在arm64系统运行,打开耗时较长,猜测是转换需要时间,具体耗时可能看设备的性能。在m1 14p上大概30s打开,如果是aarch64版,则可以秒开。 @llonline
  3. 10.15.7系统测试,可以复现Symbol not found: _preadv这个问题。初步调查应该是opencv-contrib-python-headless这个包不兼容导致的。测试opencv-contrib-python-headless=4.6.0.6610.15.7上运行成功(python 3.9.10)。
    相关资料:https://pypi.org/project/opencv-contrib-python-headless/

Starting from version 4.7.0 the Mac OS GitHub Actions build environment was update to version 11. Mac OS 10.x support depricated. See actions/runner-images#5583

这是在10.15.7上使用opencv-contrib-python-headless=4.7.0.68时的运行错误:

(venv) ➜  sqzw-mdcx git:(master) python main.py 
Traceback (most recent call last):
  File "/Users/meme/dev/python/sqzw-mdcx/main.py", line 13, in <module>
    from controllers.main_window.main_window import MyMAinWindow
  File "/Users/meme/dev/python/sqzw-mdcx/src/controllers/main_window/main_window.py", line 14, in <module>
    from controllers.cut_window import CutWindow
  File "/Users/meme/dev/python/sqzw-mdcx/src/controllers/cut_window.py", line 10, in <module>
    import models.core.file
  File "/Users/meme/dev/python/sqzw-mdcx/src/models/core/file.py", line 18, in <module>
    from models.core.utils import get_movie_path_setting, get_new_release, nfd2c
  File "/Users/meme/dev/python/sqzw-mdcx/src/models/core/utils.py", line 10, in <module>
    import cv2
  File "/Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/cv2.abi3.so, 2): Symbol not found: _VTRegisterSupplementalVideoDecoderIfAvailable
  Referenced from: /Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/.dylibs/libavcodec.59.37.100.dylib (which was built for Mac OS X 11.0)
  Expected in: /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox
 in /Users/meme/dev/python/sqzw-mdcx/venv/lib/python3.9/site-packages/cv2/.dylibs/libavcodec.59.37.100.dylib

实际上我对这些细节都不太了解,暂时不能确定更换opencv-contrib-python-headless包版本会不会带来新的问题。做这些测试也是需要相关环境和时间的,我有空有条件可以再研究一下,也欢迎各位能给些指点和建议。

能否构建一个 10.15.7(macOS Catalina) Intel 的版本呢, 或者 在 action 构建中 默认使用 opencv-contrib-python-headless包版本 已兼容老版本 macOS呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

10 participants