fix: 출사 미지원 객체(Ellipse/Rectangle/Roi) NRE 방어 (ISSUE-260907-01)
getScannerParameter 가 null 을 반환하는 타입에서 NumberOfCount 접근 시 NullReferenceException 이 발생하던 문제. null 이면 로그 남기고 해당 객체만 건너뜀(return 0). 원래도 출사 분기가 없어 용접되지 않던 타입이라 동작 변경 없음. 지원 타입(Line/Dot/Arc/Arc3Point/Spline/SnowMan/ZigZag/Group) 경로 무변경. 예외가 실제 프로세스 종료로 이어지는지는 미확인(호스트 Aurora.exe 소스 없음). 빌드/현장 검증 미실시.
This commit is contained in:
parent
f873e066e4
commit
143334c30d
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user