View Single Post
Old 05-01-2012, 05:25 AM   #5
tuxor
Addict
tuxor has a thesaurus and is not afraid to use it!tuxor has a thesaurus and is not afraid to use it!tuxor has a thesaurus and is not afraid to use it!tuxor has a thesaurus and is not afraid to use it!tuxor has a thesaurus and is not afraid to use it!tuxor has a thesaurus and is not afraid to use it!tuxor has a thesaurus and is not afraid to use it!tuxor has a thesaurus and is not afraid to use it!tuxor has a thesaurus and is not afraid to use it!tuxor has a thesaurus and is not afraid to use it!tuxor has a thesaurus and is not afraid to use it!
 
Posts: 320
Karma: 99999
Join Date: Oct 2011
Location: Germany
Device: Onyx Boox M92, Icarus Illumina E653
By the way, I compiled the first module for the PyOnyx API and I'm running into a segmentation fault, when using this code.
Code:
import PyOnyx 
from sys import argv
from PyQt4.QtGui import QApplication,QMessageBox
from PyQt4.QtCore import QObject

app = QApplication(argv)
app.setApplicationName("ack_widget")
about = PyOnyx.ui.MessageDialog(QMessageBox.Icon(QMessageBox.Information), app.tr(argv[1]), app.tr(argv[2]), QMessageBox.No | QMessageBox.Yes)

PyOnyx.sys.SysStatus.instance().setSystemBusy(False)

decision = about.exec_()

print decision
Any ideas how to debug a segmentation fault? It must be somehow related to the line with "about = PyOnyx.ui.MessageDialog(". Because when I comment out everything behind that line, the script runs fine. And the "PyOnyx.sys.SysStatus..." line runs fine, when tested separately.

Last edited by tuxor; 05-01-2012 at 06:07 AM.
tuxor is offline   Reply With Quote