View Issue Details

IDProjectCategoryView StatusLast Update
0003186Ham Radio DeluxeBugpublic2019-02-24 15:12
ReporterWA9PIEAssigned ToK7ZCZ 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version6.5.0.196 
Summary0003186: "Encountered an improper argument" when launching Rig Control
DescriptionAs of the 6.5.0.192 build, I started getting an "Encountered an improper argument" error when launching Rig Control.
Steps To ReproduceLaunch Rig Control
Get error
TagsNo tags attached.
ModuleRig Control
Sub-ModuleGeneral
Testing Beta Successful

Activities

WA9PIE

2019-02-18 22:33

administrator   ~0007428

A dump file was posted at "Google Drive:\HRD Software\Dumps\Mantis 3186"

WA9PIE

2019-02-19 14:47

administrator   ~0007431

After many days of occurrence, this error has mysteriously vanished.

K7ZCZ

2019-02-19 17:58

administrator   ~0007433

The call stack doesn't lead directly to the source of the problem; we end up near by:

0:000:x86> kb
 # ChildEBP RetAddr  Args to Child              
00 012fbaa8 754e87ed 047c1728 00000001 00000000 win32u!NtUserWaitMessage+0xc
01 012fbae8 754e86dd 00000000 00000001 00000000 user32!DialogBox2+0x103
02 012fbb18 75542af8 047c1728 75541020 012fbd58 user32!InternalDialogBox+0xe2
03 012fbbe4 75541987 012fbd58 012fc074 00000000 user32!SoftModalMessageBox+0x728
04 012fbd40 75542375 047c1728 008f264c 00000010 user32!MessageBoxWorker+0x2ca
05 012fbdc8 755423ba 047c1728 012fc074 015f8e90 user32!MessageBoxTimeoutW+0x165
06 012fbde8 0029a5b3 047c1728 012fc074 015f8e90 user32!MessageBoxW+0x1a
07 012fc028 0029a3c5 008f25d0 012fc074 00000010 HamRadioDeluxe!CWinApp::ShowAppMessageBox+0x12c [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\appui1.cpp @ 122] 
08 012fc040 0029a34e 012fc074 00000010 00000000 HamRadioDeluxe!CWinApp::DoMessageBox+0x12 [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\appui1.cpp @ 39] 
09 012fc05c 0028f56b 012fc074 00000010 00000000 HamRadioDeluxe!AfxMessageBox+0x2e [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\appui1.cpp @ 141] 
0a 012fc478 002b1fac 00000010 0000f108 002b1f24 HamRadioDeluxe!CException::ReportError+0x55 [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\except.cpp @ 110] 
0b 012fc494 002a2e30 008d2238 015a2e00 008d2238 HamRadioDeluxe!CWinApp::ProcessWndProcException+0x88 [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\appcore.cpp @ 1037] 
0c 012fc4ac 00290e3b 008d2238 015a2e00 006700b7 HamRadioDeluxe!AfxProcessWndProcException+0x28 [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\thrdcore.cpp @ 214] 
0d 012fd2fc 002915cb 04c0f4e0 002211c0 00000110 HamRadioDeluxe!AfxCallWndProc+0xf1 [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 273] 
0e 012fd31c 7550635b 002211c0 00000110 00000000 HamRadioDeluxe!AfxWndProc+0x34 [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 417] 
0f 012fd348 754f729c 00291597 002211c0 00000110 user32!_InternalCallWinProc+0x2b
10 012fd42c 754f6a4d 00291597 00000000 00000110 user32!UserCallWinProcCheckWow+0x3ac
11 012fd490 754f3f96 01ded700 00000000 00000000 user32!SendMessageWorker+0x1fd
12 012fd5b4 754f0785 000c0000 00d5e390 00000348 user32!InternalCreateDialog+0xb26
13 012fd5d8 754f064b 000c0000 00d5e390 00280c9c user32!CreateDialogIndirectParamAorW+0x35
14 012fd5f8 0029c1c4 000c0000 00d5e390 00280c9c user32!CreateDialogIndirectParamW+0x1b
15 012fd644 0029b875 000c0000 00d5e390 00280c9c HamRadioDeluxe!IsolationAwareCreateDialogIndirectParamW+0x4c [d:\agent\_work\3\s\src\externalapis\windows\10\sdk\inc\winuser.inl @ 569] 
16 012fd6bc 0029b988 00d5e390 04c089a0 000c0000 HamRadioDeluxe!CWnd::CreateDlgIndirect+0x140 [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\dlgcore.cpp @ 363] 
17 012fd6d4 0029b95a 00d5e390 04c089a0 00000000 HamRadioDeluxe!CDialog::CreateIndirect+0x29 [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\dlgcore.cpp @ 259] 
18 012fd6f0 0029b6cd 00d5e390 04c089a0 000c0000 HamRadioDeluxe!CDialog::CreateIndirect+0x1f [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\dlgcore.cpp @ 240] 
19 012fd710 00104b40 0000028c 04c089a0 d21c3b50 HamRadioDeluxe!CDialog::Create+0x53 [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\dlgcore.cpp @ 220] 
1a (Inline) -------- -------- -------- -------- HamRadioDeluxe!CDialog::Create+0xd [c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin2.inl @ 585] 
1b 012fd744 0019e015 0000028c 04c089a0 d21c3b84 HamRadioDeluxe!CBaseJockDialog::Create+0x40 [c:\hrd65\hamradiodeluxe\basejockdialog.cpp @ 1157] 
1c 012fd79c 001971ee d21c344c 04c089a0 ffffffff HamRadioDeluxe!CMainFrame::OnToolsLdgAtus+0x155 [c:\hrd65\hamradiodeluxe\mainfrm.cpp @ 5169] 
1d 012fd858 0017e073 d21c1224 008f25d0 0017d7a0 HamRadioDeluxe!CMainFrame::LoadMyBarState+0x14e [c:\hrd65\hamradiodeluxe\mainfrm.cpp @ 1091] 
1e (Inline) -------- -------- -------- -------- HamRadioDeluxe!CMainFrame::Initialize+0x4a [c:\hrd65\hamradiodeluxe\mainfrm.cpp @ 1020] 
1f 012ffe30 006972ff 00000000 00a09894 01111000 HamRadioDeluxe!CHamRadioDeluxeApp::InitInstance+0x8d3 [c:\hrd65\hamradiodeluxe\hamradiodeluxe.cpp @ 493] 
20 012ffe48 003df9c0 000c0000 00000000 01591fa8 HamRadioDeluxe!AfxWinMain+0x5f [d:\agent\_work\3\s\src\vctools\vc7libs\ship\atlmfc\src\mfc\winmain.cpp @ 37] 
21 (Inline) -------- -------- -------- -------- HamRadioDeluxe!invoke_main+0x1a [d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 118] 
22 012ffe94 765f0179 01111000 765f0160 012fff00 HamRadioDeluxe!__scrt_common_main_seh+0xf8 [d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 
23 012ffea4 7762662d 01111000 80bdd481 00000000 kernel32!BaseThreadInitThunk+0x19
24 012fff00 776265fd ffffffff 776451af 00000000 ntdll_775c0000!__RtlUserThreadStart+0x2f
25 012fff10 00000000 003dfa44 01111000 00000000 ntdll_775c0000!_RtlUserThreadStart+0x1b



The issue is at startup when the LDG ATU dialog pane is created. There are many different bits of code that can throw this exception, but perhaps the most common is an out-of-bounds access to one of the MFC collection classes.

One place such an OOB access can happen is indeed in the OnInitDialog() for the LDG ATU dialog. There, an array of COM port names is built. Another array is built with COM port numbers, but the code seems to think that some COM ports don't have numbers. If such a COM port is encountered, the array of names will be longer than the array of numbers. I don't know upon which hardware configurations this happens, but the code is there and it explains the symptoms.

Maybe there are other possible causes.

WA9PIE

2019-02-20 01:28

administrator   ~0007451

I can now reproduce this problem.

Have a machine with physical radios created in Rig Control with physical or virtual COM ports. Also, make sure there's a Dem-o-matic radio enabled. (So the "Presets" should show the physical radios and any demo radios configured.)
Unplug all the COM port cables. Make sure that the operating system shows no COMports in Device Manager.
Launch Rig Control... before the Connect dialog box comes up, you should get the "Encountered an improper argument" error.

I've reproduced this several times. The problem goes away when there is ANY COM port showing in Device Manager. It can be completely unrelated to previously connected rigs. This would affect others who make heavy use of Dem-o-matic radios when they are not connected to a physical radio.

K7ZCZ

2019-02-20 11:35

administrator   ~0007455

Fixed with this checkin: https://hrdsoftware.visualstudio.com/HRD/_versionControl/changeset/4836

The most important issue to test here is the LDG ATU code. I don't have access to that hardware.

WA9PIE

2019-02-20 23:35

administrator   ~0007463

Validated

Issue History

Date Modified Username Field Change
2019-02-18 22:31 WA9PIE New Issue
2019-02-18 22:33 WA9PIE Note Added: 0007428
2019-02-18 22:33 WA9PIE Assigned To => K7ZCZ
2019-02-18 22:33 WA9PIE Status new => assigned
2019-02-19 14:47 WA9PIE Note Added: 0007431
2019-02-19 17:58 K7ZCZ Note Added: 0007433
2019-02-20 01:28 WA9PIE Note Added: 0007451
2019-02-20 11:35 K7ZCZ Status assigned => resolved
2019-02-20 11:35 K7ZCZ Resolution open => fixed
2019-02-20 11:35 K7ZCZ Note Added: 0007455
2019-02-20 23:35 WA9PIE Status resolved => closed
2019-02-20 23:35 WA9PIE Fixed in Version => 6.5.0.195
2019-02-20 23:35 WA9PIE Testing Not Started => Beta Successful
2019-02-20 23:35 WA9PIE Note Added: 0007463
2019-02-24 14:36 WA9PIE Fixed in Version 6.5.0.195 => 6.5.0.196
2019-02-24 15:12 WA9PIE Project 3 - Current Dev List => Ham Radio Deluxe