I subclassed IStackObserver and added a callback to the stack. However, the program is terminating with a Swig::DirectorMethodException when my callback is supposed to be called. Here is some of the back trace.
Starting program: /usr/bin/python opendnp3test.py
[Thread debugging using libthread_db enabled]
[New Thread 0xb74f7b70 (LWP 28524)]
terminate called after throwing an instance of 'Swig::DirectorMethodException'
Program received signal SIGABRT, Aborted.
0xb7fe2430 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7fe2430 in __kernel_vsyscall ()
#1 0xb7ca7651 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7caaa82 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb766152f in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#4 0xb765f465 in ?? () from /usr/lib/libstdc++.so.6
#5 0xb765f4a2 in std::terminate() () from /usr/lib/libstdc++.so.6
#6 0xb765f5e1 in __cxa_throw () from /usr/lib/libstdc++.so.6
#7 0xb7b231e5 in Swig::DirectorMethodException::raise (this=0x8665878, aState=apl::dnp::SS_COMMS_DOWN) at DNP3Java/PythonDNP3.cpp:2994
#8 SwigDirector_IStackObserver::OnStateChange (this=0x8665878, aState=apl::dnp::SS_COMMS_DOWN) at DNP3Java/PythonDNP3.cpp:7148#9 0xb7a1c44f in apl::dnp::Master::UpdateState (this=0x86389a0, aState=apl::dnp::SS_COMMS_DOWN) at DNP3/Master.cpp:113
#10 0xb7a1ccf8 in Master (this=0x86389a0, apLogger=0x865fc58, aCfg=..., apAppLayer=0x86388bc, apPublisher=0x82efbb8, apTaskGroup=0x85cc748, apTimerSrc=
0x8519218, apTimeSrc=0xb7acacf8) at DNP3/Master.cpp:105
#11 0xb7a2133d in MasterStack (this=0x8638470, apLogger=0x85c7908, apTimerSrc=0x8519218, apPublisher=0x82efbb8, apTaskGroup=0x85cc748, arCfg=...)
at DNP3/MasterStack.cpp:30
#12 0xb79f5210 in apl::dnp::AsyncStackManager::AddMaster (this=0x8519208, arPortName=..., arStackName=..., aLevel=apl::LEV_INFO, apPublisher=0x82efbb8,
arCfg=...) at DNP3/AsyncStackManager.cpp:119
#13 0xb7a5b1b3 in apl::dnp::StackManager::AddMaster (this=0x85872e0, arPortName=..., arStackName=..., aLevel=apl::LEV_INFO, apPublisher=0x82efbb8, arCfg=...)
at DNP3/StackManager.cpp:66
#14 0xb7b03044 in _wrap_StackManager_AddMaster (args=
(<StackManager(this=<SwigPyObject at remote 0x85a72c0>) at remote 0x860356c>, 'tcpclient', 'master', 8, <DataObserver(this=<SwigPyObject at remote 0x85a7290>, newData=False) at remote 0x8600ccc>, <MasterStackConfig(this=<SwigPyObject at remote 0x85a72d8>) at remote 0x860532c>)) at DNP3Java/PythonDNP3.cpp:34031