Version: (using KDE 4.3.0) OS: Linux Installed from: Ubuntu Packages Steps to reproduce 1. Select and Copy to clipboard a large image in okular 2. It exports in image/png, image/jpeg and PIXMAP formats. 3. Try to read the contents of the clipboard using gtk_clipboard_wait_for_contents 4. The gtk calls waits for a long time and then returns a NULL while waiting for png content. jpeg content works immediately and returns jpeg content immediately. This can be randomly using ksnapshot tool as well. Although it is very consistent on okular for large images. When copying an image in firefox or openoffice, the same images exported as image/png are read fine. Happens on Kubuntu, FC 11 KDEs and OpenSuse 11 KDEs as well.
You say "1. Select and Copy to clipboard a large image in okular", with that you mean you opened a image file or you opened a pdf or does not matter? How large is "large"? You say "This can be randomly using ksnapshot tool as well." you mean you have the same problem when using ksnapshot? Also, can you provide a program that calls gtk_clipboard_wait_for_contents? You don't expect us to know gtk programming, right?
>How large is "large"? Not too large, say 800 x 600 pixels should be enough to make it wait for long periods. >the same problem when using ksnapshot? Well, ... on ksnapshot it happens on some installations. I installed the same KDE on a few different machines. It happened with ksnapshot on a few machines and it didn't on a few others. With okular it happened on all machines I installed it on. >Also, can you provide a program that calls gtk_clipboard_wait_for_contents? Sorry, about that, would be doing this in a while. Thanks.
Created attachment 37705 [details] Binary of application to reproduce bug.
Created attachment 37706 [details] C source of application to reproduce bu Compile the source using the following gcc -o GtkClipboardBug GtkClipboardBug.c `pkg-config gtk+-2.0 --cflags --libs` To reproduce the bug. 1. Launch the application 2. Right click and select a large image (around 1000 x 800 pixels) in okular and select "save to clipboard". 3 Click on get targets, the output is returned on the terminal. Notice the long times taken to read image/png format and after that the data is not found.
I can not reproduce the problem for image/png but i can for image/pcx for example Anyway this is for sure not an okular problem, all we do is QClipboard *cb = QApplication::clipboard(); cb->setPixmap( copyPix, QClipboard::Clipboard ); and Qt handles the rest of the clipboard interaction so you want to file a bug against Qt/Nokia about it, sorry i can not help more.