Ticket #2562 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

SEGFAULT: When closing the python script window while a script is running.

Reported by: Janik Zikovsky Owned by: Martyn Gigg
Priority: critical Milestone: Iteration 28
Component: Mantid Keywords:
Cc: doucetm@… Blocked By:
Blocking: Tester: Owen Arnold

Description

  • Open a script window.
  • Load a script
  • Start it.
  • Close the window using the X in the corner before the script ends.

Stack trace:

Thread [1] (Suspended: Signal 'SIGSEGV' received. Description: Segmentation fault.)	
	73 PyObject_RichCompare() object.c:946 0x00007ffff3403f41	
	72 PyObject_RichCompareBool() object.c:1001 0x00007ffff34042ad	
	71 lookdict() dictobject.c:319 0x00007ffff33fdfe1	
	70 PyDict_GetItem() dictobject.c:658 0x00007ffff33fec62	
	69 PySymtable_Lookup() symtable.c:289 0x00007ffff3486f37	
	68 compiler_enter_scope() compile.c:453 0x00007ffff34691d1	
	67 compiler_mod() compile.c:1203 0x00007ffff346f284	
	66 PyAST_Compile() compile.c:288 0x00007ffff346f284	
	65 Py_CompileStringFlags() pythonrun.c:1408 0x00007ffff348377f	
	64 PythonScript::compile() PythonScript.cpp:164 0x0000000000887f28	
	63 PythonScript::exec() PythonScript.cpp:305 0x0000000000888e51	
	62 PythonScript::updatePath() PythonScript.cpp:110 0x0000000000887c40	
	61 ScriptManagerWidget::closeTabAtIndex() ScriptManagerWidget.cpp:1065 0x00000000008b91f0	
	60 ScriptManagerWidget::closeAllTabs() ScriptManagerWidget.cpp:433 0x00000000008b5c24	
	59 ScriptingWindow::closeEvent() ScriptingWindow.cpp:355 0x00000000008b230c	
	58 QWidget::event()  0x00007ffff4f9c080	
	57 QMainWindow::event()  0x00007ffff538341b	
	56 QApplicationPrivate::notify_helper()  0x00007ffff4f45fdc	
	55 QApplication::notify()  0x00007ffff4f4baed	
	54 MantidApplication::notify() MantidApplication.cpp:25 0x000000000099794f	
	53 QCoreApplication::notifyInternal()  0x00007ffff42a4cdc	
	52 QWidgetPrivate::close_helper()  0x00007ffff4f9fbe1	
	51 QApplication::x11ClientMessage()  0x00007ffff4fbd076	
	50 QApplication::x11ProcessEvent()  0x00007ffff4fcd346	
	49 <symbol is not available> 0x00007ffff4ff90e2	
	48 g_main_context_dispatch()  0x00007fffecb05342	
	47 <symbol is not available> 0x00007fffecb092a8	
	46 g_main_context_iteration()  0x00007fffecb0945c	
	45 QEventDispatcherGlib::processEvents()  0x00007ffff42d1193	
	44 <symbol is not available> 0x00007ffff4ff8a4e	
	43 QCoreApplication::processEvents()  0x00007ffff42a802f	
	42 MantidUI::runAlgorithmAsync_PyCallback() MantidUI.cpp:1708 0x00000000009d044f	
	41 meth_MantidUI_runAlgorithmAsync_PyCallback() sipqtipart0.cpp:1773 0x0000000000a5179b	
	40 call_function() ceval.c:3750 0x00007ffff3463b70	
	39 PyEval_EvalFrameEx() ceval.c:2412 0x00007ffff3463b70	
	38 PyEval_EvalCodeEx() ceval.c:3000 0x00007ffff34658b0	
	37 fast_function() ceval.c:3846 0x00007ffff3463beb	
	36 call_function() ceval.c:3771 0x00007ffff3463beb	
	35 PyEval_EvalFrameEx() ceval.c:2412 0x00007ffff3463beb	
	34 PyEval_EvalCodeEx() ceval.c:3000 0x00007ffff34658b0	
	33 PyEval_EvalCode() ceval.c:541 0x00007ffff3465982	
	32 PythonScript::executeScript() PythonScript.cpp:382 0x0000000000889177	
	31 PythonScript::exec() PythonScript.cpp:339 0x0000000000888fdf	
	30 ScriptManagerWidget::runScriptCode() ScriptManagerWidget.cpp:574 0x00000000008b63c6	
	29 ScriptManagerWidget::executeAll() ScriptManagerWidget.cpp:496 0x00000000008b5ee1	
	28 ScriptManagerWidget::execute() ScriptManagerWidget.cpp:473 0x00000000008b5dd9	
	27 ScriptManagerWidget::qt_metacall() moc_ScriptManagerWidget.cxx:161 0x0000000000acc79e	
	26 QMetaObject::activate()  0x00007ffff42bcb27	
	25 QAction::activated()  0x00007ffff4f3e7b1	
	24 QAction::activate()  0x00007ffff4f3ff71	
	23 QAction::event()  0x00007ffff4f42257	
	22 QApplicationPrivate::notify_helper()  0x00007ffff4f45fdc	
	21 QApplication::notify()  0x00007ffff4f4baed	
	20 MantidApplication::notify() MantidApplication.cpp:25 0x000000000099794f	
	19 QCoreApplication::notifyInternal()  0x00007ffff42a4cdc	
	18 <symbol is not available> 0x00007ffff4f817d6	
	17 <symbol is not available> 0x00007ffff4f835e7	
	16 QApplication::notify()  0x00007ffff4f4d6e4	
	15 MantidApplication::notify() MantidApplication.cpp:25 0x000000000099794f	
	14 QCoreApplication::notifyInternal()  0x00007ffff42a4cdc	
	13 <symbol is not available> 0x00007ffff4ff34ba	
	12 <symbol is not available> 0x00007ffff4ff5ac0	
	11 QApplication::x11ProcessEvent()  0x00007ffff4fcccb4	
	10 <symbol is not available> 0x00007ffff4ff90e2	
	9 g_main_context_dispatch()  0x00007fffecb05342	
	8 <symbol is not available> 0x00007fffecb092a8	
	7 g_main_context_iteration()  0x00007fffecb0945c	
	6 QEventDispatcherGlib::processEvents()  0x00007ffff42d1193	
	5 <symbol is not available> 0x00007ffff4ff8a4e	
	4 QEventLoop::processEvents()  0x00007ffff42a3a02	
	3 QEventLoop::exec()  0x00007ffff42a3dec	
	2 QCoreApplication::exec()  0x00007ffff42a7ebb	
	1 main() main.cpp:175 0x00000000007ecebf	

