(OK) 调试cBPM—CentOS7—gdb—gdbserver—问题的解决—完整的调试过程—成功
+++++++++++++编译Criteria.Tools.Executor————成功———调试
宿主机:
codeblocks 全局参数 设置:
【Settings】->【debugger】->【create config】->【arm-gdb】->【executable path】
/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Toolchain executable】->【debugger】
arm-gdb
codeblocks 局部参数 设置:
右健单击【Criteria.WorkflowEngine】,选择【Properties】->【debugger】->【debug win32】192.168.0.101:1111
[root@localhost gdbserver]# pwd
/opt/android-on-linux/android-ndk-r8e/prebuilt/android-arm/gdbserver
[root@localhost gdbserver]# ls
gdbserver
[root@localhost gdbserver]# adb push gdbserver /data/data/criteria
[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# adb push executer /data/data/criteria
----------------------OK---------------------手机:
shell@mb526:/ PATH:/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/
使用上面有问题:
readchar: Got EOF
Remote side has terminated connection. GDBserver will reopen the connection.
------------------------------------------------------------------------将配置文件复制到 手机
[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# ls
executer
[root@localhost lib]# adb push executer /data/data/criteria/
[root@localhost Tools.Executor]# ls
database executer notepad.txt src temp temp.c TestNotePad.xml
[root@localhost Tools.Executor]# pwd
/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor
[root@localhost Tools.Executor]# adb push database/ /data/data/criteria/database
------------------------------------------------------------------------
------------------------------------------------------------------------使用这段
使用下面可以:
[root@localhost Tools.Executor]# export PATH=vCont;C0b:p1449.1449;c:p1449.-1#3c...Packet received: Xb;process:1449
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
-------------------------------------
0x001561b8 in bOS::XML::Data::XMLObject::init (this=0x4, root=0x5f7568)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObject.cpp:62
62 this->init();
-------------------------------------
(gdb) bt
#0 0x001561b8 in bOS::XML::Data::XMLObject::init (this=0x4, root=0x5f7568)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObject.cpp:62
#1 0x000e0f9c in DataManager::Panorama::DataBase::Connection::init (this=0x4, node=0x5f7568)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/Connection.cpp:34
#2 0x0003c67c in DataManager::DataBase::DataBaseTemplate::setXMLConnection (this=0x0, _connection=0x5eb4e0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/DataBaseTemplate.cpp:58
#3 0x00034670 in DataManager::DataBase::DataBaseHelper::open (this=0x5eb0a8, sConfigurationFile=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/DataBaseHelper.cpp:184
#4 0x0000ed10 in InitSessionWithParams (acConfigFile=0x5b74b8 "/data/data/criteria/database/Criteria.xml", response=0x5b4b20)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp:78
#5 0x0000e910 in InitSession (response=0x5b4b20)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp:63
#6 0x0000b314 in main (argc=2, argv=0xbec3da34)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:63
(gdb)
-------------------------------------
设置断点
break bOSXMLHelper.cpp:170
break DataBaseHelper.cpp:101
-------------------------------------问题解决,方法如下:
codeblocks 局部参数 设置: Criteria.WorkflowEngine
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Compiler Settings】->【#defines】
添加 _FILESYSTEM_
-------------------------------------调试问题4-----------------------------------调试到此处,停止,段错误
Criteria session Initialization.....(look at Executor trace file)
Criteria session Initialization [OK]
Create process instance from template ——> /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:78
Child terminated with signal = 0xb (SIGSEGV)
--------------
Criteria session Initialization.....(look at Executor trace file)
Criteria session Initialization [OK]
Create process instance from template
Child terminated with signal = 0xb (SIGSEGV)
--------------查看日志文件Executor-*.trace,找原因
shell@mb526:/data/data/criteria less Executor-5331-20151014-092322.trace
09:23:22.381-1073824092- FileSystemConnection::init-CODEBLOCK-FileSystemConnection.cpp-OUT[17ms]
09:23:22.382-1073824092- FileSystemDataBase::open-INFO-FileSystemDataBase.cpp[53]-Reading Role File [/data/data/criteria/database/Criteria.Roles.xml]
--------------设置断点
break FileSystemDataBase.cpp:53
break BaseWorkflowEvent.cpp:22
break Workflow.cpp:184
break Workflow.cpp:373
InitSessionWithParams (acConfigFile=0x5c7ed0 "/data/data/criteria/database/Criteria.xml", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp:80
80 CM_TRACE_INFO("Instancing Engine")
WorkflowEngine::Criteria::Core::Engine::instance ()
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:24
24 {
(main.cpp:95)——>
startProcessInSynchWay (acProcessID=0x605290 "2015-1014-0953-07739-991735505", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:365
365 {
WorkflowEngine::Criteria::Core::Engine::instance ()
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:24
24 {
(gdb) bt
#0 0xe50b0008 in ?? ()
#1 0x001059f4 in WorkflowEngine::Criteria::Event::WorkflowEvent::BaseWorkflowEvent::getProcessID (this=0xbee8e184)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp:22
#2 0x000a3e68 in WorkflowEngine::Criteria::Event::Listener::WorkflowListener::eventAction (this=0x61abc0, event=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp:62
#3 0x0009e074 in WorkflowEngine::Criteria::Event::EventMaker::throwEvent (this=0x60baf4, evt=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/EventMaker.cpp:36
#4 0x0008d6b0 in WorkflowEngine::Criteria::Core::Workflow::starting (this=0x60bab0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:417
#5 0x00102a9c in WorkflowEngine::Criteria::Core::IWorkflow::start (this=0x60bab0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/IWorkflow.cpp:79
#6 0x00098bb4 in WorkflowEngine::Criteria::Core::WorkFlowThread::run (this=0x6188e0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkFlowThread.cpp:15
#7 0x000964e0 in WorkflowEngine::Criteria::Core::WorkflowManager::executeJob (this=0x605e40, pWF=0x60bab0, bDetach=false)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkflowManager.cpp:155
#8 0x00087ea4 in WorkflowEngine::Criteria::Core::Engine::execute (this=0x61abb8,
processInstanceID=0x605290 "2015-1014-0953-07739-991735505", bRestart=false, acStatus=0x0, bSynchWay=true)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:182
#9 0x000879bc in WorkflowEngine::Criteria::Core::Engine::startWorkFlowInSynchWay (this=0x61abb8,
processID=0x605290 "2015-1014-0953-07739-991735505")
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:96
#10 0x0001807c in startProcessInSynchWay (acProcessID=0x605290 "2015-1014-0953-07739-991735505", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:371
#11 0x0000b4cc in main (argc=2, argv=0xbee8ea44)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:95
(gdb)
--------------解决方法如下
/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/database/processTemplate/TestNotePad.xml
修改内容如下:
<Script Type="API_SYNCH" DataType="BOOLEAN">^?NoteResult?@touch@%FileName1%^</Script>
注意:所有*.xml文件,行尾符号是 unix/linux, 不是windows。
基本成功,达到了 在 CentOS 7 上运行的效果。
日志文件的最后以行:
11:28:34.051-1073824092- eventAction-CODEPATH-WorkflowListener.cpp[67]-Event Received:[EndWorkflowEvent]
--------------至此,基本成功
shell@mb526:/data/data/criteria pwd
/data/data/criteria
shell@mb526:/data/data/criteria 1 = 0x0
(gdb)
--------------再接再厉(在CentOS 7没有解决这个问题,现在来解决)
-------------------------------------调试问题5-----------------------------------process指向错误地址
Program received signal SIGSEGV, Segmentation fault.
(gdb) s
Cannot find bounds of current function
(gdb) c
Continuing.
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)
--------------设置断点
break WorkflowListener.cpp:67
s
break bOSProcess.cpp:92
------
break Workflow.cpp:86
break Workflow.cpp:106
break Workflow.cpp:139
break Workflow.cpp:154
------
break Workflow.cpp:106
(gdb) p process
4 = 0x605e40 "2015-1014-1745-23179-1108168521"
------
break bOSProcess.cpp:20
break bOSProcess.cpp:28
break bOSProcess.cpp:47
break bOSProcess.cpp:147
break bOSProcess.cpp:182
------
break bOSProcess.cpp:28
(gdb) p m_ProcessID
19 = (DataManager::Panorama::WorkflowProcesses::WorkflowProcess *) 0x5fe9f0
(gdb) c
22 return _WF->getProcess()->getProcessId();
(gdb) p _WF //这个值正确,因为能够调用getProcess()
20 = (DataManager::Panorama::WorkflowProcesses::WorkflowProcess *) 0x558650 <typeinfo for WorkflowEngine::Criteria::Event::WorkflowEvent::RestartedWorkflowEvent>
(gdb) set var process=0x5fe9f0 //修改变量的值
(gdb) p process //修改process的值后,这个值不正确,能够调用getProcessId()
19 = 0x5fe9f0
(gdb) p/x *0x558644
25 = (DataManager::Panorama::WorkflowProcesses::WorkflowProcess *) 0x5fe9f0
(gdb) p &process
10 = (WorkflowEngine::Criteria::Core::Workflow * const) 0x5c7ed0
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:404
404 throwEvent ( EndWorkflowEvent ( this ) );
(gdb) p this
18 = (WorkflowEngine::Criteria::Core::Workflow *) 0x5585d0 <vtable for WorkflowEngine::Criteria::Event::WorkflowEvent::EndWorkflowEvent+8>
(gdb) set var _WF=0x5c7ed0
(gdb) p _WF->getProcess()
35 = (WorkflowEngine::Criteria::Core::Workflow * const) 0x5c7ed0
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:404
404 throwEvent ( EndWorkflowEvent ( this ) );
(gdb) p this
37 = (WorkflowEngine::Criteria::Event::BaseEvent *) 0xbec6c0f8
----------------从上面分析,进一步发现了错误点,即:WorkflowListener.cpp:68的 evt 错误,然后,bt,追踪精确故障点
(gdb) bt
#0 WorkflowEngine::Criteria::Event::Listener::WorkflowListener::eventAction (this=0x61abd0, event=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp:68
#1 0x0009e074 in WorkflowEngine::Criteria::Event::EventMaker::throwEvent (this=0x5c7f14, evt=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/EventMaker.cpp:36
#2 0x0008d59c in WorkflowEngine::Criteria::Core::Workflow::starting (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:404
#3 0x00102acc in WorkflowEngine::Criteria::Core::IWorkflow::start (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/IWorkflow.cpp:79
#4 0x00098bb4 in WorkflowEngine::Criteria::Core::WorkFlowThread::run (this=0x60c648)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkFlowThread.cpp:15
#5 0x000964e0 in WorkflowEngine::Criteria::Core::WorkflowManager::executeJob (this=0x605ca0, pWF=0x5c7ed0, bDetach=false)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkflowManager.cpp:155
#6 0x00087ea4 in WorkflowEngine::Criteria::Core::Engine::execute (this=0x61abc8,
processInstanceID=0x605e40 "2015-1015-2253-59275-1312213739", bRestart=false, acStatus=0x0, bSynchWay=true)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:182
#7 0x000879bc in WorkflowEngine::Criteria::Core::Engine::startWorkFlowInSynchWay (this=0x61abc8,
processID=0x605e40 "2015-1015-2253-59275-1312213739")
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:96
#8 0x0001807c in startProcessInSynchWay (acProcessID=0x605e40 "2015-1015-2253-59275-1312213739", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:371
#9 0x0000b4cc in main (argc=2, argv=0xbec6ca44)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:95
(gdb)
(gdb) p evt
4 = (WorkflowEngine::Criteria::Core::Workflow * const) 0x5c7ed0
(gdb)
----------------从上面分析,找到了问题的解决方法,如下:
[root@localhost criteria-lin]# pwd
/opt/cBPM-android/criteria-lin
gedit /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp
将 *WorkflowEvent(this) 替换为 (*WorkflowEvent*)(this)
[root@localhost criteria-lin]# grep 'BaseEvent&' -R .|cut -d: -f1|uniq|grep -v 'h~'|grep -v 'cpp~'
./src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp
./src/Criteria/Criteria.WorkflowEngine/events/EventMaker.cpp
./include/WorkflowEngine/EventListener.h
./include/WorkflowEngine/EventMaker.h
./include/WorkflowEngine/WorkflowListener.h
将上面搜索到的文件中,将 BaseEvent& 替换为 BaseEvent*
----------------至此,经过一个星期左右的时间,成功将PC Linux版 cBPM 移植到Android(ARM)
----------------
[root@localhost criteria-lin]# grep "process =" -R .|cut -d: -f1|uniq|grep bin
break WAPIProcess.cpp:36
break WAPIProcess.cpp:63
break WAPIProcess.cpp:91
break WAPIProcess.cpp:118
break WAPIProcess.cpp:194
break WAPIProcess.cpp:229
break WAPIProcess.cpp:550
break Engine.cpp:330
break BaseAction.cpp:37
break BaseProcessEvent.cpp:10
break BaseProcessEvent.cpp:17
break WorkflowReport.cpp:18
break DataBaseTemplate.cpp:204
break ProcessActionAttach.cpp:69
break ProcessesHandler.h:26
-------------->没有设置断点时的 执行 堆栈
(gdb)
#0 0xe50b0008 in ?? ()
#1 0x00105a24 in WorkflowEngine::Criteria::Event::WorkflowEvent::BaseWorkflowEvent::getProcessID (this=0xbed7e0f8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp:22
#2 0x000a3f64 in WorkflowEngine::Criteria::Event::Listener::WorkflowListener::eventAction (this=0x61abd0, event=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp:68
#3 0x0009e074 in WorkflowEngine::Criteria::Event::EventMaker::throwEvent (this=0x5c7f14, evt=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/EventMaker.cpp:36
#4 0x0008d59c in WorkflowEngine::Criteria::Core::Workflow::starting (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:404
#5 0x00102acc in WorkflowEngine::Criteria::Core::IWorkflow::start (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/IWorkflow.cpp:79
#6 0x00098bb4 in WorkflowEngine::Criteria::Core::WorkFlowThread::run (this=0x60c648)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkFlowThread.cpp:15
#7 0x000964e0 in WorkflowEngine::Criteria::Core::WorkflowManager::executeJob (this=0x605ca0, pWF=0x5c7ed0, bDetach=false)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkflowManager.cpp:155
#8 0x00087ea4 in WorkflowEngine::Criteria::Core::Engine::execute (this=0x61abc8,
processInstanceID=0x605e40 "2015-1015-2211-08205-1671411348", bRestart=false, acStatus=0x0, bSynchWay=true)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:182
#9 0x000879bc in WorkflowEngine::Criteria::Core::Engine::startWorkFlowInSynchWay (this=0x61abc8,
processID=0x605e40 "2015-1015-2211-08205-1671411348")
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:96
#10 0x0001807c in startProcessInSynchWay (acProcessID=0x605e40 "2015-1015-2211-08205-1671411348", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:371
#11 0x0000b4cc in main (argc=2, argv=0xbed7ea44)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:95
(gdb)
------
Breakpoint 9, WorkflowEngine::Criteria::Event::WorkflowEvent::BaseWorkflowEvent::getProcessID (this=0xbe9d40e8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp:22
22 return _WF->getProcess()->getProcessId();
------
break ProcessComponent.h:24
s
(gdb) bt
#0 DataManager::Panorama::WorkflowProcesses::ProcessComponent::getProcessId (this=0x5ffaa8)
at /opt/cBPM-android/criteria-lin/include/WorkflowEngine/ProcessComponent.h:29
#1 0x00022390 in DataManager::Panorama::WorkflowProcesses::Activity::equalTo (this=0x5fedf0, entry=0x5ffa8c)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/Activity.cpp:421
#2 0x00145bdc in bOS::Collections::Collection::add (this=0xbeda96f0, entry2Add=0x5ffa8c)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/Collections/bOSCollection.cpp:31
#3 0x0001c2bc in DataManager::Panorama::WorkflowProcesses::Activities::parse (this=0xbeda96ec, node=0x619fd8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/Activities.cpp:44
#4 0x001610c4 in bOS::XML::Data::XMLObject::init (this=0xbeda96ec, root=0x602398)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObject.cpp:89
#5 0x00161768 in bOS::XML::Data::XMLObjectSet::init (this=0xbeda96ec, node=0x602398)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObjectSet.cpp:43
#6 0x0001c1c0 in DataManager::Panorama::WorkflowProcesses::Activities::init (this=0xbeda96ec, node=0x602398)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/Activities.cpp:31
#7 0x0007cec0 in DataManager::Panorama::WorkflowProcesses::WorkflowProcess::parse (this=0xbeda95d8, node=0x602398)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/WorkflowProcess.cpp:93
#8 0x001610c4 in bOS::XML::Data::XMLObject::init (this=0xbeda95d8, root=0x605048)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObject.cpp:89
#9 0x00163740 in bOS::XML::Data::XMLFile::init (this=0xbeda95d8, node=0x605048)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/FileSystem/bOSXMLFile.cpp:39
#10 0x0007cad8 in DataManager::Panorama::WorkflowProcesses::WorkflowProcess::init (this=0xbeda95d8, node=0x605048)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/WorkflowProcess.cpp:50
#11 0x00034e18 in DataManager::DataBase::DataBaseHelper::createProcess (this=0x5fbac0, acWorkflowName=0xbeda99c0 "TestNotePad", process=..., b2Prepared=true)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/DataBaseHelper.cpp:240
#12 0x000179ac in createWorkflowProcess (acWorkflowName=0xbeda99c0 "TestNotePad", acProcessId=0x605e40 "\210R`", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:332
#13 0x0000b498 in main (argc=2, argv=0xbeda9a34)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:88
(gdb)
--------------
0x00105a20 in WorkflowEngine::Criteria::Event::WorkflowEvent::BaseWorkflowEvent::getProcessID (this=0xbee840e8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp:22
22 return _WF->getProcess()->getProcessId();
Could not insert single-step breakpoint at 0xe50b0008
--------------
break BaseWorkflowEvent.cpp:22
s
(gdb) bt
#0 WorkflowEngine::Criteria::Core::Workflow::getProcess (
this=0x5585d0 <vtable for WorkflowEngine::Criteria::Event::WorkflowEvent::EndWorkflowEvent+8>)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:504
#1 0x00105a08 in WorkflowEngine::Criteria::Event::WorkflowEvent::BaseWorkflowEvent::getProcessID (this=0xbee840e8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp:22
#2 0x000a3f64 in WorkflowEngine::Criteria::Event::Listener::WorkflowListener::eventAction (this=0x61abd0, event=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp:68
#3 0x0009e074 in WorkflowEngine::Criteria::Event::EventMaker::throwEvent (this=0x5c7f14, evt=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/EventMaker.cpp:36
#4 0x0008d59c in WorkflowEngine::Criteria::Core::Workflow::starting (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:404
#5 0x00102acc in WorkflowEngine::Criteria::Core::IWorkflow::start (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/IWorkflow.cpp:79
#6 0x00098bb4 in WorkflowEngine::Criteria::Core::WorkFlowThread::run (this=0x603be8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkFlowThread.cpp:15
#7 0x000964e0 in WorkflowEngine::Criteria::Core::WorkflowManager::executeJob (this=0x605ca0, pWF=0x5c7ed0, bDetach=false)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkflowManager.cpp:155
#8 0x00087ea4 in WorkflowEngine::Criteria::Core::Engine::execute (this=0x61abc8,
processInstanceID=0x605e40 "2015-1014-1640-54357-820121757", bRestart=false, acStatus=0x0, bSynchWay=true)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:182
#9 0x000879bc in WorkflowEngine::Criteria::Core::Engine::startWorkFlowInSynchWay (this=0x61abc8,
processID=0x605e40 "2015-1014-1640-54357-820121757")
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:96
#10 0x0001807c in startProcessInSynchWay (acProcessID=0x605e40 "2015-1014-1640-54357-820121757", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:371
#11 0x0000b4cc in main (argc=2, argv=0xbee84a34)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:95
(gdb)
--------------手机
shell@mb526:/ PATH:/opt/android-on-linux/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/
# arm-linux-androideabi-gdb executer
target extended-remote 192.168.0.104:1234
set debug remote 1
set args TestNotePad
c
--------------
宿主机:
codeblocks 全局参数 设置:
【Settings】->【debugger】->【create config】->【arm-gdb】->【executable path】
/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Toolchain executable】->【debugger】
arm-gdb
codeblocks 局部参数 设置:
右健单击【Criteria.WorkflowEngine】,选择【Properties】->【debugger】->【debug win32】192.168.0.101:1111
[root@localhost gdbserver]# pwd
/opt/android-on-linux/android-ndk-r8e/prebuilt/android-arm/gdbserver
[root@localhost gdbserver]# ls
gdbserver
[root@localhost gdbserver]# adb push gdbserver /data/data/criteria
[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# adb push executer /data/data/criteria
----------------------OK---------------------手机:
shell@mb526:/ PATH:/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/
使用上面有问题:
readchar: Got EOF
Remote side has terminated connection. GDBserver will reopen the connection.
------------------------------------------------------------------------将配置文件复制到 手机
[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# ls
executer
[root@localhost lib]# adb push executer /data/data/criteria/
[root@localhost Tools.Executor]# ls
database executer notepad.txt src temp temp.c TestNotePad.xml
[root@localhost Tools.Executor]# pwd
/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor
[root@localhost Tools.Executor]# adb push database/ /data/data/criteria/database
------------------------------------------------------------------------
------------------------------------------------------------------------使用这段
使用下面可以:
[root@localhost Tools.Executor]# export PATH=vCont;C0b:p1449.1449;c:p1449.-1#3c...Packet received: Xb;process:1449
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
-------------------------------------
0x001561b8 in bOS::XML::Data::XMLObject::init (this=0x4, root=0x5f7568)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObject.cpp:62
62 this->init();
-------------------------------------
(gdb) bt
#0 0x001561b8 in bOS::XML::Data::XMLObject::init (this=0x4, root=0x5f7568)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObject.cpp:62
#1 0x000e0f9c in DataManager::Panorama::DataBase::Connection::init (this=0x4, node=0x5f7568)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/Connection.cpp:34
#2 0x0003c67c in DataManager::DataBase::DataBaseTemplate::setXMLConnection (this=0x0, _connection=0x5eb4e0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/DataBaseTemplate.cpp:58
#3 0x00034670 in DataManager::DataBase::DataBaseHelper::open (this=0x5eb0a8, sConfigurationFile=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/DataBaseHelper.cpp:184
#4 0x0000ed10 in InitSessionWithParams (acConfigFile=0x5b74b8 "/data/data/criteria/database/Criteria.xml", response=0x5b4b20)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp:78
#5 0x0000e910 in InitSession (response=0x5b4b20)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp:63
#6 0x0000b314 in main (argc=2, argv=0xbec3da34)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:63
(gdb)
-------------------------------------
设置断点
break bOSXMLHelper.cpp:170
break DataBaseHelper.cpp:101
-------------------------------------问题解决,方法如下:
codeblocks 局部参数 设置: Criteria.WorkflowEngine
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Compiler Settings】->【#defines】
添加 _FILESYSTEM_
-------------------------------------调试问题4-----------------------------------调试到此处,停止,段错误
Criteria session Initialization.....(look at Executor trace file)
Criteria session Initialization [OK]
Create process instance from template ——> /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:78
Child terminated with signal = 0xb (SIGSEGV)
--------------
Criteria session Initialization.....(look at Executor trace file)
Criteria session Initialization [OK]
Create process instance from template
Child terminated with signal = 0xb (SIGSEGV)
--------------查看日志文件Executor-*.trace,找原因
shell@mb526:/data/data/criteria less Executor-5331-20151014-092322.trace
09:23:22.381-1073824092- FileSystemConnection::init-CODEBLOCK-FileSystemConnection.cpp-OUT[17ms]
09:23:22.382-1073824092- FileSystemDataBase::open-INFO-FileSystemDataBase.cpp[53]-Reading Role File [/data/data/criteria/database/Criteria.Roles.xml]
--------------设置断点
break FileSystemDataBase.cpp:53
break BaseWorkflowEvent.cpp:22
break Workflow.cpp:184
break Workflow.cpp:373
InitSessionWithParams (acConfigFile=0x5c7ed0 "/data/data/criteria/database/Criteria.xml", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp:80
80 CM_TRACE_INFO("Instancing Engine")
WorkflowEngine::Criteria::Core::Engine::instance ()
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:24
24 {
(main.cpp:95)——>
startProcessInSynchWay (acProcessID=0x605290 "2015-1014-0953-07739-991735505", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:365
365 {
WorkflowEngine::Criteria::Core::Engine::instance ()
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:24
24 {
(gdb) bt
#0 0xe50b0008 in ?? ()
#1 0x001059f4 in WorkflowEngine::Criteria::Event::WorkflowEvent::BaseWorkflowEvent::getProcessID (this=0xbee8e184)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp:22
#2 0x000a3e68 in WorkflowEngine::Criteria::Event::Listener::WorkflowListener::eventAction (this=0x61abc0, event=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp:62
#3 0x0009e074 in WorkflowEngine::Criteria::Event::EventMaker::throwEvent (this=0x60baf4, evt=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/EventMaker.cpp:36
#4 0x0008d6b0 in WorkflowEngine::Criteria::Core::Workflow::starting (this=0x60bab0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:417
#5 0x00102a9c in WorkflowEngine::Criteria::Core::IWorkflow::start (this=0x60bab0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/IWorkflow.cpp:79
#6 0x00098bb4 in WorkflowEngine::Criteria::Core::WorkFlowThread::run (this=0x6188e0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkFlowThread.cpp:15
#7 0x000964e0 in WorkflowEngine::Criteria::Core::WorkflowManager::executeJob (this=0x605e40, pWF=0x60bab0, bDetach=false)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkflowManager.cpp:155
#8 0x00087ea4 in WorkflowEngine::Criteria::Core::Engine::execute (this=0x61abb8,
processInstanceID=0x605290 "2015-1014-0953-07739-991735505", bRestart=false, acStatus=0x0, bSynchWay=true)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:182
#9 0x000879bc in WorkflowEngine::Criteria::Core::Engine::startWorkFlowInSynchWay (this=0x61abb8,
processID=0x605290 "2015-1014-0953-07739-991735505")
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:96
#10 0x0001807c in startProcessInSynchWay (acProcessID=0x605290 "2015-1014-0953-07739-991735505", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:371
#11 0x0000b4cc in main (argc=2, argv=0xbee8ea44)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:95
(gdb)
--------------解决方法如下
/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/database/processTemplate/TestNotePad.xml
修改内容如下:
<Script Type="API_SYNCH" DataType="BOOLEAN">^?NoteResult?@touch@%FileName1%^</Script>
注意:所有*.xml文件,行尾符号是 unix/linux, 不是windows。
基本成功,达到了 在 CentOS 7 上运行的效果。
日志文件的最后以行:
11:28:34.051-1073824092- eventAction-CODEPATH-WorkflowListener.cpp[67]-Event Received:[EndWorkflowEvent]
--------------至此,基本成功
shell@mb526:/data/data/criteria pwd
/data/data/criteria
shell@mb526:/data/data/criteria 1 = 0x0
(gdb)
--------------再接再厉(在CentOS 7没有解决这个问题,现在来解决)
-------------------------------------调试问题5-----------------------------------process指向错误地址
Program received signal SIGSEGV, Segmentation fault.
(gdb) s
Cannot find bounds of current function
(gdb) c
Continuing.
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)
--------------设置断点
break WorkflowListener.cpp:67
s
break bOSProcess.cpp:92
------
break Workflow.cpp:86
break Workflow.cpp:106
break Workflow.cpp:139
break Workflow.cpp:154
------
break Workflow.cpp:106
(gdb) p process
4 = 0x605e40 "2015-1014-1745-23179-1108168521"
------
break bOSProcess.cpp:20
break bOSProcess.cpp:28
break bOSProcess.cpp:47
break bOSProcess.cpp:147
break bOSProcess.cpp:182
------
break bOSProcess.cpp:28
(gdb) p m_ProcessID
19 = (DataManager::Panorama::WorkflowProcesses::WorkflowProcess *) 0x5fe9f0
(gdb) c
22 return _WF->getProcess()->getProcessId();
(gdb) p _WF //这个值正确,因为能够调用getProcess()
20 = (DataManager::Panorama::WorkflowProcesses::WorkflowProcess *) 0x558650 <typeinfo for WorkflowEngine::Criteria::Event::WorkflowEvent::RestartedWorkflowEvent>
(gdb) set var process=0x5fe9f0 //修改变量的值
(gdb) p process //修改process的值后,这个值不正确,能够调用getProcessId()
19 = 0x5fe9f0
(gdb) p/x *0x558644
25 = (DataManager::Panorama::WorkflowProcesses::WorkflowProcess *) 0x5fe9f0
(gdb) p &process
10 = (WorkflowEngine::Criteria::Core::Workflow * const) 0x5c7ed0
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:404
404 throwEvent ( EndWorkflowEvent ( this ) );
(gdb) p this
18 = (WorkflowEngine::Criteria::Core::Workflow *) 0x5585d0 <vtable for WorkflowEngine::Criteria::Event::WorkflowEvent::EndWorkflowEvent+8>
(gdb) set var _WF=0x5c7ed0
(gdb) p _WF->getProcess()
35 = (WorkflowEngine::Criteria::Core::Workflow * const) 0x5c7ed0
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:404
404 throwEvent ( EndWorkflowEvent ( this ) );
(gdb) p this
37 = (WorkflowEngine::Criteria::Event::BaseEvent *) 0xbec6c0f8
----------------从上面分析,进一步发现了错误点,即:WorkflowListener.cpp:68的 evt 错误,然后,bt,追踪精确故障点
(gdb) bt
#0 WorkflowEngine::Criteria::Event::Listener::WorkflowListener::eventAction (this=0x61abd0, event=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp:68
#1 0x0009e074 in WorkflowEngine::Criteria::Event::EventMaker::throwEvent (this=0x5c7f14, evt=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/EventMaker.cpp:36
#2 0x0008d59c in WorkflowEngine::Criteria::Core::Workflow::starting (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:404
#3 0x00102acc in WorkflowEngine::Criteria::Core::IWorkflow::start (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/IWorkflow.cpp:79
#4 0x00098bb4 in WorkflowEngine::Criteria::Core::WorkFlowThread::run (this=0x60c648)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkFlowThread.cpp:15
#5 0x000964e0 in WorkflowEngine::Criteria::Core::WorkflowManager::executeJob (this=0x605ca0, pWF=0x5c7ed0, bDetach=false)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkflowManager.cpp:155
#6 0x00087ea4 in WorkflowEngine::Criteria::Core::Engine::execute (this=0x61abc8,
processInstanceID=0x605e40 "2015-1015-2253-59275-1312213739", bRestart=false, acStatus=0x0, bSynchWay=true)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:182
#7 0x000879bc in WorkflowEngine::Criteria::Core::Engine::startWorkFlowInSynchWay (this=0x61abc8,
processID=0x605e40 "2015-1015-2253-59275-1312213739")
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:96
#8 0x0001807c in startProcessInSynchWay (acProcessID=0x605e40 "2015-1015-2253-59275-1312213739", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:371
#9 0x0000b4cc in main (argc=2, argv=0xbec6ca44)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:95
(gdb)
(gdb) p evt
4 = (WorkflowEngine::Criteria::Core::Workflow * const) 0x5c7ed0
(gdb)
----------------从上面分析,找到了问题的解决方法,如下:
[root@localhost criteria-lin]# pwd
/opt/cBPM-android/criteria-lin
gedit /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp
将 *WorkflowEvent(this) 替换为 (*WorkflowEvent*)(this)
[root@localhost criteria-lin]# grep 'BaseEvent&' -R .|cut -d: -f1|uniq|grep -v 'h~'|grep -v 'cpp~'
./src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp
./src/Criteria/Criteria.WorkflowEngine/events/EventMaker.cpp
./include/WorkflowEngine/EventListener.h
./include/WorkflowEngine/EventMaker.h
./include/WorkflowEngine/WorkflowListener.h
将上面搜索到的文件中,将 BaseEvent& 替换为 BaseEvent*
----------------至此,经过一个星期左右的时间,成功将PC Linux版 cBPM 移植到Android(ARM)
----------------
[root@localhost criteria-lin]# grep "process =" -R .|cut -d: -f1|uniq|grep bin
break WAPIProcess.cpp:36
break WAPIProcess.cpp:63
break WAPIProcess.cpp:91
break WAPIProcess.cpp:118
break WAPIProcess.cpp:194
break WAPIProcess.cpp:229
break WAPIProcess.cpp:550
break Engine.cpp:330
break BaseAction.cpp:37
break BaseProcessEvent.cpp:10
break BaseProcessEvent.cpp:17
break WorkflowReport.cpp:18
break DataBaseTemplate.cpp:204
break ProcessActionAttach.cpp:69
break ProcessesHandler.h:26
-------------->没有设置断点时的 执行 堆栈
(gdb)
#0 0xe50b0008 in ?? ()
#1 0x00105a24 in WorkflowEngine::Criteria::Event::WorkflowEvent::BaseWorkflowEvent::getProcessID (this=0xbed7e0f8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp:22
#2 0x000a3f64 in WorkflowEngine::Criteria::Event::Listener::WorkflowListener::eventAction (this=0x61abd0, event=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp:68
#3 0x0009e074 in WorkflowEngine::Criteria::Event::EventMaker::throwEvent (this=0x5c7f14, evt=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/EventMaker.cpp:36
#4 0x0008d59c in WorkflowEngine::Criteria::Core::Workflow::starting (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:404
#5 0x00102acc in WorkflowEngine::Criteria::Core::IWorkflow::start (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/IWorkflow.cpp:79
#6 0x00098bb4 in WorkflowEngine::Criteria::Core::WorkFlowThread::run (this=0x60c648)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkFlowThread.cpp:15
#7 0x000964e0 in WorkflowEngine::Criteria::Core::WorkflowManager::executeJob (this=0x605ca0, pWF=0x5c7ed0, bDetach=false)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkflowManager.cpp:155
#8 0x00087ea4 in WorkflowEngine::Criteria::Core::Engine::execute (this=0x61abc8,
processInstanceID=0x605e40 "2015-1015-2211-08205-1671411348", bRestart=false, acStatus=0x0, bSynchWay=true)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:182
#9 0x000879bc in WorkflowEngine::Criteria::Core::Engine::startWorkFlowInSynchWay (this=0x61abc8,
processID=0x605e40 "2015-1015-2211-08205-1671411348")
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:96
#10 0x0001807c in startProcessInSynchWay (acProcessID=0x605e40 "2015-1015-2211-08205-1671411348", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:371
#11 0x0000b4cc in main (argc=2, argv=0xbed7ea44)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:95
(gdb)
------
Breakpoint 9, WorkflowEngine::Criteria::Event::WorkflowEvent::BaseWorkflowEvent::getProcessID (this=0xbe9d40e8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp:22
22 return _WF->getProcess()->getProcessId();
------
break ProcessComponent.h:24
s
(gdb) bt
#0 DataManager::Panorama::WorkflowProcesses::ProcessComponent::getProcessId (this=0x5ffaa8)
at /opt/cBPM-android/criteria-lin/include/WorkflowEngine/ProcessComponent.h:29
#1 0x00022390 in DataManager::Panorama::WorkflowProcesses::Activity::equalTo (this=0x5fedf0, entry=0x5ffa8c)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/Activity.cpp:421
#2 0x00145bdc in bOS::Collections::Collection::add (this=0xbeda96f0, entry2Add=0x5ffa8c)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/Collections/bOSCollection.cpp:31
#3 0x0001c2bc in DataManager::Panorama::WorkflowProcesses::Activities::parse (this=0xbeda96ec, node=0x619fd8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/Activities.cpp:44
#4 0x001610c4 in bOS::XML::Data::XMLObject::init (this=0xbeda96ec, root=0x602398)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObject.cpp:89
#5 0x00161768 in bOS::XML::Data::XMLObjectSet::init (this=0xbeda96ec, node=0x602398)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObjectSet.cpp:43
#6 0x0001c1c0 in DataManager::Panorama::WorkflowProcesses::Activities::init (this=0xbeda96ec, node=0x602398)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/Activities.cpp:31
#7 0x0007cec0 in DataManager::Panorama::WorkflowProcesses::WorkflowProcess::parse (this=0xbeda95d8, node=0x602398)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/WorkflowProcess.cpp:93
#8 0x001610c4 in bOS::XML::Data::XMLObject::init (this=0xbeda95d8, root=0x605048)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObject.cpp:89
#9 0x00163740 in bOS::XML::Data::XMLFile::init (this=0xbeda95d8, node=0x605048)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/FileSystem/bOSXMLFile.cpp:39
#10 0x0007cad8 in DataManager::Panorama::WorkflowProcesses::WorkflowProcess::init (this=0xbeda95d8, node=0x605048)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/WorkflowProcess.cpp:50
#11 0x00034e18 in DataManager::DataBase::DataBaseHelper::createProcess (this=0x5fbac0, acWorkflowName=0xbeda99c0 "TestNotePad", process=..., b2Prepared=true)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/DataBaseHelper.cpp:240
#12 0x000179ac in createWorkflowProcess (acWorkflowName=0xbeda99c0 "TestNotePad", acProcessId=0x605e40 "\210R`", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:332
#13 0x0000b498 in main (argc=2, argv=0xbeda9a34)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:88
(gdb)
--------------
0x00105a20 in WorkflowEngine::Criteria::Event::WorkflowEvent::BaseWorkflowEvent::getProcessID (this=0xbee840e8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp:22
22 return _WF->getProcess()->getProcessId();
Could not insert single-step breakpoint at 0xe50b0008
--------------
break BaseWorkflowEvent.cpp:22
s
(gdb) bt
#0 WorkflowEngine::Criteria::Core::Workflow::getProcess (
this=0x5585d0 <vtable for WorkflowEngine::Criteria::Event::WorkflowEvent::EndWorkflowEvent+8>)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:504
#1 0x00105a08 in WorkflowEngine::Criteria::Event::WorkflowEvent::BaseWorkflowEvent::getProcessID (this=0xbee840e8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp:22
#2 0x000a3f64 in WorkflowEngine::Criteria::Event::Listener::WorkflowListener::eventAction (this=0x61abd0, event=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp:68
#3 0x0009e074 in WorkflowEngine::Criteria::Event::EventMaker::throwEvent (this=0x5c7f14, evt=...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/EventMaker.cpp:36
#4 0x0008d59c in WorkflowEngine::Criteria::Core::Workflow::starting (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Workflow.cpp:404
#5 0x00102acc in WorkflowEngine::Criteria::Core::IWorkflow::start (this=0x5c7ed0)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/IWorkflow.cpp:79
#6 0x00098bb4 in WorkflowEngine::Criteria::Core::WorkFlowThread::run (this=0x603be8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkFlowThread.cpp:15
#7 0x000964e0 in WorkflowEngine::Criteria::Core::WorkflowManager::executeJob (this=0x605ca0, pWF=0x5c7ed0, bDetach=false)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/WorkflowManager.cpp:155
#8 0x00087ea4 in WorkflowEngine::Criteria::Core::Engine::execute (this=0x61abc8,
processInstanceID=0x605e40 "2015-1014-1640-54357-820121757", bRestart=false, acStatus=0x0, bSynchWay=true)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:182
#9 0x000879bc in WorkflowEngine::Criteria::Core::Engine::startWorkFlowInSynchWay (this=0x61abc8,
processID=0x605e40 "2015-1014-1640-54357-820121757")
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/engine/Engine.cpp:96
#10 0x0001807c in startProcessInSynchWay (acProcessID=0x605e40 "2015-1014-1640-54357-820121757", response=0x5c2e68)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPIProcess.cpp:371
#11 0x0000b4cc in main (argc=2, argv=0xbee84a34)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:95
(gdb)
--------------手机
shell@mb526:/ PATH:/opt/android-on-linux/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/
# arm-linux-androideabi-gdb executer
target extended-remote 192.168.0.104:1234
set debug remote 1
set args TestNotePad
c
--------------
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通