I did some further testing.
I modified the code somewhat :
tmp1:=PPgw;
tmp2:=kx;
tmp1:=tmp1 * tmp2;
Pgw:=round(tmp1);
// Pgw := round(PPgw * kx);
tmp1 and tmp2 are Double. Running in gdb and backtracing at the crash
gives this :
Program received signal SIGBUS, Bus error.
0x004b45fc in TFRPRINTER__FILLPRNINFO (P=..., this=<error reading
variable>) at lr_prntr.pas:1044
1044 tmp1:=PPgw;
(gdb) bt
#0 0x004b45fc in TFRPRINTER__FILLPRNINFO (P=..., this=<error reading
variable>) at lr_prntr.pas:1044
#1 0x003bc198 in TFRREPORT__DOPRINTREPORT (PAGENUMBERS=0x744cff8c
'1-1', COPIES=1, this=<error reading variable>)
at lr_class.pas:11429
#2 0x003bbe20 in TFRREPORT__PRINTBEFOREMODAL (SENDER=0x75f0a450,
this=<error reading variable>) at lr_class.pas:11237
#3 0x004c4548 in TFRPROGRESSFORM__DOBEFOREMODAL (DATA=0, this=<error
reading variable>) at lr_progr.pas:88
#4 0x0006b71c in TAPPLICATION__PROCESSASYNCCALLQUEUE (this=<error
reading variable>)
at ./include/application.inc:1067
#5 0x000699c0 in TAPPLICATION__IDLE (WAIT=true, this=<error reading
variable>) at ./include/application.inc:389
#6 0x00063930 in TCUSTOMFORM__SHOWMODAL (this=<error reading variable>)
at ./include/customform.inc:2916
#7 0x004c4484 in TFRPROGRESSFORM__SHOW_MODAL (DOC=0x754ab400,
this=<error reading variable>) at lr_progr.pas:70
#8 0x003bbfbc in TFRREPORT__PRINTPREPAREDREPORT (PAGENUMBERS=0x744cff8c
'1-1', COPIES=1,
this=<error reading variable>) at lr_class.pas:11265
#9 0x000739d8 in BTNPRINTSETUPCLICK (this=0x756429b0,
SENDER=0x75f04870) at modmain.pas:229
#10 0x00224e5c in TCONTROL__CLICK (this=<error reading variable>) at
./include/control.inc:2734
#11 0x00251028 in TBUTTONCONTROL__CLICK (this=<error reading variable>)
at ./include/buttoncontrol.inc:54
#12 0x00251928 in TCUSTOMBUTTON__CLICK (this=<error reading variable>)
at ./include/buttons.inc:169
#13 0x00250ef4 in TBUTTONCONTROL__WMDEFAULTCLICKED (MESSAGE=...,
this=<error reading variable>)
at ./include/buttoncontrol.inc:20
#14 0x00041360 in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal ()
#15 0x00223bc8 in TCONTROL__WNDPROC (THEMESSAGE=..., this=<error reading
variable>) at ./include/control.inc:2122
#16 0x00215b1c in TWINCONTROL__WNDPROC (MESSAGE=..., this=<error reading
variable>) at ./include/wincontrol.inc:5383
#17 0x002f7a14 in DELIVERMESSAGE (TARGET=0x75f04870,
AMESSAGE=<error reading variable: Attempt to dereference a generic
pointer.>) at lclmessageglue.pas:112
#18 0x00309f78 in GTK2WSBUTTON_CLICKED (AWIDGET=0x985708,
AINFO=0x75c5c7e0) at gtk2wsstdctrls.pp:2428
#19 0x76972afc in ?? () from
/usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus