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):
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.
Hi, I've just discovered this bugreport :-(
Feel free to cc me for any gambas3 issues next time ;-)
could you provide a simple gambas3 project to test this issue, please?
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.
Here 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)
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...
The last update fixes this bug.
Thank you for reporting.
Marking this bug report as resolved fixed.