[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  OpenClipboard() fails
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

OpenClipboard() fails

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Wed 02 Sep 2009 10:41 PM (UTC)
Message
A friend of mine is using version 4.40. I am aware a lot of changes were made to clipboards since, but since my own digging in the source (and googling) reveals it might be a deeper issue, I'm posting none the less.

Basically, only one out of five OpenClipboard() attempts works or so. All others give the 'Cannot open the clipboard' error that is thrown at a few places (doc.cpp and methods.cpp). I'm personally lost, since it seems to be a MFC library call and google is full with messages about OpenClipboard() failing in applications as well.

He had the following stuff opened, in case it is something to do with other Applications: firefox, thunderbird, visual web developer 2008 express, dreamweaver CS4, YIM, SQL Management Studio Basic, Notepad, OO.o Calc

My own notice is that none of those are MS Office applications, which are apparently known for hogging the clipboard.

This error is especially annoying since it seems MUSHclient is copying at every character selected, meaning he can barely select a URL. Assuming you can't track down the error either - can MUSHclient be adjusted to only copy to the clipboard when the selection is completed (mousebuttonup msg)?
[Go to top] top

Posted by Nick Gammon   Australia  (21,324 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Thu 03 Sep 2009 07:02 AM (UTC)
Message
Just turn off the "copy selection to clipboard" option. I don't think that is very useful these days, now that the Ctrl+C problem is fixed.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #2 on Thu 03 Sep 2009 03:37 PM (UTC)
Message
That ignores the fact that some people actually prefer that behaviour over manually needing to hit the Ctrl+C combination. :)
[Go to top] top

Posted by Nick Gammon   Australia  (21,324 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Thu 03 Sep 2009 09:14 PM (UTC)
Message
I think that programmatically (ie. without user intervention) copying data to the clipboard hundreds of times, as you move the mouse over text, may possibly exceed the design limits for clipboard management. I note that a possible reason for the OpenClipboard failing is that the clipboard may be in use, or already open.

Perhaps one of the other programs he is running has some sort of auto-clipboard conversion running, and when it detects the clipboard has changed (somehow) opens it, converts it to an internal format, and then closes it. The time taken to do this would be finite, but normally well within the rate at which a normal human could be copying to the clipboard. However a programmatic high-speed series of copies may exceed its capabilities.

Your friend could try using the auto clipboard function with no other program running (eg. after rebooting) and then gradually adding the others back in, testing each time. That might show the culprit (if there is an obvious culprit).

Then it might be a case of not running (say) Dreamweaver at the same time as MUSHclient, or doing what I suggested, and manually copying to the clipboard.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


5,001 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]