From 088edcedd822070b6df3599aa87e08bea25a251d Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期六, 21 六月 2025 14:12:40 +0800
Subject: [PATCH] 1.修复CAttributeVector添加子项时类子项被另一个CAttributeVector释放造成内存失效闪退问题;

---
 SourceCode/Bond/Servo/Model.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 04cf046..78ba03f 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -203,11 +203,12 @@
 			break;
 		case ROBOT_EVENT_ERROR:
 			LOGE("<CModel>onRobotTaskEvent: 任务错误(%s, ClassID=%s).", strDesc.c_str(), strClassID.c_str());
-			pTask->error();
 			break;
 		case ROBOT_EVENT_ABORT:
 			LOGE("<CModel>onRobotTaskEvent: 任务停止(%s, ClassID=%s).", strDesc.c_str(), strClassID.c_str());
-			pTask->abort();
+			break;
+		case ROBOT_EVENT_RESTORE:
+			LOGE("<CModel>onRobotTaskEvent: 任务回撤(%s, ClassID=%s).", strDesc.c_str(), strClassID.c_str());
 			break;
 		default:
 			LOGE("<CModel>onRobotTaskEvent: 未知事件 code=%d, 任务=%s", code, strDesc.c_str());
@@ -244,7 +245,7 @@
 
 		// 状态映射
 		static const char* STATUS_STR[] = {
-			"Unknown", "Ready", "Running", "Error", "Abort", "Completed"
+			"Unknown", "Ready", "Running", "Picking", "Placing", "Restoring", "Error", "Abort", "Completed"
 		};
 		auto state = pTask->getState();
 		int index = static_cast<int>(state);

--
Gitblit v1.9.3