September 14, 2007 - Castalia 5.2 is now available. Starting at $99 in our online store.

Delphi 2005 Editor Assertions

We have received several reports in recent weeks of a particularly nasty bug that has been biting users of Castalia and Delphi 2005. It is generally tied to the usage of code templates or the arrow keys on the keyboard. It is characterized by the unexpected appearance of a dialog box containing the text Assertion failed: amount > 0, file .\ek_flbuf.cpp, line 233.

This is followed by abnormal termination of Delphi 2005, and any unsaved work is lost.

 

The cause of this problem lies deep in the Delphi editor kernel. This bug has surfaced to a few individuals who are not using Castalia, but with Castalia installed, many users are able to consistently (and frustratingly) reproduce it. Fortunately, we have narrowed down the conflicting part of Castalia, and developed a workaround:

  1. Start Delphi 2005
  2. Choose Castalia Options from the Castalia menu
  3. Select the Code Templates options pane
  4. Uncheck Enable Template Prompts
  5. Click OK

 

This will stop Castalia from surfacing these errors, and allow you to go on with your work, and not lose it!

Of course, this is only a workaround. We expect that Borland will have this error fixed in Delphi 2005 Update #2, and will re-evaluate its status when Update #2 is shipped.

Update (March 14, 2005):Delphi 2005 Update #2 has been available for a few days now, and it appears that this bug has indeed been fixed.

For more information on Castalia, please visit http://www.delphi-expert.com/castalia3.