From a724e836d887145183ae7c4f7ccdbdbdd28b40b4 Mon Sep 17 00:00:00 2001 From: jiwonRepair Date: Thu, 24 Jul 2025 11:20:46 +0900 Subject: [PATCH] fix: handle exception when ShotSearch returns timeout message Problem: - Unhandled exception occurs during ShotSearch execution. - Error message: "Conversion from string 'The operation has timed out.' to type 'Double' is not valid." Reproduction: - Occurs when the communication port is disconnected during the "Information Input" state. Cause: - ShotSearch returns a timeout message as a string. - Comparing this string directly to an integer (e.g., If ShotSearch() = 0) causes a runtime type conversion exception. Fix: - Updated condition from: If ShotSearch() = 0 Then to: If ShotSearch() = "False" Then - Prevents runtime error by avoiding invalid comparison between string and integer. --- MAXIMUM_Product_Program/MainForm.vb | 5 +++-- 업데이트 내역.txt | 13 +++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/MAXIMUM_Product_Program/MainForm.vb b/MAXIMUM_Product_Program/MainForm.vb index 48d60c0..62fc99c 100644 --- a/MAXIMUM_Product_Program/MainForm.vb +++ b/MAXIMUM_Product_Program/MainForm.vb @@ -559,7 +559,7 @@ Public Class MainForm Private Sub FormSetting() Const ProgramName As String = "Product Program Ver_" - Const VersionNum As String = "1.1.5" + Const VersionNum As String = "1.1.6" Me.Text = ProgramName & VersionNum Me.Size = New Size(1920, 1050) @@ -1259,7 +1259,7 @@ FinishFunc: If ProdRegData(txbPDCP.Text, txbPDCC.Text, txbPDAgency.Text) Then If ShotReg(0) Then - If ShotSearch() = 0 Then + If ShotSearch() = "False" Then 'If ShotSearch() = 0 Then If DBProdReg(txbPDCP.Text, txbPDCC.Text, txbPDAgency.Text, 0) Then If TraySuccess() Then @@ -1282,6 +1282,7 @@ FinishFunc: End If Else MsgBox("샷 수 정보 확인 실패 !", vbCritical) + MsgBox("통신 포트 연결을 확인하세요", vbCritical) GoTo LoadFail End If Else diff --git a/업데이트 내역.txt b/업데이트 내역.txt index 92263c4..f61abea 100644 --- a/업데이트 내역.txt +++ b/업데이트 내역.txt @@ -1,2 +1,11 @@ -1. 시리얼번호 생성 오류 메세지 수정 -2. EFFECT V3 color list 수정(라인프렌즈 외 제거) +1. "작업 시간을 초과화였습니다." 에러 수정 + 1) 재현경로: + - "정보 입력중" 상태에서 통신 포트 연결이 끊어질 경우 + + 2) 에러 발생 사유: + - 문자열을 경우 정수 값과 비교 하면 처리 되지 않은 예외 발생 + + 3) 수정 내용: + - If ShotSearch() = 0 Then -> If ShotSearch() = "False" + +2. program version 1.1.6