<p dir="ltr">In the breakpoint do a step into (f7) and ser the exact line that crashes</p>
<p dir="ltr">Luiz</p>
<div class="gmail_quote">Em 22/06/2015 14:03, "Bo Berglund" <<a href="mailto:bo.berglund@gmail.com">bo.berglund@gmail.com</a>> escreveu:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 22 Jun 2015 13:29:07 -0300, luiz americo pereira camara<br>
<<a href="mailto:luizmed@oi.com.br">luizmed@oi.com.br</a>> wrote:<br>
<br>
>In my experince sigsegv occurs mostly when a field or variable is accessed<br>
>before initialization.<br>
><br>
>Try to set a breakpoint in dongle.initkey call. And evaluate the dongle<br>
>field (open debugger evaluate window)<br>
><br>
>Look for dongle or one of the tsentinel fields being nil<br>
><br>
<br>
I have already a breakpoint in the on-click event handler for the<br>
button. The code is:<br>
<br>
procedure TfrmMain.btnFindKeyClick(Sender: TObject);<br>
var<br>
  SerialNo: word;<br>
begin<br>
  //Code to check for the dongle and if found display its contents<br>
  Dongle.InitKey;  <-- Breakpoint here<br>
  Dongle.AppNumber := 1;<br>
  if Dongle.CheckKey then<br>
  begin<br>
    SerialNo := Dongle.SerialNo;<br>
    stxSerialNo.Caption := IntToStr(SerialNo);<br>
  end;<br>
end;<br>
<br>
When Lazarus stops and I hover over the Dongle variable (which was<br>
created in the form's OnCreate event) I see all fields of the Dongle<br>
object and they seem to be normal, except for the FSentinelPacket.<br>
<br>
This is supposed to be an array of char [1..1028] but it says<br>
FSENTINELPACKET=#0#0#0#0Truncated 1027->1000####<br>
<br>
Does this imply that the size of the packet has been initialized<br>
erroneously?<br>
It is defined thus: ARRAY [1..1028] OF CHAR;<br>
Can the indexing be a problem? The packet is defined with a starting<br>
index of 1 rather than 0...<br>
<br>
<br>
--<br>
Bo Berglund<br>
Developer in Sweden<br>
<br>
<br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" rel="noreferrer" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</blockquote></div>