QuickLib icon indicating copy to clipboard operation
QuickLib copied to clipboard

Logical error

Open status-kvo opened this issue 2 years ago • 1 comments

unit Quick.Threads;

function TThreadedQueueCS<T>.PopItem(var AQueueSize: Integer; var AItem: T): TWaitResult;

before the line AItem := FQueue[FQueueOffset];

need to add array size check if (FQueueOffset >= Length(FQueue)) then Exit;

otherwise an error occurs Exception class $C0000005 with message 'c0000005 ACCESS_VIOLATION'. string: AItem := FQueue[FQueueOffset];

watch Length(FQueue) = 0; watch FQueueOffset = 60;

status-kvo avatar Oct 07 '22 15:10 status-kvo

Which version are you using?

exilon avatar Oct 14 '22 21:10 exilon