Copy to clipboard does not work

Bug #682310 reported by ToMe
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GeoGebra
New
Undecided
Unassigned
geogebra (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In application "GeoGebra" (package "geogebra 3.2.44.0+dfsg1-1" , maverick 64 bit), the "copy to clipboard" function does not work.
When trying to paste the clipboard entry in OpenOffice (3.2.1), nothing happens.
When trying to paste the clipboard entry in GIMP (2.6.10), GIMP reports an error (no valid data in clipboard).

It's not clear to me, which application is responsible for this problem (jre or geogebra).

It would be great if someone could confirm this issue...
Thanks.

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Hi ToMe,

I am on the actual developer version of Ubuntu12.10 and have jsut tried to recreate the issue.

I am new to geogebra. Can you give me a step by step description. Becasue in the actual geogebra version I have no clipboard, just an export function.

greetings melchiaros

Changed in sun-java6 (Ubuntu):
status: New → Incomplete
Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Forget it I have found.

It is in edit -> copy to clipboard.

And yes this issue is still there in Ubuntu12.10.

Thank you for reporting so far.

Changed in sun-java6 (Ubuntu):
status: Incomplete → New
affects: sun-java6 (Ubuntu) → geogebra (Ubuntu)
tags: added: quantal
Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Hi Giovanni,

here is a old report about geogebra which is still actual in Ubuntu12.10 Quantal with geogebra 4.0.34.0+dfsg1-1 on 64bit.

The problem is that geogebra provide a clipboard function which is not working in Ubuntu. (edit -> copy to clipboard).

An afterward paste in LibreOffice Writer 3.6.0rc2 is not possible(right mouse and ctrl +v tested).

The original reporter has also tested an copy in GIMP2.6.10, which is also not working. A retest of mine with GIMP2.8.0 on Ubuntu12.10has shown that a paste in GIMP is now possible.

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

So, clipboard is working partially for geogebra.

Changed in geogebra (Ubuntu):
status: New → Confirmed
Revision history for this message
Giovanni Mascellani (giomasce) wrote :

Hi.

I can more or less confirm your issues in Debian sid: what I can observe is the following.

 * Copying the view as an image works with GIMP, but not with LibreOffice, as you say.

 * But copying a text works with LibreOffice: for example, go to the "Export as synamic worksheet (HTML)" (or whatever is called in English) and export the worksheet to HTML in the clipboard. Then copying to LibreOffice works.

These facts lead me to thinking that for some reason LibreOffice doesn't understand the image format exported by GeoGebra in the clipboard. I doubt this depends on GeoGebra, it seems more likely that it's LibreOffice's or Java's fault, but I don't know how these things work. I'll try to replicate it independently of GeoGebra.

Giovanni.

Revision history for this message
Giovanni Mascellani (giomasce) wrote :

Here you are a few new discoveries.

With the xclip program you can obtain the content of the clipboard. You use it this way:

 * To know which content types are available in the clipboard: xclip -selection c -o -t TARGETS

 * To actually get the content for a given content type: replace "TARGETS" with the content type

If I copy the GeoGebra view in the clipboard I have:

$ xclip -selection c -o -t TARGETS
image/jpeg
image/png
image/x-png
image/x-raw
image/x-portable-pixmap
image/x-gif
image/gif
PNG
JFIF
$ xclip -selection c -o -t image/png | file -
/dev/stdin: PNG image data, 1168 x 898, 8-bit/color RGBA, non-interlaced

Then, pasting in LibreOffice doesn't work, but in GIMP does. Then I paste in GIMP and copy again from GIMP, getting:

$ xclip -selection c -o -t TARGETS
TIMESTAMP
TARGETS
MULTIPLE
SAVE_TARGETS
image/png
image/x-icon
image/x-ico
image/x-win-bitmap
image/bmp
image/x-bmp
image/x-MS-bmp
image/tiff
image/jpeg

Than pasting in LibreOffice works. I don't know whether the TARGETS difference is significat or the problem is another. Anyway, I'm quite sure it isn't GeoGebra's fault. ASAP I'll write a program to prove this.

Gio.

Revision history for this message
Giovanni Mascellani (giomasce) wrote :

Here you are, the same problem without GeoGebra. Just compile and execute the attached program ClipboardTest.java. While the program is running, try to the same things as before; you should obtain the vary same behaviour. GIMP is able to paste, but LibreOffice is not.

$ javac ClipboardTest.java
$ java ClipboardTest

(hit Ctrl-C to stop the test program)

I don't know whether this is OpenJDK or LibreOffice's fault, so I'm not sure how to handle this bug ticket.

BTW, for reference:

$ javac -version
javac 1.7.0_03
$ java -version
java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1) (7~u3-2.1.1-1)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)

Apparently with OpenJDK 1.6 there is another problem: xclip with TARGETS only decodes a few strange bytes, that mean nothing to me.

Revision history for this message
Giovanni Mascellani (giomasce) wrote :
Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Hi Giovanni,

sorry for the delay, I was not in front of any computer.

-----------------------------------

Wow, what a work.

A thank you for inverstigating on this.

I think a LibreOffice project attach here is the right. There is clear an import problem to Libre Office.

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Hi there libreoffice people,

Giovanni Mascellani has proven that there is a libreoffice problem of importing from clipboard. This proof is independend of the GeoGebra, because Giovann has written a special separeated program, which is able to reproduce the issue.

