View Issue Details

IDProjectCategoryView StatusLast Update
00033303 - Current Dev ListBugpublic2019-06-23 17:07
ReporterK7ZCZAssigned Todoug 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version6.6.0.214 
Target VersionFixed in Version 
Summary0003330: Socaro Licenser assigns bogus version number to shared memory license structure
DescriptionData of an incorrect format is being set to a shared structure in the MyStation shared memory. Maybe this doesn't lead to trouble, but it should be investigated -- I don't believe the code can possibly be correct.
Steps To ReproduceThis warning appears in builds of the 6.6 tree:

c:\hrd66\hrdstation\hrdsoracolicenser.cpp(179): warning C4244: '=': conversion from 'double' to 'DWORD', possible loss of data


Investigating the warning, we find this code:

   g_pSharedMemory->sm_License[0].lic_dwMaxVersion = 6.5;


lic_dwMaxVersion is a DWORD, so it can't possibly accept a floating point value. This field typically uses a packed representation of the version number, where some bits have the major version number and some bits have the minor version number. Other references to this field in the project show that it's packed and unpacked.

This new warning should be investigated and fixed so we can be sure that it isn't causing trouble, or setting a trap for the future.

TagsNo tags attached.
ModuleAll
Sub-Module(select)
TestingNot Started

Activities

doug

2019-06-10 23:13

developer   ~0008034

Yeah that shared memory code is all over the place so I didn't want to mess with it much. I guess I just defaulted it to a bad value, and ignored the compiler warning. I don't think that value is something to we have to worry about any more. So I am just setting it to HRDVER now.

K7ZCZ

2019-06-10 23:23

administrator   ~0008035

Is the shared memory mechanism something we can disconnect altogether?

doug

2019-06-10 23:45

developer   ~0008038

That was the first approach I took. Then I realized that it would require touching a bunch of code across a lot of the projects. I then decided to leave it so my changes were confined to HRDStation.dll.

doug

2019-06-23 17:07

developer   ~0008183

I am going to resolve this one, I fixed the original bug, and getting rid of the shared memory code is not something we are going to do in this version.

Issue History

Date Modified Username Field Change
2019-06-07 08:33 K7ZCZ New Issue
2019-06-07 08:33 K7ZCZ Status new => assigned
2019-06-07 08:33 K7ZCZ Assigned To => doug
2019-06-10 23:13 doug Note Added: 0008034
2019-06-10 23:23 K7ZCZ Note Added: 0008035
2019-06-10 23:45 doug Note Added: 0008038
2019-06-11 21:14 doug Assigned To doug => K7ZCZ
2019-06-15 13:02 WA9PIE Assigned To K7ZCZ => doug
2019-06-15 16:32 K7ZCZ Summary Socaro Licener assigns bogus version number to shared memory license structure => Socaro Licenser assigns bogus version number to shared memory license structure
2019-06-23 17:07 doug Status assigned => resolved
2019-06-23 17:07 doug Resolution open => fixed
2019-06-23 17:07 doug Note Added: 0008183