davidsansome / gtk-qt-engine

Automatically exported from code.google.com/p/gtk-qt-engine
7 stars 4 forks source link

Too much debugging output. #58

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
(Issue imported from Trac - prlewis@letterboxes.org)

Hi, 

I'm running into a problem with the (wxwidgets based) wxt terminal in 
gnuplot. The terminal's working fine, except that it's chucking this out 
every time I type (re)plot: 
gnuplot> plot 'test'
gnuplot> QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPainter::begin: Cannot paint on a null pixmap
QPainter::end: Painter not active, aborted

(<unknown>:15342): Gdk-CRITICAL **: gdk_pixmap_foreign_new_for_display: 
assertion `(anid != 0)' failed

(<unknown>:15342): Gdk-CRITICAL **: gdk_draw_drawable: assertion `src != 
NULL' failed

(<unknown>:15342): GLib-GObject-CRITICAL **: g_object_unref: assertion 
`G_IS_OBJECT (object)' failed
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPainter::begin: Cannot paint on a null pixmap
QPainter::end: Painter not active, aborted

(<unknown>:15342): Gdk-CRITICAL **: gdk_pixmap_foreign_new_for_display: 
assertion `(anid != 0)' failed

(<unknown>:15342): Gdk-CRITICAL **: gdk_draw_drawable: assertion `src != 
NULL' failed

(<unknown>:15342): GLib-GObject-CRITICAL **: g_object_unref: assertion 
`G_IS_OBJECT (object)' failed

gnuplot>

Needless to say that this tends to interrupt my work in gnuplot. 

Seems like some of these errors / warnings are from GTK and some from Qt. 
The window displays fine though. 

It would be nice if this could either be fixed or suppressed. Thanks!

Original issue reported on code.google.com by davidsansome on 1 Apr 2009 at 2:15

GoogleCodeExporter commented 9 years ago
Hello,

I have a similar problem with the viewer2D class of the LTI-Lib-2 (an image 
processing library
in C++, which uses GTK2 for visualization).  I tried to track down the problem 
and it seems
the Qt4 style (GTK-Qt-Engine?) cannot cope with the main event loop of GTK 
running in a
secondary thread, as  gnuplot or the viewers of the LTI-Lib do.  Since in both 
applications the
main event loop is _not_ running within the main application thread, it seems 
whatever the
style does to catch gtk calls and map them to Qt4 ones misses the fact that 
they are in the
wrong thread.

I hope this can be fixed soon, since this engine is default in Kubuntu with 
KDE4, and it
produced tons of error messages.

By the way, the Qt4 style produces those errors, but the QtCurve style doesn't.

Kind regards,

Original comment by palvarad...@gmail.com on 4 Jul 2009 at 4:55