Bug 7522 - Bug in gb.gtk component corrupts Image copied to clipboard
Summary: Bug in gb.gtk component corrupts Image copied to clipboard
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Matteo Pasotti
QA Contact:
URL: http://sourceforge.net/mailarchive/me...
Depends on:
Blocks: 10681
  Show dependency treegraph
Reported: 2012-09-18 23:15 CEST by Richard Walker
Modified: 2013-07-20 12:45 CEST (History)
1 user (show)

See Also:
Source RPM: gambas3-3.1.1-1.1mga2.src
Status comment:


Description Richard Walker 2012-09-18 23:15:39 CEST
Description of problem:
The URL referenced above ends up identifying and discussing this bug. The Gambas author (Benoît Minisini) has fixed it for the development branch of Gambas and I have produced a patch for gambas3-3.1.1-1.1mga2 which fixes the problem for me.

The problem is that when using the gb.gtk toolkit, the default Gambas toolkit for all desktops except KDE and Trinity, any attempt to copy an image from the gambas internal Image object to the clipboard produces a corrupt image which is obvious when pasted into, for example, a wordprocessor document. The problem does not exist in the gb.qt4 toolkit implementation of the copy to clipboard routine.

Version-Release number of selected component (if applicable):


How reproducible:
Any gambas project which uses the clipboard to export an Image, and which uses the gb.gtk toolkit will exhibit this problem. A test small test project (32.6k tar.gz) is available from me with the gb.gtk component selected.

Steps to Reproduce:
1. Run a Gambas program which provides facility to copy an image to the clipboard
2. Ensure it is a Gambas program which uses the gtk toolkit.
3. Using the program, load or create a Gambas Image
4. Execute the Clipboard.Copy(Image) method 
5. Paste the clipboard contents into another program - Gimp, Libreoffice Writer
6. Let corners of mouth droop as you survey the resulting mess.
Comment 1 Matteo Pasotti 2013-06-29 17:53:21 CEST
Hi, I've just discovered this bugreport :-(
Feel free to cc me for any gambas3 issues next time ;-)

CC: (none) => matteo.pasotti

Matteo Pasotti 2013-06-29 23:32:21 CEST

Assignee: bugsquad => matteo.pasotti

Comment 2 Matteo Pasotti 2013-06-30 11:47:49 CEST
Hello Richard,
could you provide a simple gambas3 project to test this issue, please?
Comment 3 Richard Walker 2013-06-30 16:22:27 CEST
Matteo, had a first stab at getting the original "toy" program to run on MGA3. It won't compile. Seems there have been changes to some composite widgets, fontchooser for one, which make my internal fiddling with elements of such widgets invalid.

I will investigate my two MGA2 installations and try to find the orginally referenced test program....sadly busy with work at the moment, but I will start searching Monday evening.

Comment 4 Matteo Pasotti 2013-07-02 22:33:41 CEST
Here[1] you can find a gambas3 project to verify this bug.

- extract the project from the compressed tarball archive
- open gambas3 and choose the project you just decompressed
- launch (F5)
- File -> Open (look for the image inside the project directory)
- After the image is properly shown, File -> TESTCLIPBOARDBUG
- Open Gimp and try to create a new image using the clipboard data
- Look at the application segfault (signal 11)

[1] http://www.mageiaonline.it/sites/default/files/ClipboardImageTest-3.1.tar.bz2
Matteo Pasotti 2013-07-02 23:02:06 CEST

Blocks: (none) => 10681

Comment 5 Richard Walker 2013-07-03 00:51:58 CEST
Matteo, you beat me to it. Still I have enough time to check it out. I ran it under qt4 and gtk toolkits and both seem to work fine for me on MGA3 running the distribution's own Gambas 3.4

I am even more intrigued now as there is absolutely nothing familiar about the test prog, nor do I have much more than the vaguest recollection of what the original issue was. I sort of remember getting the distorted images and I can remember spending a lot of time on it (which I suppose means an hour or two - like the fisherman's tale about the one that got away - it gets bigger every time you tell the story:~)

I WILL get to it but there is a panic at work about missing a deadline it take a day or two more...

Comment 6 Matteo Pasotti 2013-07-20 12:45:57 CEST
The last update fixes this bug.
Thank you for reporting.
Marking this bug report as resolved fixed.

Resolution: (none) => FIXED

Note You need to log in before you can comment on or make changes to this bug.