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

[Bug] import 顺序导致的 Illegal instruction (core dumped) 错误 #68

Open
OctCarp opened this issue Jun 10, 2024 · 2 comments
Open

Comments

@OctCarp
Copy link

OctCarp commented Jun 10, 2024

问题描述

作者您好,我最近在 Nvidia 的边缘计算设备 Jetson Nano 上应用你的项目时,发现会出现 Illegal instruction (core dumped) 的错误,经过逐一排查,发现问题出现在 import 语句的顺序上。

import dlib
import cv2

# 以上代码可能会导致错误

import cv2
import dlib

# 如此修改可以正常运行,不再报错

其中 cv2dlib 均为 CMake 本地编译的版本。

请问第一种导入方式是否存在潜在的导致库文件冲突的可能性?如果是的话,作者可以考虑修改一下 import 语句的顺序。不在此提出 PR。

运行环境

设备:Nvidia Jetson Nano
系统:Ubuntu 18.04 (使用 Nvidia 官方提供的 SD 卡映像)
包版本:OpenCV 4.5.0 with CUDA,dlib 19.21 with CUDA,CUDA 10.2,cuDNN 8

@OctCarp OctCarp changed the title [Bug] import 顺序导致的 Illegal instruction (core dumped) [Bug] import 顺序导致的 Illegal instruction (core dumped) 错误 Jun 10, 2024
@coneypo
Copy link
Owner

coneypo commented Jun 17, 2024

收到,谢谢,import 顺序确实可能会引入错误

@coneypo
Copy link
Owner

coneypo commented Jun 17, 2024

Imports should be grouped in the following order:

1. standard library imports
2. related third party imports
3. local application/library specific imports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants