Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
来源:互联网 发布:51单片机读取sd卡视频 编辑:程序博客网 时间:2024/05/22 14:27
使用Qt写了个窗口,运行报错,无法正常运行python程序,获得的报错信息如下:
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
经过仔细查看发现是在使用Qt模块导入了Qt4和Qt5两个模块(存在重合的部分),部分代码如下:
//Qt5from PyQt5 import QtCore, QtGui, QtWidgetsfrom PyQt5.QtGui import QFont, QBrushfrom PyQt5.QtWidgets import QTableWidgetfrom PyQt4 import Qt //QT4class Ui_TabWidget(object): def setupUi(self,TabWidget): TabWidget.setObjectName("TabWidget") TabWidget.resize(962, 618) self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.lineEdit = QtWidgets.QLineEdit(self.tab) self.lineEdit.setGeometry(QtCore.QRect(10, 20, 291, 31)) self.lineEdit.setObjectName("lineEdit") self.label = QtWidgets.QLabel(self.tab) self.label.setGeometry(QtCore.QRect(310, 30, 54, 21)) self.label.setObjectName("label") self.fontComboBox = QtWidgets.QFontComboBox(self.tab) self.fontComboBox.setGeometry(QtCore.QRect(350, 20, 161, 31)) self.fontComboBox.setObjectName("fontComboBox") self.pushButton = QtWidgets.QPushButton(self.tab) ......
我尝试着去除Qt4和Qt5重合导入的模块,运行发现可以成功,自以为这就是失败的原因了,为了放心我又单独测试了一下导入Qt4,代码如下:
# !/usr/bin/env python# -*- encoding:utf-8 -*-import sysfrom PyQt4 import QtCore, QtGui, QtWidgetsif __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) w = QtWidgets.QWidget() w.resize(250, 150) w.move(300, 300) w.setWindowTitle('helloworld') w.show() sys.exit(app.exec_())
结果运行如下:
/usr/bin/python2.7 ~/helloworldProcess finished with exit code 139 (interrupted by signal 11: SIGSEGV)
如此可以发现,不是由于重复导入模块而导致运行失败的,可以确认是由于Qt4模块自身出现了异常,猜测可能是由于sip导致Qt4模块的异常,然后发现我并没有PyQt4_gpl_x11,为了验证,我重新安装了PyQt4来验证,Ubuntu中安装配置过程如下:
1)安装sip
地址:http://www.riverbankcomputing.co.uk/software/sip/download
cd sip-4.19.3/ sudo python configure.py sudo make install
2)安装Qt4的依赖
sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig qt4-demos qt4-designersudo apt-get install libqwt5-qt4 libqwt5-qt4-dev
3)安装PyQt4
cd PyQt4_gpl_x11-4.12.1sudo python configure.py sudo make sudo make install
重新运行,成功运行!!!
enjoytoday,enjoycoding
阅读全文
0 0
- Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
- cordova Process finished with exit code -1
- process finished with exit code 52
- android Process finished with exit code 0
- tensorflow bug: Process finished with exit code -1073740791 (0xC0000409)
- pyCharm Process finished with exit code -1073740791 (0xC0000409)
- bug宝典node篇 nodejs Process finished with exit code 0
- 运行tensorflow的例子,出现Process finished with exit code 3问题
- python 使用requests时提示Process finished with exit code -1073741819 (0xC0000005)
- Python 运行出现Process finished with exit code -1073741515 (0xC0000135)错误
- python 中文字符报错Process finished with exit code 0
- finished with exit code -1073740791 (0xC0000409)
- Android Studio各种坑爹之:finished with non-zero exit value 1和Return code 1 for dex process.
- puppet kick forbidden finished with exit code 2
- Android signal 11 (SIGSEGV) Native Code crash 跟踪
- Fatal signal 11 (SIGSEGV) at 0x390955ae (code=1)
- Fatal signal 11 (SIGSEGV) at 0x000007c4 (code=1)
- Fatal signal 11 (SIGSEGV) at 0x390955ae (code=1)
- Ubuntu 14.04 不小心卸载了 网络管理器(Network Manager)后
- 受保护的成员变量和方法(protected)
- VMware Workstation12安装Ubuntu和VMware Tools教程
- 6.2 代理的应用
- 【模板】第二类斯特林数Stirling
- Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
- Cocos2d-x学习笔记之数据存取方式
- MySQLWorkbench根据已有EER图导出sql脚本文件
- 新疆大学(新大)OJ xju 1010: 四个年级 C++ STL map 将4层循环优化成2层循环可解
- 洛谷P3933 Chtholly Nota Seniorious 【二分 + 贪心 + 矩阵旋转】
- Ubuntu14.04安装OpenCV
- 常见清除浮动方法总结
- shiro源码分析篇3:用户登录缓存登录信息
- 个人总结11