Hang/freeze after running a while

If you have specific questions or problems with any of my Freeware applications, post them here.
mcu8484
Posts: 9
Joined: Tue Feb 02, 2021 5:10 pm

Hang/freeze after running a while

Post by mcu8484 »

First, thank you for developing CoolTerm.

CoolTerm 1.9.1 on Windows has all the features I need but it won't run long term (many hours) without hanging with my desired config. The running duration seems to be determined by the terminal scroll back buffer size. There is plenty of available memory but when the scroll back buffer size is set > ~2MB then the problem happens. It hangs sooner if the scroll back buffer size is set to 10MB instead of 5MB. Any help to resolve the problem would be appreciated.

FYI, I used to run with scroll back buffer size at 10MB with older CoolTerm versions (1.8/1.7) with similar config on the same computer without such problem. I don't want to downgrade as I would like to keep the new features in 1.9.
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: Hang/freeze after running a while

Post by roger »

Are you using the 32bit or the 64bit version?

I wonder if the perhaps is different behavior between the two with your particular configuration. Below are the download links:

64 bit: http://freeware.the-meiers.org/CoolTermWin.zip
32 bit: http://freeware.the-meiers.org/CoolTermWin32Bit.zip

Can you try both and see if the problem persists with either one.

Also, can post the contents of your settings file?
mcu8484
Posts: 9
Joined: Tue Feb 02, 2021 5:10 pm

Re: Hang/freeze after running a while

Post by mcu8484 »

Thanks for your suggestions.

I am using the 64-bit version but I tried the 32-bit version per your suggestion. The 32-bit version didn't work either but the result was a bit different. It ran only about a third of the time of the 64-bit version then popped up an exception dialog box to terminate instead of just hanging.

Here is the settings I used for testing the 64-bit and 32-bit versions:

Code: Select all

Port = COM17
BaudRate = 115200
DataBits = 8
Parity = N
StopBits = 1
FlowControlCTS = false
FlowControlDTR = false
FlowControlXON = false
UseSoftwareSupportedFlowControl = false
BlockKeystrokesWhileFlowHalted = true
DTRDefaultState = true
RTSDefaultState = true
ViewerMode = Plain
WrapPlainText = true
TerminalMode = Line
EnterKeyEmulation = LF
EnterKeyEmulationCustomSequence = 00 1B
EnableBell = false
FormatTABtext = false
FormatTABtextColumnWidth = 8
ReplaceSpacesWithTAB = false
ReplaceSpacesWithTABthreshold = 2
EnableFormFeed = false
EnableEndOfText = false
IgnoreLineFeed = false
CombineCR = false
UseRealCR = false
HandleEscHome = false
HandleEscEnd = false
FilterASCIIescapeSequences = false
PlainTextEncoding = SystemDefault
LocalEcho = false
ReplaceTAB = false
TABSpaces = 4
ConvertNonPrint = true
RemoveHighBit = false
EnableBackspace = false
LoopbackRXData = false
IgnoreRXSignalErrors = true
RXBufferSize = 5000000
RXDataTimeStamp = true
RXDataTimeStampFormat = Time+Millis
RXDataTimeStampWaitForEOL = false
CaptureFormat = Raw
CaptureFormatHexData = true
CaptureTimeStamp = true
CaptureTimeStampFormat = Time+Millis
CaptureWaitForTerminationString = true
CaptureTerminationString = 0A
CaptureRetainTerminationString = true
CaptureLocalEcho = false
CaptureFileStaysOpen = true
CaptureAutostart = false
CaptureAutoAppend = false
CaptureAutoFilename = 
CapturePath = C:\Users\gm4gw\Documents\TestLogs\
TerminateSendString = false
TerminationString = 0D 0A
TXCharDelayEnabled = false
TXCharDelay = 3000
TXLineDelayEnabled = false
TXLineDelay = 3000
TXLineDelayChars = 0A
TXLineDelayMatchAllChars = false
TXPacketDelayEnabled = false
TXPacketDelay = 3000
TXPacketSize = 256
XmitWaitEnable = false
SendTextSoundEnable = false
TextFont = Courier
TextFontSize = 0
InputFontSize = 0
TextFontColor = &h00000000
CondenseLines = false
TextBackgroundColor = &h00FFFFFF
HexFont = Courier
HexFontSize = 0
AutoConnect = false
AutoDisconnect = false
AutoReconnect = true
AutoReconnectDelay = 100
ShowConnectionTimer = true
ShowRxTxByteCounts = true
ResetStatisticsWhenPortOpens = true
RefreshInterval = 10
WindowPosition = 477,117,861,591
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: Hang/freeze after running a while

