Ticket #4448 (closed: worksforme)

Opened 9 years ago

Last modified 5 years ago

Crash with new Python API

Reported by: Janik Zikovsky Owned by: Russell Taylor
Priority: blocker Milestone: Release 2.0
Component: MantidPlot Keywords:
Cc: russell.taylor@… Blocked By:
Blocking: Tester: Janik Zikovsky

Description

If you have the new python API enabled by default, the following script crashes MantidPlot somewhere in the notifications of workspace replaced:

CreateMDWorkspace(Dimensions='3',Extents='0,10,0,10,0,10',Names='x,y,z',Units='m,m,m',SplitInto='5',MaxRecursionDepth='20',OutputWorkspace='mdw')
FakeMDEventData(InputWorkspace="mdw",  UniformParams="1e5")

This occurs if you fill in values in a pointy-clicky way as well. The same algorithms do not fail when run as C++ algorithms alonge (e.g. in unit tests)

Change History

comment:1 Changed 9 years ago by Janik Zikovsky

Refs #4448: use old-style Python API by default to fix issues

Changeset: 8d34f1b126f22f06cd360c273ea362bb9be18fd3

comment:2 Changed 9 years ago by Janik Zikovsky

Refs #4448: restore new-style API default. Disabled MantidPlot tests

... that fail because of it.

Changeset: d7e2e4a0c2b8945482a0cab5b0d07825df1751e6

comment:3 Changed 9 years ago by Russell Taylor

The stack trace for your enjoyment. It's going into the directory of the old PythonAPI which surprised me slightly.

