Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with GtkProgressBar in parallel (openmp) applications. #76

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

In a program with parallel processing using openmp, if a GtkProgressBar is 
updated, when using gtk-qt-engine, the progress bar rendering is corrupted and 
the following errors are repeatedly generated:

(th_run:2015): Gdk-CRITICAL **: gdk_pixmap_foreign_new_for_display: assertion 
`(anid != 0)' failed

(th_run:2015): Gdk-CRITICAL **: gdk_draw_drawable: assertion `GDK_IS_DRAWABLE 
(src)' failed

(th_run:2015): 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
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted

(I'm not sure whether the Qt errors really come after or before the Gdk errors)

N.B. The progress bar updates are wrapped in an openmp "CRITICAL" directive 
which prevents multiple threads attempting to update the GUI simultaneously -- 
but it is not possible to wrap them in a MASTER directive as the information 
needed to update any one progress bar is only accessible to its own thread.

Which Qt style are you using?
I'm using Oxygen widgets with Keramic window decorations and Air theme, on 
Debian Stable (Gtk+ 2.20, Qt 4.6.3, gtk-qt-engine 1.1+svn5-4+b1).

The problem does not occur if a native Gtk+ theme is selected.

A correspondent on the Gtk-apps-devel list suggested that replacing QPixmap 
with QImage might be the solution.

Original issue reported on code.google.com by [email protected] on 21 Feb 2012 at 9:22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant