Feed on
Posts
Comments

Nathan Weinberg wrote a good article in a blog at Microsoft, about a “fix” for a problem with Adobe Photoshop. You can (and if you use Photoshop, you should) read it here:

How To Fix The Photoshop Clipboard (Sept 5, 2007)

It was an interesting read for me, confirming some things I’ve suspected.  I’ve always assumed that Photoshop keeps its own, separate clipboard for internal copy/paste (just call it a “hunch”, after years of support questions…)  But it seems that you can get into a bind where Photoshop doesn’t update its internal clipboard when the external one changes. The user copies something from somewhere, and pastes it into Photoshop.. and gets something that he copied WITHIN Photoshop, half an hour ago.   Of course, users hate that.

Developers never seem to learn: don’t try to be too cute with the clipboard. When the user wants to paste, go and get the clipboard contents and paste it. Don’t try to monitor the clipboard to see if you like it, or if it has newer data than your internal buffer. If the user wants to paste, just paste from the clipboard. Smoke and mirror tricks will always end badly, when you try to account for anyting and everything that could be happening to the clipboard.

Of course, this is likely due to blind faith in the clipboard notification process.  It probably worked great in the lab though! 

Update:  Thanks to Jeremy, for letting us know about the fix available from Microsoft. 
http://support.microsoft.com/default.aspx/kb/941282

Background: One of our users was having frequent clipboard disconnects. When asked to narrow it down, he found that every time he ran Windows Media Player 11, the clipboard connection dropped.  Upon investigation, it seems that Windows Media Player 11 will distrupt the clipboard connection 100% of the time! 

Tested: Windows Media Player 11.0.5721.5145 on XP

Problem: Running Windows Media Player (WMPlayer) 11 causes dropped clipboard connection

Test: You can demonstrate the same behavior with the regular XP clipboard viewer:

1) Close all programs, including WMPlayer.

2) Run the XP clipboard viewer: Start | Run | Clipbrd.Exe (if not installed, install it with add/remove windows components, in control panel).

3) Copy this line from your web browser, it should show up in the clipboard viewer.
TEST TEST TEST TEST TEST

4) Start Windows Media Player 11

5) Copy THIS LINE from the web browser. It should show up in the clipboard.
ANOTER TEST ANOTHER TEST ANOTHER TEST

If line 5 didn’t show up in the clipboard, but line 3 did, then WMPlayer is clearly interfering with the clipboard connection.

Oh boy, it’s even better. After shutting WMPlayer down, the clipboard notification chain is still busted. They have a SERIOUS problem here.

I suspect that they are registering as a clipboard viewer, but are failing to pass along the WM_DrawClipboard messages to the next viewer.  Full information on how to do this correctly is documented on our clipboard viewer page.

« Newer Posts