raise() at 0x3c6b232885	
abort() at 0x3c6b234065	
__assert_fail_base() at 0x3c6b22b9fe	
__assert_fail() at 0x3c6b22bac0	
boost::python::instance_holder::install() at class.cpp:306 0x7fffcf82acb5	
boost::python::objects::make_instance_impl<Mantid::API::IMDEventWorkspace, boost::python::objects::pointer_holder<boost::shared_ptr<Mantid::API::IMDEventWorkspace>, Mantid::API::IMDEventWorkspace>, boost::python::objects::make_ptr_instance<Mantid::API::IMDEventWorkspace, boost::python::objects::pointer_holder<boost::shared_ptr<Mantid::API::IMDEventWorkspace>, Mantid::API::IMDEventWorkspace> > >::execute<boost::shared_ptr<Mantid::API::IMDEventWorkspace> >() at make_instance.hpp:43 0x7fffcf6ba8e0	
boost::python::objects::class_value_wrapper<boost::shared_ptr<Mantid::API::IMDEventWorkspace>, boost::python::objects::make_ptr_instance<Mantid::API::IMDEventWorkspace, boost::python::objects::pointer_holder<boost::shared_ptr<Mantid::API::IMDEventWorkspace>, Mantid::API::IMDEventWorkspace> > >::convert() at class_wrapper.hpp:42 0x7fffcf6af4d3	
boost::python::converter::as_to_python_function<boost::shared_ptr<Mantid::API::IMDEventWorkspace>, boost::python::objects::class_value_wrapper<boost::shared_ptr<Mantid::API::IMDEventWorkspace>, boost::python::objects::make_ptr_instance<Mantid::API::IMDEventWorkspace, boost::python::objects::pointer_holder<boost::shared_ptr<Mantid::API::IMDEventWorkspace>, Mantid::API::IMDEventWorkspace> > > >::convert() at as_to_python_function.hpp:40 0x7fffcf6a285e	
boost::python::converter::registration::to_python() at registry.cpp:104 0x7fffcf825957	
boost::python::converter::shared_ptr_to_python<Mantid::API::IMDEventWorkspace>() at shared_ptr_to_python.hpp:23 0x7fffcf7564ad	
boost::python::detail::shared_ptr_to_python_value<boost::shared_ptr<Mantid::API::IMDEventWorkspace> const&>::operator() at to_python_value.hpp:170 0x7fffcf752fd8	
boost::python::detail::invoke<boost::python::detail::caller_arity<2u>::impl<F, Policies, Sig>::operator() at invoke.hpp:88 0x7fffcf74a327	
impl<boost::shared_ptr<Mantid::API::IMDEventWorkspace> () at caller.hpp:223 0x7fffcf72913e	
boost::python::objects::caller_py_function_impl<boost::python::detail::caller<boost::shared_ptr<Mantid::API::IMDEventWorkspace> () at py_function.hpp:38 0x7fffcf6fed31	
boost::python::objects::py_function::operator() at py_function.hpp:143 0x7fffcf83f16b	
boost::python::objects::function::call() at function.cpp:226 0x7fffcf82e4ea	
boost::python::objects::() at function.cpp:585 0x7fffcf82fc8f	
boost::detail::function::void_function_ref_invoker0<boost::python::objects::<unnamed>::bind_return, void>::invoke() at function_template.hpp:188 0x7fffcf83ddb1	
boost::function0<void>::operator() at function_template.hpp:1,013 0x7fffdd59687b	
boost::python::handle_exception_impl() at errors.cpp:25 0x7fffcf82717a	
boost::python::handle_exception<boost::python::objects::<unnamed>::bind_return>() at errors.hpp:29 0x7fffcf839af3	
boost::python::objects::function_call() at function.cpp:626 0x7fffcf82fd6f	
PyObject_Call() at 0x3c7a244043	
PyEval_EvalFrameEx() at 0x3c7a2ddd84	
PyEval_EvalFrameEx() at 0x3c7a2df99f	
PyEval_EvalCodeEx() at 0x3c7a2e0467	
0x3c7a26eac0	
PyObject_Call() at 0x3c7a244043	
0x3c7a25941f	
PyObject_Call() at 0x3c7a244043	
PyEval_CallObjectWithKeywords() at 0x3c7a2d8aa3	
PyEval_CallMethod() at 0x3c7a2f7ed8	
boost::python::call_method<void, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >() at call_method.hpp:66 0x7fffcf681e05	
Mantid::PythonAPI::PyCall_OneArg<void, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::dispatch() at PythonInterfaceFunctions.h:197 0x7fffcf675ea4	
Mantid::PythonAPI::FrameworkProxyCallback::workspaceReplaced() at api_exports.h:58 0x7fffcf6748ae	
Mantid::PythonAPI::FrameworkManagerProxy::replaceNotificationReceived() at FrameworkManagerProxy.cpp:598 0x7fffcf5e6c45	
Poco::NObserver<Mantid::PythonAPI::FrameworkManagerProxy, Mantid::Kernel::DataService<Mantid::API::Workspace>::AfterReplaceNotification>::notify() at NObserver.h:103 0x7fffcf5f4aa8	
Poco::NotificationCenter::postNotification() at 0x7ffff333d8fa	
Mantid::Kernel::DataService<Mantid::API::Workspace>::addOrReplace() at DataService.h:233 0x7ffff6f257da	
Mantid::API::AnalysisDataServiceImpl::addOrReplace() at AnalysisDataService.cpp:62 0x7ffff6f249ac	
Mantid::API::WorkspaceProperty<Mantid::API::IMDEventWorkspace>::store() at WorkspaceProperty.h:306 0x7ffff702c543	

comment:4 Changed 9 years ago by Russell Taylor

  • Owner changed from Martyn Gigg to Russell Taylor
  • Status changed from new to verify
  • Resolution set to worksforme

This no longer crashes for me.

comment:5 Changed 9 years ago by Janik Zikovsky

  • Status changed from verify to verifying
  • Tester set to Janik Zikovsky

comment:6 Changed 9 years ago by Janik Zikovsky

  • Status changed from verifying to closed

Confirmed working for me on Ubuntu 11.04 too.

comment:7 Changed 9 years ago by Janik Zikovsky

Refs #4448: Re-enable MantidPlot tests that crashed with new pythonAPI

Changeset: 8ab3fcfe7c28dff1b0dbcd01b4a36f34578017a4

comment:8 Changed 9 years ago by Janik Zikovsky

Refs #4448 fix an reenable a test

Changeset: 585e798021c7a46e66b8a08288c26e2fbd08b840

comment:9 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5295

Note: See TracTickets for help on using tickets.