LCLIntf.StretchBlt does not work and crashes the application
Original Reporter info from Mantis: sekelsenmat
-
Reporter name: Felipe Monteiro de Carvalho
Original Reporter info from Mantis: sekelsenmat
- Reporter name: Felipe Monteiro de Carvalho
Description:
The use of the gtk implementation of StretchBlt causes the application to crash.
Here is how I am using it:
LCLIntf.StretchBlt(DestCanvas.Handle, GlassLeft + 4, GlassTop + 4,
GlassWidth - 8, GlassHeight - 8,
bmpDisplay.Canvas.Handle, ScreenRect.Left, ScreenRect.Top,
ScreenRect.Right - ScreenRect.Left, ScreenRect.Bottom -
ScreenRect.Top, SRCCOPY);
Works well on Windows, but on Linux I get many gtk error messages, like
this:
[CRITICAL] file gdk-pixbuf-drawable.c: line 1109 (gdk_pixbuf_get_from_drawable):
assertion `dest_x == 0 && dest_y == 0' failed.
WARNING: ScalePixmap ScaleSRC=nil
WARNING: ScaleAndROP ScalePixmap for pixmap failed
WARNING: SrcDevBitmapToDrawable: ScaleAndROP failed
Additional information:
Here is debug information for the project (magnifier):
(gdb) break fpc_raiseexception
Breakpoint 1 at 0x805d8ee
(gdb) run --g-fatal-warnings
Starting program: /home/felipe/Programação/Lente/magnifier --g-fatal-warnings
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xffffe000
Detaching after fork from child process 4656.
Breakpoint 1, 0x0805d8ee in fpc_raiseexception ()
(gdb) bt
#0 0x0805d8ee in fpc_raiseexception ()
#1 (closed) 0x080d0c95 in GLOGFUNC (ALOGDOMAIN=0x0, ALOGLEVEL=10, AMESSAGE=0xbfe8712c, ADATA=0xb7ab2014) at gtkobject.inc:110
#2 (closed) 0xb7f4faaa in g_logv () from /usr/lib/libglib-1.2.so.0
#3 (closed) 0xbfe879c0 in ?? ()
#4 (closed) 0xbfe879d0 in ?? ()
#5 (closed) 0xb7f60ea4 in ?? () from /usr/lib/libglib-1.2.so.0
#6 (closed) 0xbfe87128 in ?? ()
#7 (closed) 0xb7f60ca0 in g_thread_use_default_impl () from /usr/lib/libglib-1.2.so.0
#8 (closed) 0xb7f60ea4 in ?? () from /usr/lib/libglib-1.2.so.0
#9 (closed) 0xbfe8712c in ?? ()
#10 (closed) 0xb7f60ca0 in g_thread_use_default_impl () from /usr/lib/libglib-1.2.so.0
#11 (closed) 0x00000001 in ?? ()
#12 (closed) 0x00000003 in ?? ()
#13 (closed) 0x00000008 in ?? ()
#14 (closed) 0xb7ab2014 in ?? ()
#15 (closed) 0x656c6966 in ?? ()
#16 (closed) 0x6b646720 in ?? ()
#17 (closed) 0x7869702d in ?? ()
#18 (closed) 0x2d667562 in ?? ()
#19 (closed) 0x77617264 in ?? ()
#20 (closed) 0x656c6261 in ?? ()
#21 (closed) 0x203a632e in ?? ()
#22 (closed) 0x656e696c in ?? ()
#23 (closed) 0x30313120 in ?? ()
#24 (closed) 0x67282039 in ?? ()
#25 (closed) 0x705f6b64 in ?? ()
#26 (closed) 0x75627869 in ?? ()
#27 (closed) 0x65675f66 in ?? ()
#28 (closed) 0x72665f74 in ?? ()
#29 (closed) 0x645f6d6f in ?? ()
#30 (closed) 0x61776172 in ?? ()
#31 (closed) 0x29656c62 in ?? ()
#32 (closed) 0x7361203a in ?? ()
#33 (closed) 0x74726573 in ?? ()
#34 (closed) 0x206e6f69 in ?? ()
---Type &LtPos;return> to continue, or q &LtPos;return> to quit---
#35 (closed) 0x73656460 in ?? ()
#36 (closed) 0x20785f74 in ?? ()
#37 (closed) 0x30203d3d in ?? ()
#38 (closed) 0x20262620 in ?? ()
#39 (closed) 0x74736564 in ?? ()
#40 (closed) 0x3d20795f in ?? ()
#41 (closed) 0x2730203d in ?? ()
#42 (closed) 0x69616620 in ?? ()
#43 (closed) 0x2e64656c in ?? ()
#44 (closed) 0x082a7400 in ?? ()
#45 (closed) 0xbfe871d4 in ?? ()
#46 (closed) 0xbfe87aa4 in ?? ()
#47 (closed) 0x0000541b in ?? ()
#48 (closed) 0xb7c2ab69 in ioctl () from /lib/tls/libc.so.6
#49 (closed) 0xb7e880e0 in XUnlockDisplay () from /usr/X11R6/lib/libX11.so.6
Previous frame inner to this frame (corrupt stack?)
(gdb) cont
Continuing.
TApplication.HandleException [FATAL] file gdk-pixbuf-drawable.c: line 1109 (gdk_pixbuf_get_from_drawable): assertion `dest_x == 0 && dest_y == 0' failed.
Stack trace:
$080D0C87 GLOGFUNC, line 110 of gtkobject.inc
$B7F4FAAA WSSPIN_init, line 75 of gtkglobals.pp
Breakpoint 1, 0x0805d8ee in fpc_raiseexception ()
(gdb) bt
#0 0x0805d8ee in fpc_raiseexception ()
#1 (closed) 0x080d0c95 in GLOGFUNC (ALOGDOMAIN=0x0, ALOGLEVEL=11, AMESSAGE=0xbfe86d70, ADATA=0xb7ab2014) at gtkobject.inc:110
#2 (closed) 0xb7f4faaa in g_logv () from /usr/lib/libglib-1.2.so.0
#3 (closed) 0xb7cf4344 in ?? () from /usr/lib/libgtk-1.2.so.0
#4 (closed) 0x00000000 in ?? ()
(gdb) cont
Continuing.
TApplication.HandleException: there was another exception during showing the first exception
[TGtkWidgetSet.Destroy] WARNING: There are 3 unreleased DCs, a detailed dump follows:
[TGtkWidgetSet.Destroy] DCs: B796F5C4 B796F354 B796F014
[TGtkWidgetSet.Destroy] WARNING: There are 12 unreleased GDIObjects, a detailed dump follows:
[TGtkWidgetSet.Destroy] GDIOs: B7AAB194 B7AAB0F4 B7AAB0A4 B7AAB054 B7AAB004 B7AAABF4 B7AAAC44
[TGtkWidgetSet.Destroy] gdiBitmap: 3
[TGtkWidgetSet.Destroy] gdiBrush: 3
[TGtkWidgetSet.Destroy] gdiFont: 3
[TGtkWidgetSet.Destroy] gdiPen: 3
Program exited normally.
(gdb) bt
No stack.
(gdb)
Mantis conversion info:
- Mantis ID: 1535
- OS: Mandrake Linux and Windows XP
- OS Build: 10.2 and 5.1
- Platform: x86 intel
- Version: 0.9.11 (SVN)
- Target version: 1.0.0
- LazTarget: 1.0