GTK clipboard fails after 3+ hours from wxGTK app



I'm trying to sort out why the clipboard copy/paste functionality of my wxGTK
(wxWidgets on top of GTK) app fails on Debian/Ubuntu after a few hours of
use.

The app (through wxGTK) relies on gtk clipboard API: gtk_selection_data_set,
gtk_selection_data_set_text, gtk_selection_owner_set,
gtk_selection_add_target and gtk_selection_convert. 

It handles these GTK signals: "selection_received", "selection_clear_event"
and "selection_get". 

The symptoms are as follows:
- On app startup, copying in my app and pasting in an X-Term window works
fine (X-Term requests UTF8 text format). The text is copied from "clipboard"
(not "primary selection).
- After some hours of use, copying text from our app to X-Term stops
working. Looking at what goes on in a debugger reveals:
-- The X-Term window is no longer requesting UTF8 plain text. Instead it
seems to ask for a filename.
-- Our app have not registered a filename as available in the clipboard, so
pasting fails.
-- I've checked in the debugger that our app goes through the identical
clipboard format registration loop at this time (compared to when the
program started). It does offer UTF8 plain text.

Now I wonder what goes wrong at this point:
- Is there some resource allocation failure (exhausting some pool of
memory)?
- It seems that registering UTF8 text for the text simply fails in some way
after N+ hours of use.
- What else could go wrong after having run the app for this time?

Copying the other way around works fine (external app to ours).

It seems to me wxGTK is using the clipboard in a slightly wrong way and this
shows up when running the app for long time.

Any help/hints at GTK level appreciated.

Regards
Arne Steinarson
-- 
View this message in context: http://www.nabble.com/GTK-clipboard-fails-after-3%2B-hours-from-wxGTK-app-tp23508674p23508674.html
Sent from the Gtk+ - Dev - General mailing list archive at Nabble.com.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]