Sign in Join

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

Mailing lists / lazarus / 2003-06

Bug or not?

8 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Vasily I. Volchenko

Seems like another mail service wasn't able to post messages to discussion.
I have written a program
http://www.ussr.to/Russia/vvi/fpclcl/salting.tgz
But when creating and modal showing a new form (in menu item click handler), program can unexpectively die (but can not) with gdk-error about invalid window or pixmap. Seems that it is a bug of lcl/gtk/gdk.

Reply by email

Mattias Gaertner
to Vasily I. Volchenko
Show quoted text 8 lines
> > Any gdk warning is a bug. > > Please report them (Send the gdb backtrace). > > > > Mattias That was a shm-bug. --no-xshm fixed the first bug... But did nothing with second(Bad drawable). --g-fatal-warnings in gdb did nothing too (program died without any break in gdb).

Never saw such a thing.
Can you send the whole output?

Mattias

Reply by email

Mattias Gaertner
to Vasily I. Volchenko: Seems like another mail service wasn't able to post messages to discussion. I have…
Show quoted text 7 lines
Seems like another mail service wasn't able to post messages to discussion. I have written a program http://www.ussr.to/Russia/vvi/fpclcl/salting.tgz But when creating and modal showing a new form (in menu item click handler), program can unexpectively die (but can not) with gdk-error about invalid window or pixmap. Seems that it is a bug of lcl/gtk/gdk.

I tried without problems. Maybe it has something to do with the compiler.

- Please add the memcheck unit as first unit to your lpr source to find any mem corruption.
- Run the program with the parameter '--g-fatal-warnings', so that the gdb warnings will immediately stop the program and you can see the call stack
- check with ldd if your program uses only the gtk libs and no gtk-2.x or glib-2.x libs.

Mattias

Reply by email

Vasily I. Volchenko
to Vasily I. Volchenko: Seems like another mail service wasn't able to post messages to discussion. I have…
Never saw such a thing. Can you send the whole output? Mattias

Here you are (see attach)

vvi]$ cd /usr/src/
src]$ cd pascal/my/Salting/
Salting]$ ./salttask

Gdk-WARNING **: shmget failed: error 38 (Function not implemented) Gdk-ERROR **: BadDrawable (invalid Pixmap or Window parameter) serial 10283 error_code 9 request_code 14 minor_code 0 Salting]$ ./salttask --g-fatal-warnings

Gdk-WARNING **: shmget failed: error 38 (Function not implemented) aborting...
Aborted
Salting]$ ./salttask --g-fatal-warnings --no-xshm
Gdk-ERROR **: BadWindow (invalid Window parameter) serial 12575 error_code 3 request_code 15 minor_code 0 Salting]$ gdb ./s
salttask stu1.lrs stu1.pas.bak stu2.lrs stu2.pas.bak salttask.o stu1.lrs.bak stu1.ppu stu2.lrs.bak stu2.ppu stu1.lfm stu1.o stu2.lfm stu2.o
stu1.lfm.bak stu1.pas stu2.lfm.bak stu2.pas Salting]$ gdb ./sa
salttask salttask.o
Salting]$ gdb ./salttask
GNU gdb 5.2.1-2mdk (Mandrake Linux)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-mandrake-linux-gnu"... (gdb) r --g-fatal-warnings
Starting program: /home/vvi/pascal/my/Salting/salttask --g-fatal-warnings

Gdk-WARNING **: shmget failed: error 38 (Function not implemented) aborting...

