CodeSnip v4.0 RC-1: Nasty Duplicate Display Name Bug + Fix
Well, this is embarrassing.
Only a few days after CodeSnip 4 RC 1 became available I've discovered a nasty bug that causes the user interface to crash if more than one snippet has the same display name. The bug also applies to Beta 1 and Beta 2.
It's really nasty for two reasons:
- Its easy to trigger the bug. All you have to do is to accept an edit where you have created a display name that duplicates an existing one. Once you've pressed OK its too late. Worse, if you duplicate a snippet CodeSnip automatically duplicates the display name if the snippet has one. Once again pressing OK is all that's needed.
- Because the bug is reported as a fatal error, CodeSnip helpfully tries to save the database before terminating. In the case of this bug it usually succeeds, which means the duplicate display name is saved in the database. When CodeSnip is restarted it instantly crashes again because its UI can't display the duplicate display names.
Even if you've already been bitten by the bug all is not lost. Just download and install the fixed version (or any later release) and simply run it. It will be able to load the database, with the duplicate display names, and you hopefully won't have lost any data.
You'd be well advised to backup the database before carrying on (Database > Backup User Database menu option). But you do that anyway don't you!!
Really sorry about this one folks!
The linked download also incorporates another major bug fix.