Hi (Py)Tango experts,
I have a problem with PyTango9.2.1. The server does not start (crashes)
The Platform is Windows7 32 (WIN32). Python27. Visual Studio 2008 (vc9).
I use Tango9.2.2 (compiled for win32(vc9) downloaded from this site) which I link dynamically.
I used first PyTango9.2.0 (Compiled by Sebastien @ Nexeya). and I had the problem.
Then I compiled PyTango9.2.1 (Sources from this site).
Compiled with VC9 (visual studio 2008), Win32
Boost_python 1.63.0 (I compiled boost with debug symbols (to see the debugger) for win32 as well, dynamically linked, with dynamic runtime)
This is the problem. When I call:
PyTango.Server.run
It crashes (with this message):
Unhandled exception at 0x10302d64 (_tango.pyd) in python.exe: 0xC0000005: Access violation writing location 0x103255a0.
The Tango database it is connecting to is the local host (Tango8.1.2b Win32 installation). It happens the same with a tango7 database. I haven’t tested connecting to a Tango9 database…
This is my example code, but it happens with all servers : (file: MyServer.py):
from PyTango.server import run, Device, command
class DfcPyTest(Device):
@command(din_type=str, dout_type=str)
def hello(self, message):
return message + ' Hi, how are you'
if __name__ == "__main__":
run([DfcPyTest])
And this the output of the debugger, just in case… (sorry for the long-scroll and many thanks in advance…). Any idea or clue would be very appreciated (my other question is: does anybody use this configuration (Win32, python27, vc9, Pytango9.2.X)?. Thank you so much.
_tango.pyd!PyUtil::server_init() + 0x34 bytes C++
_tango.pyd!server_init_overload::non_void_return_type::gen<boost::mpl::vector3<void,Tango::Util &,bool> >::func_0() + 0xc bytes C++
_tango.pyd!boost::python::objects::caller_py_function_impl<boost::python::detail::caller<void (*)(Tango::Util &),boost::python::default_call_policies,boost::mpl::vector2<void,Tango::Util &> > >::operator()() + 0x3b bytes C++
> boost_python-vc90-mt-gd-1_63.dll!boost::python::objects::py_function::operator()(_object * args=0x01737c70, _object * kw=0x00000000) Line 148 C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::objects::function::call(_object * args=0x01737c70, _object * keywords=0x00000000) Line 226 + 0x24 bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::objects::`anonymous namespace'::bind_return::operator()() Line 585 + 0x19 bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::detail::function::void_function_ref_invoker0<boost::python::objects::`anonymous namespace'::bind_return,void>::invoke(boost::detail::function::function_buffer & function_obj_ptr={...}) Line 195 C++
boost_python-vc90-mt-gd-1_63.dll!boost::function0<void>::operator()() Line 771 + 0x14 bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::detail::exception_handler::operator()(const boost::function0<void> & f={...}) Line 75 C++
_tango.pyd!boost::python::detail::translate_exception<Tango::NotAllowed,void (*)(Tango::NotAllowed const &)>::operator()() + 0x35 bytes C++
_tango.pyd!boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool,boost::python::detail::translate_exception<Tango::NotAllowed,void (*)(Tango::NotAllowed const &)>,boost::_bi::list3<boost::arg<1>,boost::arg<2>,boost::_bi::value<void (*)(Tango::NotAllowed const &)> > >,bool,boost::python::detail::exception_handler const &,boost::function0<void> const &>::invoke() + 0x17 bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::function2<bool,boost::python::detail::exception_handler const &,boost::function0<void> const &>::operator()(const boost::python::detail::exception_handler & a0={...}, const boost::function0<void> & a1={...}) Line 771 + 0x1c bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::detail::exception_handler::handle(const boost::function0<void> & f={...}) Line 42 C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::detail::exception_handler::operator()(const boost::function0<void> & f={...}) Line 70 + 0xf bytes C++
_tango.pyd!boost::python::detail::translate_exception<Tango::DeviceUnlocked,void (*)(Tango::DeviceUnlocked const &)>::operator()() + 0x35 bytes C++
_tango.pyd!boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool,boost::python::detail::translate_exception<Tango::DeviceUnlocked,void (*)(Tango::DeviceUnlocked const &)>,boost::_bi::list3<boost::arg<1>,boost::arg<2>,boost::_bi::value<void (*)(Tango::DeviceUnlocked const &)> > >,bool,boost::python::detail::exception_handler const &,boost::function0<void> const &>::invoke() + 0x17 bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::function2<bool,boost::python::detail::exception_handler const &,boost::function0<void> const &>::operator()(const boost::python::detail::exception_handler & a0={...}, const boost::function0<void> & a1={...}) Line 771 + 0x1c bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::detail::exception_handler::handle(const boost::function0<void> & f={...}) Line 42 C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::detail::exception_handler::operator()(const boost::function0<void> & f={...}) Line 70 + 0xf bytes C++
_tango.pyd!boost::python::detail::translate_exception<Tango::EventSystemFailed,void (*)(Tango::EventSystemFailed const &)>::operator()() + 0x35 bytes C++
_tango.pyd!boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool,boost::python::detail::translate_exception<Tango::EventSystemFailed,void (*)(Tango::EventSystemFailed const &)>,boost::_bi::list3<boost::arg<1>,boost::arg<2>,boost::_bi::value<void (*)(Tango::EventSystemFailed const &)> > >,bool,boost::python::detail::exception_handler const &,boost::function0<void> const &>::invoke() + 0x17 bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::function2<bool,boost::python::detail::exception_handler const &,boost::function0<void> const &>::operator()(const boost::python::detail::exception_handler & a0={...}, const boost::function0<void> & a1={...}) Line 771 + 0x1c bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::detail::exception_handler::handle(const boost::function0<void> & f={...}) Line 42 C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::detail::exception_handler::operator()(const boost::function0<void> & f={...}) Line 70 + 0xf bytes C++
_tango.pyd!boost::python::detail::translate_exception<Tango::AsynReplyNotArrived,void (*)(Tango::AsynReplyNotArrived const &)>::operator()() + 0x35 bytes C++
_tango.pyd!boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool,boost::python::detail::translate_exception<Tango::AsynReplyNotArrived,void (*)(Tango::AsynReplyNotArrived const &)>,boost::_bi::list3<boost::arg<1>,boost::arg<2>,boost::_bi::value<void (*)(Tango::AsynReplyNotArrived const &)> > >,bool,boost::python::detail::exception_handler const &,boost::function0<void> const &>::invoke() + 0x17 bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::function2<bool,boost::python::detail::exception_handler const &,boost::function0<void> const &>::operator()(const boost::python::detail::exception_handler & a0={...}, const boost::function0<void> & a1={...}) Line 771 + 0x1c bytes C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::detail::exception_handler::handle(const boost::function0<void> & f={...}) Line 42 C++
boost_python-vc90-mt-gd-1_63.dll!boost::python::detail::exception_handler::operator()(const boost::function0<void> & f={...}) Line 70 + 0xf bytes C++
(...)
python27.dll!53f33d9b()
python.exe!1c931180()
kernel32.dll!75f4ef1c()
ntdll.dll!7777367a()
ntdll.dll!7777364d()