Program received signal SIGABRT, Aborted.
0x4035b3d1 in kill () from /lib/i686/libc.so.6
(gdb) bt
#0 0x4035b3d1 in kill () from /lib/i686/libc.so.6 #1 0x40326dad in raise () from /lib/i686/libpthread.so.0 #2 0x4035c979 in abort () from /lib/i686/libc.so.6 #3 0x4030abf4 in g_logv () from /usr/lib/libglib-1.2.so.0 #4 0x4030ac34 in g_log () from /usr/lib/libglib-1.2.so.0 #5 0x40289c5f in gdk_image_new () from /usr/lib/libgdk-1.2.so.0 #6 0x40289cb1 in gdk_image_new () from /usr/lib/libgdk-1.2.so.0 #7 0x4028dd7d in gdk_bitmap_unref () from /usr/lib/libgdk-1.2.so.0 #8 0x4028d6b2 in gdk_pixmap_colormap_create_from_xpm_d () from /usr/lib/libgdk-1.2.so.0
#9 0x080dd725 in TGTKOBJECT__CREATEFORM (ACUSTOMFORM=0x814ffe4, this=0x8149534) at gtkobject.inc:4540
#10 0x080de6ac in TGTKOBJECT__CREATECOMPONENT (SENDER=0x814ffe4, this=0x8149534) at gtkobject.inc:4778
#11 0x080d81c3 in TGTKOBJECT__INTSENDMESSAGE3 (LM_MESSAGE=4097, SENDER=0x814ffe4, DATA=0x0, this=0x8149534) at gtkobject.inc:1774 #12 0x0809ad8f in CNSENDMESSAGE (LM_MESSAGE=4097, SENDER=0x814ffe4, DATA=0x0) at controls.pp:1156
#13 0x0809fa85 in TWINCONTROL__CREATECOMPONENT (THEOWNER=0x0, this=0x814ffe4) at wincontrol.inc:2466
#14 0x0809f948 in TWINCONTROL__CREATEWND (this=0x814ffe4) at wincontrol.inc:2435
#15 0x080f6c30 in TSCROLLINGWINCONTROL__CREATEWND (this=0x814ffe4) ---Type <return> to continue, or q <return> to quit--- at scrollingwincontrol.inc:33
#16 0x080f8c03 in TCUSTOMFORM__CREATEWND (this=0x814ffe4) at customform.inc:1248
#17 0x0809f742 in TWINCONTROL__CREATEHANDLE (this=0x814ffe4) at wincontrol.inc:2397
#18 0x0809d0b7 in TWINCONTROL__UPDATESHOWING (this=0x814ffe4) at wincontrol.inc:878
#19 0x080f8f85 in TCUSTOMFORM__UPDATESHOWING (this=0x814ffe4) at customform.inc:1341
#20 0x0809ed01 in TWINCONTROL__UPDATECONTROLSTATE (this=0x814ffe4) at wincontrol.inc:1861
#21 0x080a0025 in TWINCONTROL__CMVISIBLECHANGED (THEMESSAGE= {MSG = 45067, WPARAM = 1, LPARAM = 0, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}, this=0x814ffe4) at wincontrol.inc:2736
#22 0x0810537a in _SYSTEM_TOBJECT_$_DISPATCH$formal () #23 0x080a2109 in TCONTROL__WNDPROC (THEMESSAGE=
{MSG = 45067, WPARAM = 1, LPARAM = 0, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}, this=0x814ffe4) at control.inc:1112
#24 0x0809e526 in TWINCONTROL__WNDPROC (MESSAGE=
{MSG = 45067, WPARAM = 1, LPARAM = 0, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}, this=0x814ffe4) ---Type <return> to continue, or q <return> to quit--- at wincontrol.inc:1516
#25 0x080f82dc in TCUSTOMFORM__WNDPROC (THEMESSAGE= {MSG = 45067, WPARAM = 1, LPARAM = 0, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}, this=0x814ffe4) at customform.inc:806
#26 0x080a152b in TCONTROL__PERFORM (MSG=45067, WPARAM=1, LPARAM=0, this=0x814ffe4) at control.inc:639
#27 0x080a352c in TCONTROL__SETVISIBLE (VALUE=true, this=0x814ffe4) at control.inc:2030
#28 0x080f7967 in TCUSTOMFORM__SETVISIBLE (VALUE=true, this=0x814ffe4) at customform.inc:280
#29 0x080f7e81 in TCUSTOMFORM__ENDFORMUPDATE (this=0x814ffe4) at customform.inc:553
#30 0x080f86f7 in TCUSTOMFORM__CREATE (AOWNER=0x81493d4, pvmt=0x814ffe4) at customform.inc:963
#31 0x080fbd47 in TAPPLICATION__CREATEFORM (INSTANCECLASS=0x81415a0, REFERENCE=void, this=0x81493d4) at application.inc:997 #32 0x0810e2f9 in main () at salttask.lpr:11
(gdb) c
Continuing.

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
(gdb) r --g-fatal-warnings --no-xshm
Starting program: /home/vvi/pascal/my/Salting/salttask --g-fatal-warnings --no-xshm Gdk-ERROR **: BadDrawable (invalid Pixmap or Window parameter) serial 3138 error_code 9 request_code 14 minor_code 0

Program exited with code 01.
(gdb) q

Reply by email