I’m using Jetson Orin nano 8gb custom board from Avermedia. I found an error when I try to open my python tkinter gui exe. My application uses yolov5 models also. I’m attaching the error as a text file . Please someone help me.
Thanks. seg_fault.pdf (306.6 KB)
Even though after installing tensorflow , the error still exists. Actually my application doesn’t need tensorflow. It just needs pytorch. Anyways, the same exe if put in a different jetson Orin nano board it works. But in some boards it’s giving segmentation fault core dumped. Pls help. Also attaching the txt file after running the exe when tensorflow was installed. after_tsflow_seg_error.pdf (727.8 KB)
Yes, identical jetson Orin nano 8gb board and same exe along with the supporting libraries. Everything is same. But in some devices I face this issue. If I reflash the OS and put all the jetpack libraries etc then this error will not occur. But I wanted to know why I’m getting this error in few devices but not in all.
Hmm but how to check exactly is the problem. When all the OS and it’s environment is same but still I get segmentation fault, then how can I debug the issue 😞. Is there anything like to check is two devices are same ? I mean in terms of dependencies etc?
By searching your log, it seems that the import order caused this issue.
Did you import tensorflow and cv2 in your application?
If yes, could you try the suggestion mentioned below that switch the import order?
Hi , thanks for your reply. At sphu 6402 Im actually joining a thread. Maybe the error is because of that? Im sharing the screenshot below and also the import order. I’m not using tensorflow anywhere in my application.
import base64
import csv
import getpass
import json
import logging
import sched
import shutil
import signal
from pprint import pprint
from playsound import playsound
import ultralytics
import binascii
import calendar
import datetime
import os.path
import queue
import re
import sqlite3
import subprocess
import sys
import threading
import time
import tkinter as tk
from tkinter import *
from tkinter import font
from tkinter import ttk, messagebox
import cv2
import requests
import torch
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from Crypto.Util.Padding import pad # pip install pycryptodome
import pyexcel_ods3 as ods
import serial
from PIL import Image, ImageTk
import glob
from tkinter import filedialog
I tried the way which you said. I changed the import order but still I’m getting the same error. Also the (sphu:6042) like this is present in the error no? that thing is nowhere related. I mean, if I try to run the exe multiple times, it says (sphu:8086) wherein I don’t have any code lines greater than 6000 lines. It also says (sphu:5982) like this . It’s random and I don’t think the error is because of any lines in the code.
I’m attaching the dmesg output below.
Please check. Also to mention, I had seen one circumstance where in one board my exe had actually opened normally on the first time. But the second time when I tried to open after closing it, I got the segmentation fault core dumped error. Do you think the problem is with code/exe/the jetson board itself? I saw some command on internet saying
and used it. So after applying that command again it used to open only once. And if I try to open it second time it throws segmentation fault core dumped.Please suggest.
Thanks. dmesg-1.pdf (231.5 KB)
Didn’t find a relevant error in the dmesg log so this might be a user-space issue.
Is it possible to share the source code with us so we can check it in our environment?
I think I have found a way out. I tried deleting “tensorflow” , “tensorflow_cpu_aws.libs” and “PyQt5” folders inside “_internal” folder.
And then tried to run the exe. Now it actually worked 😦! I’m very happy now … My exe opened now and is working fine… I don’t know why tensorflow is actually being imported when using pyinstaller for creating python exe. So does PyQt5. Anyways thank you so much for your time and help. Once again thanks. You may close this ticket. If I find any issues I will open a new one 😅 hope there won’t be such.