【问题标题】:Importing zbar causes python to exit with exit code 139 - what could cause this on a mac running 10.9?导入 zbar 会导致 python 以退出代码 139 退出 - 在运行 10.9 的 mac 上可能会导致这种情况?
【发布时间】:2014-02-06 23:33:19
【问题描述】:

我正在尝试在我的 opencv 工作流程中进行 QR 码识别,但程序立即以代码 139 退出。

import zbar 导致问题,因为当我删除它时,我的后续 opencv 代码会执行。

我该如何诊断?它似乎在 /Library/Python/2.7/site-packages/ 中找到 zbar python 包(即不声称该包不存在),但随后它以代码 139 退出。知道代码 139 是什么吗?问题可能出在 python 绑定、zlib.h 还是其他地方?

python绑定包在/Library/Python/2.7/site-packages/:

zbar-0.10-py2.7.egg-info
zbar.so

【问题讨论】:

    标签: python macos image-processing qr-code zbar


    【解决方案1】:

    致命错误由 128 + 错误代码表示。在您的情况下,这是 128 + 11 = 139,其中 11 指的是 SIGSEGV,即无效的内存访问。另见:

    如果您通过 gdb、valgrind 或 Instruments 运行代码,您或许能够找到发生这种情况的确切位置。

    【讨论】:

    • 谢谢你,我之前没有使用过上面的工具,但会试一试,如果有必要再跟进。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-11
    • 2015-03-05
    • 2019-02-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多