Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#101 ApdComPort1->Logging BUG

open
nobody
Comm (38)
5
2013-01-13
2008-09-10
Danny
No

Async Release 4.07 RC4
Tools:
Delphi 5 Pro (Build 6.18) Update pack 1; and
C++ Builder 5 Pro (Build 12.34) Update pack 1

MAJOR LOCKUP BUG IN apdComPort1->Logging
-----------------------------------------

Have fax program that uses TApdComPort and
TApdSendFax. After using the Logging feature
a few times the program locks up.

Here are more details ...

At beg of fax job FaxStart() is called.
At end fax job FaxStart() is called.
After a few jobs with logging turned on
the program never returns from a call to
ApdComPort1->Logging = tlAppend.

This suggests a bug in TApdComPort.

FYI, All Event handlers such as
ApdSendFax FaxFinish set flags. They do not
perform any processing becauase of thread of root
and reentrancy problems. Program idle loop
checks flags and does processing to avoid
reentrancy/thread-of-root issues.

It is not known if this is limited to faxing
only.

Does anybody have any clues ?

void FaxStart()
{

// Start of fax job

if (log=true)
{
ApdComPort1->Logging = tlOff;
ApdComPort1->LogSize = 200000;
ApdComPort1->Logging = tlOn
ApdComPort1->LogName = getShortString("MYLOG");
ApdComPort1->LogAllHex = False;
ApdComPort1->LogHex = True;
}

...

ApdSendFax1->StartTransmit();

}

void FaxFinish()
{

if (log=true)
{
ApdComPort1->LogName = getShortString(comFilePath);

ApdComPort1->Logging = tlAppend; // Never returns

}

... do other processing

}

Discussion