From 143334c30d39139d359b5127970e1da2874f59d7 Mon Sep 17 00:00:00 2001 From: NohDoyeon241104 Date: Mon, 7 Sep 2026 11:46:00 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B6=9C=EC=82=AC=20=EB=AF=B8=EC=A7=80?= =?UTF-8?q?=EC=9B=90=20=EA=B0=9D=EC=B2=B4(Ellipse/Rectangle/Roi)=20NRE=20?= =?UTF-8?q?=EB=B0=A9=EC=96=B4=20(ISSUE-260907-01)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getScannerParameter 가 null 을 반환하는 타입에서 NumberOfCount 접근 시 NullReferenceException 이 발생하던 문제. null 이면 로그 남기고 해당 객체만 건너뜀(return 0). 원래도 출사 분기가 없어 용접되지 않던 타입이라 동작 변경 없음. 지원 타입(Line/Dot/Arc/Arc3Point/Spline/SnowMan/ZigZag/Group) 경로 무변경. 예외가 실제 프로세스 종료로 이어지는지는 미확인(호스트 Aurora.exe 소스 없음). 빌드/현장 검증 미실시. --- .../Sequences/Main/SeqUploadWeldingList.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/WeldingComponents/WeldingCommon/Sequences/Main/SeqUploadWeldingList.cs b/WeldingComponents/WeldingCommon/Sequences/Main/SeqUploadWeldingList.cs index af5823f..0bc06d7 100644 --- a/WeldingComponents/WeldingCommon/Sequences/Main/SeqUploadWeldingList.cs +++ b/WeldingComponents/WeldingCommon/Sequences/Main/SeqUploadWeldingList.cs @@ -361,7 +361,20 @@ namespace WeldingCommon.Sequences if (!obj.Enabled) return 0; - uint repeatCount = getScannerParameter(obj).NumberOfCount; + // [예외처리 2026-09-07] 출사 분기가 없는 객체 방어 + // Ellipse / Rectangle / Roi 는 아래 타입 분기에도, getScannerParameter() 에도 + // 해당 분기가 없어 null 이 반환된다. 그대로 두면 바로 아래 NumberOfCount 접근에서 + // NullReferenceException 이 발생해 프로그램이 종료된다. + // (세 타입 모두 Enabled 기본값이 true 라 위 조기 반환에도 걸리지 않는다) + // 해당 객체만 건너뛰고 나머지 객체의 리스트 적재는 그대로 진행한다. + // ※ 원래도 이 객체들은 용접되지 않았다. 동작은 그대로 두고 종료만 막는다. + ScannerParam objScannerParam = getScannerParameter(obj); + if (objScannerParam == null) { + Log.E(string.Format($"[UploadWeldingList] 출사 미지원 객체 건너뜀 - Type({obj.Type}), No({obj.No + 1}), ParamID({obj.ScannerParamID})")); + return 0; + } + + uint repeatCount = objScannerParam.NumberOfCount; if (repeatCount <= 0) repeatCount = 1;