Recent

Author Topic: BUG: MSG Dialog broken in linux x86_64  (Read 7246 times)

Amnon82

  • New Member
  • *
  • Posts: 37
BUG: MSG Dialog broken in linux x86_64
« on: April 03, 2007, 08:11:26 pm »
I created a little testing app to find the bug:

dialog tester

I compiled it with FPC 2.0.4. Lazarus 0.9.23-20070403 was used for creation.

gtk1 works but gtk2 build is broken. It never shows the dialog. Instead I got this error:

Code: [Select]
[amnon@amnonspc_64bit:~/lazarus/test]$ ./dialogtester_gtk1
[amnon@amnonspc_64bit:~/lazarus/test]$ ./dialogtester_gtk2
GTKWindowStateEventCB Form1:TForm1 new_window_state=0 changed_mask=1
GTKWindowStateEventCB Form1:TForm1 0 [RMVDStPr]
TApplication.HandleException Invalid floating point operation
  Stack trace:
  $00002B355B1CE95E
  $4043F00000000000
TApplication.HandleException: there was another exception during showing the first exception
  Stack trace:
  $00002B355B1CE95E
  $403C200000000000
[amnon@amnonspc_64bit:~/lazarus/test]$

How can I fix it?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: BUG: MSG Dialog broken in linux x86_64
« Reply #1 on: April 03, 2007, 08:55:59 pm »
Did you try using a different theme?

Floating point operations can be caused by buggy C code. Floating point exception tend to be off in C programs, but on in fpc programs.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: BUG: MSG Dialog broken in linux x86_64
« Reply #2 on: April 03, 2007, 11:16:13 pm »
To test the buggy C code hypothesis, can you add the following lines as first lines in the dialogtester_gtk2.lpr, before the application.Initialize?
Code: [Select]
 SetExceptionMask([exInvalidOp, exDenormalized,
                    exZeroDivide, exOverflow,
                    exUnderflow, exPrecision]);


This will help to diagnose the problem.

Amnon82

  • New Member
  • *
  • Posts: 37
BUG: MSG Dialog broken in linux x86_64
« Reply #3 on: April 05, 2007, 12:24:15 am »
Where exactly? I uploaded also the source. You mean like this:

Code: [Select]
program project1;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms
  { add your units here }, Unit1;

begin
  SetExceptionMask([exInvalidOp, exDenormalized,
                    exZeroDivide, exOverflow,
                    exUnderflow, exPrecision]);  
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.


won't work got this:

Code: [Select]
project1.lpr(14,3) Error: Identifier not found "SetExceptionMask"
project1.lpr(14,21) Error: Identifier not found "exInvalidOp"
project1.lpr(14,34) Error: Identifier not found "exDenormalized"
project1.lpr(15,21) Error: Identifier not found "exZeroDivide"
project1.lpr(15,35) Error: Identifier not found "exOverflow"
project1.lpr(16,21) Error: Identifier not found "exUnderflow"
project1.lpr(16,34) Error: Identifier not found "exPrecision"
project1.lpr(16,47) Error: Illegal expression
project1.lpr(22) Fatal: There were 8 errors compiling module, stopping

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
BUG: MSG Dialog broken in linux x86_64
« Reply #4 on: April 05, 2007, 12:26:18 am »
Right.

Add the math unit to the uses clause.

Amnon82

  • New Member
  • *
  • Posts: 37
BUG: MSG Dialog broken in linux x86_64
« Reply #5 on: April 06, 2007, 11:17:12 am »
the resulting error message is:

Code: [Select]
[amnon@amnonspc_64bit:~/lazarus/dialogtester]$ ./project1
GTKWindowStateEventCB Form1:TForm1 new_window_state=0 changed_mask=1
GTKWindowStateEventCB Form1:TForm1 0 [RMVDStPr]
TApplication.HandleException Invalid floating point operation
  Stack trace:
  $00002B6D45B9E95E  LCLINTFCELLRENDERER_NEW,  line 46 of /usr/lib/lazarus-0.9.23/lcl/interfaces/gtk/gtkproc.inc
  $4043F00000000000  LCLINTFCELLRENDERER_NEW,  line 46 of /usr/lib/lazarus-0.9.23/lcl/interfaces/gtk/gtkproc.inc
TApplication.HandleException: there was another exception during showing the first exception
  Stack trace:
  $00002B6D45B9E95E  LCLINTFCELLRENDERER_NEW,  line 46 of /usr/lib/lazarus-0.9.23/lcl/interfaces/gtk/gtkproc.inc
  $403C200000000000  LCLINTFCELLRENDERER_NEW,  line 46 of /usr/lib/lazarus-0.9.23/lcl/interfaces/gtk/gtkproc.inc


/usr/lib/lazarus-0.9.23/lcl/interfaces/gtk/ should it be not /usr/lib/lazarus-0.9.23/lcl/interfaces/gtk2/ ?!?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
BUG: MSG Dialog broken in linux x86_64
« Reply #6 on: April 06, 2007, 12:09:34 pm »
The error message doesn't help me much further :-(

The path is probably ok. The gtk2 interface shares much code with the gtk interface.

Amnon82

  • New Member
  • *
  • Posts: 37
BUG: MSG Dialog broken in linux x86_64
« Reply #7 on: April 06, 2007, 02:21:47 pm »
thats the way I build lazarus on Paldo GNU/Linux:

http://forum.paldo.org/index.php?action=topic&topicnr=157

Did I missed something?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2695
BUG: MSG Dialog broken in linux x86_64
« Reply #8 on: April 11, 2007, 04:54:30 pm »
Weird that you still get an exception while it is disabled
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018