Post by roger »

Thanks. I’ll try those settings on my end.

Is the problem only happening when you’re receiving data and the buffer is filling up, or is it also happening even without receiving data (i.e. after some amount of time has passed).
mcu8484
Posts: 9
Joined: Tue Feb 02, 2021 5:10 pm

Re: Hang/freeze after running a while

Post by mcu8484 »

roger wrote:Thanks. I’ll try those settings on my end.

Is the problem only happening when you’re receiving data and the buffer is filling up, or is it also happening even without receiving data (i.e. after some amount of time has passed).
I've only tried it while receiving data. I suspect it won't hang without incoming data because I have tested with terminal buffer at 2MB and it ran for >24 hours while receiving data.
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: Hang/freeze after running a while

Post by roger »

Ok, thanks.

Do you have a rough idea how full the buffer is when it hangs? The status field at the bottom tells you how many bytes have been received.
mcu8484
Posts: 9
Joined: Tue Feb 02, 2021 5:10 pm

Re: Hang/freeze after running a while

Post by mcu8484 »

roger wrote:Ok, thanks.

Do you have a rough idea how full the buffer is when it hangs? The status field at the bottom tells you how many bytes have been received.
For v1.9.1 64-bit version, the last time I tested it ran for ~7 hours before hanging after ~6.5MB was received.

BTW, I tried the v2.0beta 64-bit version and it stopped sooner (~4 hours).

All tests were done with the posted config.
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: Hang/freeze after running a while

Post by roger »

Ok, I've been running your setup with the CoolTerm 2.0.0 beta on a Win10 machine for almost 9hr, receiving over 46MB of data so far, and it happily keeps chugging along. So, I'm not seeing what you're seeing. Thus, this could be something specific to your setup. I'm wondering if perhaps the nature of the data that is being received?

My the device I'm using for this test is sending a few paragraphs of lorem ipsum text once per seconds, which is about 5MB of date per hour. This is a higher data rate than in your case (from your last e-mail I guess it's a little under 1MB per hour). Also, in my test case I'm only receiving ASCII data. Could you post a sample of the data that you are receiving? I can use canned data to simulate your use case more accurately.

Roger
mcu8484
Posts: 9
Joined: Tue Feb 02, 2021 5:10 pm

Re: Hang/freeze after running a while

Post by mcu8484 »

That's good to hear. The data pattern hasn't changed. One thing that has changed in the environment over time is the OS which gets periodic updates. Does CoolTerm have any log files or debug modes that might shed more light?
User avatar
roger
Site Admin
Posts: 431
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: Hang/freeze after running a while

Post by roger »

mcu8484 wrote:That's good to hear. The data pattern hasn't changed. One thing that has changed in the environment over time is the OS which gets periodic updates. Does CoolTerm have any log files or debug modes that might shed more light?
No, CoolTerm doesn't generate any log files. However, I can run it in the debugger from my IDE when I need to track down something weird, but that requires that I can replicate the behavior. What's the data you are receiving? I don't think I made any changes to the code of the receive buffer in the recent versions, but I did implement some updates to the code to display the data (special character handling, etc). I'm wondering if perhaps there is a combination of the recent code changes and the data you are receiving that causes this behavior. Perhaps you can use file capture in CoolTerm to capture some of it to a file and send it to me (you can find my e-mail address in the "About" window in CoolTerm). I can then have my test setup transmit the same data to CoolTerm to more faithfully replicate your setup.

Alternatively, you can download older versions of CoolTerm here, so see if it's still the case that older versions don't hang: http://freeware.the-meiers.org/previous/
You can have multiple versions of CoolTerm on your computer. As long they are not running at the same time, that's no problem.
Post Reply