def model_run( self, model_context ): from camelot.view import action_steps ok = yield action_steps.MessageBox( text = 'Are you sure you want to segfault the application', standard_buttons = QtGui.QMessageBox.No | QtGui.QMessageBox.Yes ) if ok == QtGui.QMessageBox.Yes: import faulthandler faulthandler._read_null()
def model_run(self, model_context): from camelot.view import action_steps ok = yield action_steps.MessageBox( text='Are you sure you want to segfault the application', standard_buttons=QtGui.QMessageBox.No | QtGui.QMessageBox.Yes) if ok == QtGui.QMessageBox.Yes: import faulthandler faulthandler._read_null()
def read_null(self): """Create a segmentation fault by reading null, this is to test the faulthandling functions. this method is triggered by pressing :kbd:`Ctrl-Alt-0` in the GUI""" ok = QtGui.QMessageBox.critical( None, 'Experimental segfault', 'Are you sure you want to segfault the application', buttons = QtGui.QMessageBox.No | QtGui.QMessageBox.Yes ) if ok == QtGui.QMessageBox.Yes: import faulthandler faulthandler._read_null()