Acess violation with TIdModBusClient
Brought to you by:
plpolak
With Delphi 2010 + update 5 and Indy 10, I got an AV in TIdModBusClient.SendCommand in
{$IFDEF DMB_INDY10}
Buffer := RawToBytes(SendBuffer, Swap(SendBuffer.Header.RecLength) + 6);
IOHandler.WriteDirect(Buffer);
{$ELSE}
It's due to the fact that IOHandler is created only in "Connect", but If connect is nevel called (that's the case when "AutoConnect = false") then an exception will raise.
A small fix for this bug is attached.
Patch to fix this bug