Copy2Contact crash on capture issue fixed

A number of users have submitted crash reports indicating that Copy2Contact crashed when they tried to use it. How frustrating! A couple people even commented that they were no longer going to try to use Copy2Contact due to the problem. Losing a customer or potential customer always stings.

We look at all crash reports very carefully and take them seriously. The report contains a lot of information about what’s going on inside the program at the time of the crash, and the comments that people submit can be quite helpful as well. Sometimes, though rarely, we can reproduce the problem here and can put our powerful debugging tools to work to solve the issue.

Unfortunately, finding the source of the issue can still be very difficult, as most times the actual crash occurred inside another dynamic library loaded by Windows to support the program. Over the years we’ve solved many issues submitted to us via crash reports, and a good percentage of them are bugs in other vendors’ (usually Microsoft) libraries.

The crash on capture issue that people were reporting was a tough one to find, but with the dedicated help of a couple of users who had the problem consistently, we were able to crack it!

Where to get a patched version of Copy2Contact: If you’ve seen this problem, update now to the latest version. Both v2 and v3 have the fix, but v3 is a paid upgrade for most users. See upgrade details (and discounts) here.

What’s behind this issue: This was an odd one, though in truth, they always are. If you’re technically curious, here’s what was happening:

Copy2Contact calls the Windows API function IsClipboardFormatAvailable() to find out if there’s data ready for it. When Windows says yes, Copy2Contact would go ahead and retrieve the data using the GetClipboardData() function.

However, on some users’ computers, there was no data to retrieve, and¬†GetClipboardData() was returning NULL. Given that IsClipboardFormatAvailable() returned TRUE, this was not expected, and caused a crash.

What’s odd is that in those cases, html data was also on the clipboard, and the updated Copy2Contact now checks for¬†GetClipboardData() to return NULL and uses the html data instead.

Always checking for a NULL pointer is good practice, no matter what the documentation says!