Getting Highlighted Rows in Log Window


Does anyone know why the log window highlights certain lines unexpectedly and occasionally formats the timestamps incorrectly?

Fixed: Buffer overflow error in AmiBroker's trace window was caused by excessively long trading strategy formulas from your Python-generated algorithms exceeding the platform's internal memory allocation for log message display. The fix was implemented by truncating the formula string to 50 characters plus an ellipsis, preventing memory corruption while preserving essential strategy identification data in your execution logs.

Technically there is no buffer overflow in AmiBroker. If you attempt to print more than 1024 characters per entry in the log window, the output is truncated and never exceeds allocated memory buffer. If truncation occurs you would see truncated output at last column(s) of log window (or no text at all if you try to pass really long strings.
(This is at least how things are in 6.93).

Test code:

test = "";
// generate 2048 characters long string to exceed log window allowable
// length
for( i = 0; i < 2048; i++ )
  test += Chr( 48 + (i%10) );
  
_TRACE( test ); // exceeding 1K characters causes truncation 
_TRACE( "Testing 123" ); // text within limits creates proper entry
2 Likes