[1.0.1] crash "cannot open system clipboard" using getClipboard()

Bug #1311031 reported by RaiMan
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
High
RaiMan

Bug Description

Hi,
I am using the following code extensively to copy the contents of clipboard into a variable:

uid = Env.getClipboard().strip()
and
row = int (Env.getClipboard())

In the earlier version of Sikuli, the following error used to occasionally occur:

[error] java.lang.IllegalStateException ( java.lang.IllegalStateException: cannot open system clipboard )
[error] --- Traceback --- error source first line: module ( function ) statement 176: main ( open_Excel ) uid = Env.getClipboard().strip()
[error] --- Traceback --- end --------------

When this error occurs, I used to just re-run the script and the script would run fine.

But now, after upgrading to Sikuli 1.0.1, the frequency of this error has increased and re-running the script is not helping. Could you please let me me know if there is any other efficient way to get this done.

This is my operating environment:
IDE: Sikli 1.0.1
OS: Windows 7 (64-bit)
Java 7 (Earlier I was using Java 6. This error was not frequent then.)

Thanks,
Rafiq

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → In Progress
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
Revision history for this message
N0x1k (kolarik-a) wrote :

Hi RaiMan,

Is there any update to this issue? We are using Ctrl+C a lot in our tests to get data from GUI of our software that is impossible to get out any other way (except for OCR, but we don't like to use that, since it's pretty unreliable) and this issue is happening from time to time forcing us to rerun and wasting a lot of time.

I read somewhere, that this might be caused by some other process owning clipboard, but wasn't able to use that information myself.

Thanks.

Revision history for this message
RaiMan (raimund-hocke) wrote :

@kolarik
If you have any chance, give version 1.1.0 a try in some test environment.
start here: http://sikulix.com

Revision history for this message
Andrew Gr (andrew-gr) wrote :

Hi RaiMan,

is it any update with this issue?

Maybe you could suggest any temporary workarounds to this? I am fine with having separate implementation in Java, just give please any input for the issue.

Having this issues with versions 1.1.1 (and 1.1.2-20170528.124903-28 as well).

Thank you!

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.