[Lazarus] Newbie, porting class to FPC but get procedure assignment error
luiz americo pereira camara
luizmed at oi.com.br
Mon Jun 22 21:43:31 CEST 2015
In the breakpoint do a step into (f7) and ser the exact line that crashes
Luiz
Em 22/06/2015 14:03, "Bo Berglund" <bo.berglund at gmail.com> escreveu:
> On Mon, 22 Jun 2015 13:29:07 -0300, luiz americo pereira camara
> <luizmed at oi.com.br> wrote:
>
> >In my experince sigsegv occurs mostly when a field or variable is accessed
> >before initialization.
> >
> >Try to set a breakpoint in dongle.initkey call. And evaluate the dongle
> >field (open debugger evaluate window)
> >
> >Look for dongle or one of the tsentinel fields being nil
> >
>
> I have already a breakpoint in the on-click event handler for the
> button. The code is:
>
> procedure TfrmMain.btnFindKeyClick(Sender: TObject);
> var
> SerialNo: word;
> begin
> //Code to check for the dongle and if found display its contents
> Dongle.InitKey; <-- Breakpoint here
> Dongle.AppNumber := 1;
> if Dongle.CheckKey then
> begin
> SerialNo := Dongle.SerialNo;
> stxSerialNo.Caption := IntToStr(SerialNo);
> end;
> end;
>
> When Lazarus stops and I hover over the Dongle variable (which was
> created in the form's OnCreate event) I see all fields of the Dongle
> object and they seem to be normal, except for the FSentinelPacket.
>
> This is supposed to be an array of char [1..1028] but it says
> FSENTINELPACKET=#0#0#0#0Truncated 1027->1000####
>
> Does this imply that the size of the packet has been initialized
> erroneously?
> It is defined thus: ARRAY [1..1028] OF CHAR;
> Can the indexing be a problem? The packet is defined with a starting
> index of 1 rather than 0...
>
>
> --
> Bo Berglund
> Developer in Sweden
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150622/d6e4c616/attachment-0003.html>
More information about the Lazarus
mailing list