Change History

comment:1 Changed 10 years ago by Mathieu Doucet

  • Cc doucetm@… added

Probably related to #2556. I looked into it and couldn't find the problem. I did notice that python scripting in qtiplot has changed a bit since we forked.

comment:2 Changed 10 years ago by Nick Draper

  • Owner set to Martyn Gigg
  • Status changed from new to assigned

comment:3 Changed 10 years ago by Martyn Gigg

  • Status changed from assigned to accepted

comment:4 Changed 10 years ago by Martyn Gigg

(In [10164]) Refs #2562. Fixed crash when closing the scripting window by removing the 'cross' buutton. The window can still be hidden but now the only thing that can close it is the application itself.

comment:5 Changed 10 years ago by Martyn Gigg

(In [10192]) Refs #2562 #2556. Should fix problems with scripting window interaction when other things are runnning. The GIL needs aquiring so that Pythn can switch between different running sections, i.e. a Python algorithm from the GUI and a script. Annoying small local changes seems to have had quite an impact.

comment:6 Changed 10 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:7 Changed 9 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:8 Changed 9 years ago by Owen Arnold

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Tested on windows. Nightly build of MantidPlot 26/04/2011. Close script window option is still available despite [10164] changeset.

comment:9 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 28 to Iteration 29

Bulk move of tickets at the end of iteration 28

comment:10 Changed 9 years ago by Martyn Gigg

  • Status changed from reopened to accepted

comment:11 Changed 9 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

The close button can't seem to be removed easily on Windows. The more important thing regarding crashing when running should be fixed though and should be tested.

comment:12 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 29 to Iteration 28

comment:13 Changed 9 years ago by Owen Arnold

  • Status changed from verify to verifying

comment:14 Changed 9 years ago by Owen Arnold

  • Status changed from verifying to closed

Doesn't SEGFAULT. GUI is inactive until python task completed on GUI thread and system may therefore offer to close the program.

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3409

Note: See TracTickets for help on using tickets.