警告:QApplication不是在main()线程中创建的

时间:2018-08-29 11:21:29

标签: python linux pycharm sigsegv

当我尝试使用〜threading模块〜开发并行python应用程序时,出现以下错误

  

Python进程以退出代码139完成(被信号11中断:   SIGSEGV)“

我正在使用python 3.6,Linux 16.04和Pycharm 2018

我不明白原因以及如何解决。

代码示例:

numOfThread = 8
class myThread (threading.Thread):
   def __init__(self, thread_id, name, frames):
      threading.Thread.__init__(self)
      self.thread_id = thread_id
      self.name = name
      self.frames = frames
      self.out_frame = None

   def run(self):
      print("Starting " + self.name)
      self.out_frame = trackingmario(self.frames)


list_of_threads = []

print("Start.....\n")

for i in range(numOfThread):
    list_of_threads.append(myThread(i, 'thread_'+str(i), lists[i]))


for i in range(numOfThread):
    list_of_threads[i].start()

for ti in list_of_threads:
    ti.join()

Image show the error : "Python Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)"

0 个答案:

没有答案