[Customdrawn] Some patches for dialogs and palette

Graeme Geldenhuys graeme at geldenhuys.co.uk
Wed Sep 12 13:05:46 CEST 2012


On 11/09/12 15:28, Felipe Monteiro de Carvalho wrote:
>
> Great! Just open a new form, drop TButton, TStaticText, TPanel, TGroupBox


In this test I placed only a TPanel on the Form, compiled and ran the 
application via GDB from the command line. Here is the backtrace.

----------------------
$ gdb ./project1
GNU gdb (GDB) SUSE (7.4.50.20120603-2.1.2)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from 
/home/graemeg/devel/tests/customdrawn/test1/project1...done.
(gdb) break fpc_raiseexception
Breakpoint 1 at 0x43c530
(gdb) run
Starting program: /home/graemeg/devel/tests/customdrawn/test1/project1

Program received signal SIGSEGV, Segmentation fault.
0x000000000043a774 in fpc_do_is ()
Missing separate debuginfos, use: zypper install 
glibc-debuginfo-2.15-22.6.4.x86_64 libX11-6-debuginfo-1.5.0-2.1.2.x86_64 
libXau6-debuginfo-1.0.7-2.1.2.x86_64 
libXext6-debuginfo-1.3.1-2.1.2.x86_64 libxcb1-debuginfo-1.8.1-2.1.2.x86_64
(gdb) bt
#0  0x000000000043a774 in fpc_do_is ()
#1  0x00007fffffffcab0 in ?? ()
warning: Range for type <error type> has invalid bounds 0..-128
#2  0x00000000005b5e79 in SELECTOBJECT (this=0x7ffff7f91e30, 
DC=140737353517760, GDIOBJ=18446744073574714944)
     at customdrawn/customdrawnwinapi.inc:5239
#3  0x000000000046eaa7 in DRAWTEXT (this=0x7ffff7f91e30, 
DC=140737353517760, STR=0x7ffff7fe2d50 'Panel1', COUNT=6, RECT=...,
     FLAGS=2357) at include/intfbasewinapi.inc:741
#4  0x000000000059da09 in DRAWTEXT (DC=140737353517760, 
STR=0x7ffff7fe2d50 'Panel1', COUNT=6, RECT=..., FLAGS=2357)
     at include/winapi.inc:216
#5  0x000000000051bdff in TEXTRECT (this=0x7ffff7f58b80, ARECT=..., X=1, 
Y=1, TEXT=0x7ffff7fe2d50 'Panel1', STYLE=...)
     at include/canvas.inc:1306
#6  0x0000000000678e9c in PAINT (this=0x7ffff7fce4b0) at 
include/custompanel.inc:133
#7  0x000000000062cad7 in PAINTWINDOW (this=0x7ffff7fce4b0, 
DC=140737353517760) at include/customcontrol.inc:132
#8  0x000000000060f870 in PAINTHANDLER (this=0x7ffff7fce4b0, 
THEMESSAGE=...) at include/wincontrol.inc:4758
#9  0x000000000061473f in WMPAINT (this=0x7ffff7fce4b0, MSG=...) at 
include/wincontrol.inc:6624
#10 0x000000000062ca0d in WMPAINT (this=0x7ffff7fce4b0, MESSAGE=...) at 
include/customcontrol.inc:112
#11 0x000000000043b4b1 in SYSTEM_TOBJECT_$__DISPATCH$formal () 

#12 0x000000000062c9c8 in ?? () 

#13 0x00007ffff7fce4b0 in ?? () 

#14 0x0000000000000001 in ?? () 

#15 0x000000000000000f in ?? ()
#16 0x00007fffffffd3b0 in ?? ()
#17 0x00007ffff7fce4b0 in ?? ()
#18 0x00007ffff7fe05e0 in ?? ()
#19 0x00007ffff7fa87f0 in ?? ()
#20 0x00007fffffffdb10 in ?? ()
#21 0x0000000000000000 in ?? ()
(gdb)

----------------------


I then enabled -CRrt and -O- fpc compiler parameters. Ran the project 
again through GDB from the command line, and here it it's backtrace.


---------------------------
$ gdb ./project1
GNU gdb (GDB) SUSE (7.4.50.20120603-2.1.2)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from 
/home/graemeg/devel/tests/customdrawn/test1/project1...done.
(gdb) break fpc_raiseexception
Breakpoint 1 at 0x43c570
(gdb) run
Starting program: /home/graemeg/devel/tests/customdrawn/test1/project1

Program received signal SIGSEGV, Segmentation fault.
0x000000000043a7b4 in fpc_do_is ()
Missing separate debuginfos, use: zypper install 
glibc-debuginfo-2.15-22.6.4.x86_64 libX11-6-debuginfo-1.5.0-2.1.2.x86_64 
libXau6-debuginfo-1.0.7-2.1.2.x86_64 
libXext6-debuginfo-1.3.1-2.1.2.x86_64 libxcb1-debuginfo-1.8.1-2.1.2.x86_64
(gdb) bt
#0  0x000000000043a7b4 in fpc_do_is ()
#1  0x00007fffffffcaa0 in ?? ()
warning: Range for type <error type> has invalid bounds 0..-128
#2  0x00000000005b5eb9 in SELECTOBJECT (this=0x7ffff7f91e30, 
DC=140737353517760, GDIOBJ=18446744073574714944)
     at customdrawn/customdrawnwinapi.inc:5239
#3  0x000000000046eae7 in DRAWTEXT (this=0x7ffff7f91e30, 
DC=140737353517760, STR=0x7ffff7fe2d50 'Panel1', COUNT=6, RECT=...,
     FLAGS=2357) at include/intfbasewinapi.inc:741
#4  0x000000000059da49 in DRAWTEXT (DC=140737353517760, 
STR=0x7ffff7fe2d50 'Panel1', COUNT=6, RECT=..., FLAGS=2357)
     at include/winapi.inc:216
#5  0x000000000051be3f in TEXTRECT (this=0x7ffff7f58b80, ARECT=..., X=1, 
Y=1, TEXT=0x7ffff7fe2d50 'Panel1', STYLE=...)
     at include/canvas.inc:1306
#6  0x0000000000678edc in PAINT (this=0x7ffff7fce4b0) at 
include/custompanel.inc:133
#7  0x000000000062cb17 in PAINTWINDOW (this=0x7ffff7fce4b0, 
DC=140737353517760) at include/customcontrol.inc:132
#8  0x000000000060f8b0 in PAINTHANDLER (this=0x7ffff7fce4b0, 
THEMESSAGE=...) at include/wincontrol.inc:4758
#9  0x000000000061477f in WMPAINT (this=0x7ffff7fce4b0, MSG=...) at 
include/wincontrol.inc:6624
#10 0x000000000062ca4d in WMPAINT (this=0x7ffff7fce4b0, MESSAGE=...) at 
include/customcontrol.inc:112
#11 0x000000000043b4f1 in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#12 0x000000000062ca08 in ?? ()
#13 0x00007ffff7fce4b0 in ?? ()
#14 0x0000000000000001 in ?? ()
#15 0x000000000000000f in ?? ()
#16 0x00007fffffffd3a0 in ?? ()
#17 0x00007ffff7fce4b0 in ?? ()
#18 0x00007ffff7fe05e0 in ?? ()
#19 0x00007ffff7fa87f0 in ?? ()
#20 0x00007fffffffdb10 in ?? ()
#21 0x0000000000000000 in ?? ()
(gdb)

---------------------------


I hope all this help.

Regards,
   - Graeme -





More information about the Customdrawn mailing list