[fpc-pascal] fpGUI Toolkit v0.7-rc2 for FPC 2.4
Schindler Karl-Michael
karl-michael.schindler at physik.uni-halle.de
Thu Apr 8 19:41:37 CEST 2010
Hi Graeme,
I had another go on the Mac.
the use of the unit users is still an issue. it should be ok to simply ifndef darwin the lines in fpg_x11.pas
Secondly, I did some more debugging regarding the X11 error. It depends on whether the window of the application is the actual toplevel X11 window or not. If there is a top level window, all is fine, if not I found that line 831 in file corelib/x11/fpg_netlayer_x11.pas causes the X11 error. The line with the offending procedure call is this:
XGetWMProtocols(FDisplay, AWindow, @Protocols, @Count);
Unfortunately, this does not tell me much, since my knwledge of X11 is very limited. maybe something more is needed to open a top level window, mac specific or not.
This is the log from the corresponding gdb session:
(gdb) c
Continuing.
Breakpoint 20, WINDOWADDPROTOCOL (this=0x520020, AWINDOW=6291457, APROTOCOL=0) at corelib/x11/fpg_netlayer_x11.pas:831
831 XGetWMProtocols(FDisplay, AWindow, @Protocols, @Count);
4: COUNT = 0
3: PROTOCOLS = 0x0
2: AWINDOW = 6291457
1: this->FDISPLAY = 0x803a00
(gdb) backtrace
#0 WINDOWADDPROTOCOL (this=0x520020, AWINDOW=6291457, APROTOCOL=0) at corelib/x11/fpg_netlayer_x11.pas:831
#1 0x00051fea in WINDOWSETSUPPORTPING (this=0x520020, AWINDOW=6291457) at corelib/x11/fpg_netlayer_x11.pas:602
#2 0x0004dc92 in DOALLOCATEWINDOWHANDLE (this=0x1c0d1e0, APARENT=0x0) at corelib/x11/fpg_x11.pas:1424
#3 0x00045350 in ALLOCATEWINDOWHANDLE (this=0x1c0d1e0) at corelib/fpg_base.pas:1021
#4 0x00054546 in HANDLESHOW (this=0x1c0d1e0) at corelib/fpg_widget.pas:707
#5 0x00057df4 in HANDLESHOW (this=0x1c0d1e0) at gui/fpg_form.pas:347
#6 0x00057acf in SHOW (this=0x1c0d1e0) at gui/fpg_form.pas:288
#7 0x000111d0 in MAINPROC () at colorlistboxtest.lpr:19
#8 0x00011210 in PASCALMAIN () at colorlistboxtest.lpr:27
#9 0x00020e95 in SYSTEM_FPC_SYSTEMMAIN$LONGINT$PPCHAR$PPCHAR ()
#10 0x00011159 in _start ()
#11 0x00011088 in start ()
(gdb) step
X Error of failed request: BadAtom (invalid Atom parameter)
Major opcode of failed request: 18 (X_ChangeProperty)
Atom id in failed request: 0x0
Serial number of failed request: 103
Current serial number in output stream: 104
More information about the fpc-pascal
mailing list