Hello everyone. We got some specialized debugging information back from Carolyn regarding this issue. It turns out that the Windows SDK function named ::OpenClipboard() is failing. We already have logic in the code to retry once, and the recommendations from MS forums, among other things to try, is to retry the ::OpoenClipboard() call multiple times separated by 50 millisecond sleep intervals. Also to use an HWND instead of NULL as a parameter to the above call, and finally to add a call to ::PeekMessage() before attempting to open the clipboard.
We will be adding the above code changes to a test DLL that we will send to Carolyn, and which other users can also try if they would like. If you are experiencing the clipboard issue and would like to work with us on addressing it, please message me privately with your email address and we can take it from there.
This appears to be a rather long-standing problem on Windows. The links below show some of the manifestations of this problem, along with a few suggested work-arounds:
Here are some of the AI-suggested work-arounds that may or may not help those who are seeing this problem:
Original Message:
Sent: Thu August 28, 2025 03:59 AM
From: Frank Furter
Subject: New (?) Copy & Paste issue
... yes, I can completely confirm the observation of @Ki Park. In Version 31, I haven't had any more issues copying and pasting from 'other' software into an SPSS syntax window, which could drive you crazy in Versions 29 (I skipped 30) and before. The Copy&Paste 'ghost' is, however, still around and now haunts operations inside SPSS ...
------------------------------
Frank Furter
Original Message:
Sent: Wed August 27, 2025 09:24 AM
From: Ki Park
Subject: New (?) Copy & Paste issue
Just to comment on how to go around when repeated copy and paste does not work: Save the syntax file (Ctrl+s) and it seems to reset the function and should work.
To be fair, I have not seen yet an issue of copy+paste from other softwares such as excel, notetab, etc. in this version (SPSS 31 with Win11). It used to be my major issue with SPSS30.
Thanks.
Ki
------------------------------
Ki Park
Original Message:
Sent: Wed August 27, 2025 08:53 AM
From: Curtis Browning
Subject: New (?) Copy & Paste issue
Hello all, yes we are still working on this issue. As noted in the other thread(s) on this topic, there are 3rd-party Windows issues which we have been thus far unable to completely stamp out. We thought it was Java at first, but in version 31 we circumvented Java and used C++ to go direct to the Windows operating system for clipboard operations on that platform, after which our QA dept could no longer reproduce the issue, but clearly some people are still seeing the problem.
We now are working with @Carolyn Stapleton on this. We have provided her with a custom jar file that dumps log information and are waiting to hear back from her with the logs. If anyone else is willing to work with us on this we will gladly do so.
Best,
------------------------------
Curtis Browning
SPSS Statistics Architect
Original Message:
Sent: Tue August 26, 2025 10:57 AM
From: Frank Furter
Subject: New (?) Copy & Paste issue
Any reaction from SPSS?
------------------------------
Frank Furter
Original Message:
Sent: Sat July 19, 2025 09:25 AM
From: Frank Furter
Subject: New (?) Copy & Paste issue
In SPSS 31.0.0.0 (117) running on MS Windows 10 Pro 64-bit, I am frequently encountering a Copy & Paste issue that at least I have never had in previous versions of SPSS (up to version 29 - I skipped version 30):
When copying and pasting text within the same syntax editor window or between different syntax editor windows (I haven't tried with other windows inside SPSS yet), I frequently get the error message 'Unable to paste from the system clipboard. Please try again).' When I then copy and paste the same piece of text again, it usually works.
Even though the following is off topic in this thread, I would like to mention that the well-known bug which interferes with pasting from other applications into SPSS windows and which is discussed in various other threads (e.g., here) has not appeared any more since switching to SPSS 31.
------------------------------
Frank Furter
------------------------------