Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-11

Win32 Compile errors

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Florian Klaempfl
to Mattias Gaertner: I spotted a bug in current fpc 1.9.1 and the Round function. I was not able to reproduce…
Mattias Gaertner wrote 16 lines
Hi, I spotted a bug in current fpc 1.9.1 and the Round function. I was not able to reproduce the error in a small context or find the bug in the fpc bug list. Perhaps the needed context has something to do with the gtk libs. So, maybe someone else knows this bug: The bug appears in gtkwinapi.inc 7773 in the line "Result:=Round(Value);": Program received signal SIGFPE, Arithmetic exception. 0x0813ca57 in fpc_round () Value is 0, so rounding should be pretty easy. Adding a writeln(Value); in front "fixes" the bug. Any clues/hints?

Can you set a break point before the round call and post an fpu dump (including status registers)?

Reply by email

C Western
to Mattias Gaertner: I spotted a bug in current fpc 1.9.1 and the Round function. I was not able to reproduce…
Mattias Gaertner wrote 16 lines
>>I spotted a bug in current fpc 1.9.1 and the Round function. >>I was not able to reproduce the error in a small context or find the bug >>in the fpc bug list. Perhaps the needed context has something to do with >>the gtk libs. So, maybe someone else knows this bug: >> >>The bug appears in gtkwinapi.inc 7773 in the line >>"Result:=Round(Value);": >> >>Program received signal SIGFPE, Arithmetic exception. >>0x0813ca57 in fpc_round () >> >>Value is 0, so rounding should be pretty easy. >>Adding a writeln(Value); in front "fixes" the bug. >> >> >>

I have had this sort of problem (though not in your specific context). In my case it was caused by a problem elsewhere - either: a) The floating point stack is full
b) A fpu exception has been raised proviously, but is discovered in the round function when exceptions are unmasked
Colin

Reply by email

Mattias Gaertner
to Mattias Gaertner: I spotted a bug in current fpc 1.9.1 and the Round function. I was not able to reproduce…
Show quoted text 22 lines
Mattias Gaertner wrote: > Hi, > > I spotted a bug in current fpc 1.9.1 and the Round function. > I was not able to reproduce the error in a small context or find the bug > in the fpc bug list. Perhaps the needed context has something to do with > the gtk libs. So, maybe someone else knows this bug: > > The bug appears in gtkwinapi.inc 7773 in the line > "Result:=Round(Value);": > > Program received signal SIGFPE, Arithmetic exception. > 0x0813ca57 in fpc_round () > > Value is 0, so rounding should be pretty easy. > Adding a writeln(Value); in front "fixes" the bug. > > Any clues/hints? Can you set a break point before the round call and post an fpu dump (including status registers)?

Breakpoint 1, TGTKOBJECT__SETSCROLLINFO (HANDLE=144650600, SBSTYLE=1, SCROLLINFO=
{CBSIZE = 28, FMASK = 103, NMIN = 0, NMAX = 0, NPAGE = 244, NPOS = 0, NTRACKPOS = 0}, BREDRAW=false,
this=$81a3594, result=0, ADJUSTMENT=$89f5e18, SCROLL=$89f5158, NEWPOLICY=-1073744992) at gtkwinapi.inc:7776
7776 gtkwinapi.inc: No such file or directory.
in gtkwinapi.inc
Current language: auto; currently pascal
(gdb) info float
R7: Empty 0x00000000000000000000
=>R6: Empty 0x40058bffffffffffe000
R5: Empty 0x3ffed406483ed274388a
R4: Empty 0x4000c000000000000000
R3: Empty 0x4006f300000000000000
R2: Empty 0x3ffe95a578c9c6fc07ee
R1: Empty 0x3ffe95a578c9c6fc07ee
R0: Empty 0x4006b400000000000000

Status Word: $3061 IE PE SF TOP: 6
Control Word: $037f IM DM ZM OM UM PM
PC: Extended Precision (64-bits)
RC: Round to nearest
Tag Word: $ffff
Instruction Pointer: $00:$00000000
Operand Pointer: $00:$00000000
Opcode: $0000
(gdb) c
Continuing.

Program received signal SIGFPE, Arithmetic exception. $0813ca47 in fpc_round ()

Mattias

Reply by email

Mattias Gaertner

Hi,

I spotted a bug in current fpc 1.9.1 and the Round function. I was not able to reproduce the error in a small context or find the bug in the fpc bug list. Perhaps the needed context has something to do with the gtk libs. So, maybe someone else knows this bug:

The bug appears in gtkwinapi.inc 7773 in the line "Result:=Round(Value);":

Program received signal SIGFPE, Arithmetic exception. 0x0813ca57 in fpc_round ()

Value is 0, so rounding should be pretty easy.
Adding a writeln(Value); in front "fixes" the bug.

Any clues/hints?

Mattias

Reply by email