View Issue Details

IDProjectCategoryView StatusLast Update
0002725Ham Radio DeluxeBugpublic2018-06-13 09:13
ReporterK7ZCZ 
Assigned ToK7ZCZ 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version6.4.0.843 
Summary0002725: HRDSerialPortSvr: doesn't read config file
DescriptionThe HRDSerialPortSvr application tries to read a config file, which is just a text file.

The file isn't successfully opened. When an open call is made, the call is successful but the successful result is misinterpreted as failure and the program exits.

Even with this issue corrected, the opening of the file is incorrect. The supplied configuration file is Unicde, with a BOM for UTF-8. The `fopen()` call is not instructed to look for the BOM or manage decoding, and so the file ends up being unreadable.

TagsNo tags attached.
ModuleRig Control
Sub-ModuleRig Control
Testing Not Tested

Relationships

Activities

K7ZCZ

2018-05-22 09:21

manager   ~0005084

fixed with this checkin:
https://hrdsoftware.visualstudio.com/HRD/_versionControl/changeset/4129

WA9PIE

2018-06-05 14:40

administrator   ~0005205

Are there steps we can use to test this? If not, we may just need to take your first-hand knowledge as good.

K7ZCZ

2018-06-10 22:45

manager   ~0005233

The HRD Serial Port service is pretty badly broken. Turns out command line parsing still doesn't quite work in a sensible way, but this bug is pretty easy to verify.


Using an old version of HRD (I'm on Build 786 for this):

1) Make sure the HRD Serial Port Server service isn't running
2) run CMD as Administrator
3) from the install directory (C:\Program Files (x86)\HRD Software LLC\Ham Radio Deluxe by default) run this command line:

HRDSerialPortSvr.cfg debug /debug


The output ends up lookling like this:

WSAError : Socket Bind failure.
WSAError : Error code = 0
WSAError : Error text = The operation completed successfully.



The main reason is -- well, the code sucks; there's about three different issues here. One of them is that the code hasn't actually read the config file to see what it needs to do, and tries to open a bogus device descriptor. And does bad error handling, and then ...

With a newer version, the behaviour isn't great, but it's much better:

4) Make sure the HRD Serial Port Server service isn't running
5) run CMD as Administrator
6) from the install directory (C:\Program Files (x86)\HRD Software LLC\Ham Radio Deluxe by default) run this command line:

HRDSerialPortSvr.cfg debug /debug


The output will echo the (correct, LOL!) parsing of the command line, then show the content of the config file. AFter that, it will try to manage the service state.

TRACE (1) : Argument [0] = HRDSerialPortSvr.exe
TRACE (1) : Argument [1] = debug
TRACE (1) : Argument [2] = /debug
TRACE (1) : Argument set to Debug Mode
TRACE (9) : Config file: C:\Ham Radio\Release\HRDSerialPortSvr.cfg
TRACE (9) :
TRACE (9) : Config: #
TRACE (9) : Config: #   Ham Radio Deluxe Serial Port Server
TRACE (9) : Config: #   -----------------------------------
TRACE (9) : Config: #
... lots more ...

WA9PIE

2018-06-13 09:09

administrator   ~0005256

In this case, the developer observed this and has resolved it. We're accepting these observations as test positive.

Issue History

Date Modified Username Field Change
2018-05-20 15:38 K7ZCZ New Issue
2018-05-22 09:21 K7ZCZ Assigned To => K7ZCZ
2018-05-22 09:21 K7ZCZ Status new => resolved
2018-05-22 09:21 K7ZCZ Resolution open => fixed
2018-05-22 09:21 K7ZCZ Note Added: 0005084
2018-05-26 23:27 K7ZCZ Fixed in Version => 6.4.0.842
2018-06-05 14:40 WA9PIE Note Added: 0005205
2018-06-10 22:45 K7ZCZ Note Added: 0005233
2018-06-13 09:09 WA9PIE Status resolved => closed
2018-06-13 09:09 WA9PIE Testing Not Started => Not Tested
2018-06-13 09:09 WA9PIE Note Added: 0005256
2018-06-13 09:13 WA9PIE Fixed in Version 6.4.0.842 => 6.4.0.843
2018-06-13 09:13 WA9PIE Project 3 - Current Dev List => Ham Radio Deluxe