affects: geogebra → libreoffice (Ubuntu)
Changed in libreoffice (Ubuntu):
status: New → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Giovanni Mascellani, Only for this bug report, could you please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect 682310

no longer affects: geogebra (Ubuntu)
Changed in libreoffice (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Giovanni Mascellani (giomasce) wrote :

I tried to run apport-collect, but it failed with a Python exception; maybe the problem is that I'm running Debian sid and apport is not tested there. Anyway, I can provide you the information you require. BTW, the LibreOffice version I'm running is 1:3.5.4-5.

I'd also like to stress that I'm making no claimsa about whether the problem here in OpenJDK, in LibreOffice or in the copy and paste specifications. The thing to do here, I think, is to run my Java program attached above and checking whether or not it produces valid data in the clipboard. If it does, than the problem is probably LibreOffice's fault. If it doesn't, it is OpenJDK's. But, unfortunately, I'm not confident enough with how the clipboard works to do this check.

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Hi Giovann, this with apport-collect failing is a known bug:

https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1023964

it is missing

python-launchpadlib

please mark there as also affecting you. Or add a debian distribution hint.

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Hi Christopher,

I have leaved this request to Giovanni out, because it is not needed here. There is no classic reproducing for it and Giovanni has provided information that are far beside the common workflows for bughandling. So, it makes no sense here to stay on the normal triaging.

Because I am not familiar with any of the affected Ubuntu parts, I have attached libre office here to get someone on for investigation.
Could you please run Giovannies program and figure out if it is really libre office and give a comment of what you think.

The exact version is also not needed: The issue starts with 3.2.x, goes over 3.5.x by Giovanny to 3.6.0rc2 by me on quantal. So inductiv it is in all version since 3.2.x

I could also not provide the information, because of

https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1030350

Changed in libreoffice (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Giovanni Mascellani (giomasce) wrote :

Hi melchiaros.

python-launchpadlib is installed here. The apport-collect bug I hit is probably a different one.

Giovanni.

Revision history for this message
penalvch (penalvch) wrote :

As per Bug Description, this problem is how GeoGebra is unable to copy to clipboard to any program, not just LibreOffice. Moving back to GeoGebra.

affects: libreoffice (Ubuntu) → geogebra (Ubuntu)
Changed in geogebra (Ubuntu):
status: Confirmed → New
Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Christopher,

I am a bit unhappy about your handling.

When you read the comments follwing you can see that we are steps further than this.

We have figured out that GeoGebra is able to copy to clipboard.

-------------------------------
[Offtopic]
I do not want to play the game of moving the report arround. When you do not have the time, say it and let other do it here.

This report is not to handle as isufficient as you have just done it.

Please read first. That is surely what you also expect from others.

Not every report follows a straight form of description as you like it(seen in other reports). And it is also not needed.

[Offtopic]

-------------------------------

affects: geogebra (Ubuntu) → libreoffice (Ubuntu)
Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Set to confirmed, because two indepentend users have hitten this.

Changed in libreoffice (Ubuntu):
status: New → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

melchiaros, this report is not about what other people in the Comments reported about. It is _only_ about what the Original Reporter, ToMe, reported in the Bug Description:
>In application "GeoGebra" (package "geogebra 3.2.44.0+dfsg1-1" , maverick 64 bit), the "copy to clipboard" function does not work.
When trying to paste the clipboard entry in OpenOffice (3.2.1), nothing happens.
When trying to paste the clipboard entry in GIMP (2.6.10), GIMP reports an error (no valid data in clipboard).

It is disrepsectful to the original reporter to hijack the report with a similar, but distinctly different problem. For more on this, please see the Ubuntu Bug Control and Ubuntu Bug Squad article:
https://wiki.ubuntu.com/Bugs/BestPractices#X.2BAC8-Reporting.Focus_on_One_Issue

and Ubuntu Community article:
please see https://help.ubuntu.com/community/ReportingBugs#Bug_Reporting_Etiquette .

If you, or whomever else has a different bug then reported by ToMe, please feel free to file a new report so it may be addressed.

If you have any further questions about this, please E-Mail me directly and we can take it from there.

Moving back to geogebra.

Thank you for your understanding.

affects: libreoffice (Ubuntu) → geogebra (Ubuntu)
Changed in geogebra (Ubuntu):
status: Confirmed → New
Revision history for this message
Giovanni Mascellani (giomasce) wrote :

Should my humble opinion count anything, I think that (at the moment) the proper package for assigning this bug is openjdk-6-jre. The problem is clearly broader than GeoGebra, since GeoGebra just relies in OpenJDK libraries to do copy and paste. Probably someone from OpenJDK and who is confident with how copy and paste works should help here.

Anyway, I'm not moving the report, since I'm not using Ubuntu and I cannot say anything for it.

Changed in geogebra (Ubuntu):
status: New → Confirmed
Revision history for this message
Peter K Nicol (pknicol) wrote :

Using Ubuntu 12.04. Instead of copying to the clipboard, use Edit, copy as picture, save (to desktop for instance) then copy that file and paste into LibreOffice.
BTW this bug has been present for a few years in Ubuntu and I have always had to use the workaround suggested.
The same copy to clipboard in Geogebra and paste into LibreOffice works faultlessly in MS Windows.

tags: added: precise
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.