I face a very annoying bug in D2007 IDE :
It’s the second time I have this problem within one month (on two differents computers, but with the same project), and it is a very annoying bug that causes the IDE to close itself without allowing me to save any changes in the code.
I tried but cannot reproduce the bug, it only appears randomly.
Here’s what happen exactly :
i’m changing a line of code then (when I press “enter” to go next line)
the message
“Assertion failed: amount >= dest – startDest, file ek_flbuf.cpp, line 315” appears.
and when I press OK an second message “Abnormal program termination” appears.
Closing this message cause the IDE to quit.
When googling at my problem i found QC 33917 but the status is Closed : Cannot Reproduce
My questions are :
- Is there any known workaround to this problem ?
- can this problem be caused by third party stuff ? (I’m using GExperts and Delphi SpeedUp)
- Does anyone here encountered the problem on a more recent IDE ?
UPDATE :
I remembered the problem occurs the first time (a month ago) within the same Unit.
so maybe the problem is not only project related but unit related.
I’ve restarted Delphi and returned in the same function where the problem appears today, trying to reproduce the bug only typing some code then deleting it, again and again, like a mad…
just restarting delphi and editing code in the unit (no other actions before), I managed to reproduce the problem a second time today ! but no more, despite many new similar tentatives… 🙁
…still investigating. (and thank you for the answers, I will now stop trying to reproduce the bug and check the answerers hints.)
When I used 2007 and saw this, it only happened on very long units (10,000+ lines – having that many is an issue for another discussion :p) Usually the IDE would be fine, then typing would become fairly slow – I could see the letters I typed lagging behind in the code editor. Unless I paused and let the editor catch up, I’d get that error.
So, my fix was:
This is really annoying, but worked for me.
I also turned off many of the Code Insight features, but I don’t know if they affected this particular issue or not. They did help general editing speed. Turning them off was recommended to me in the then-Codegear forums. I can’t remember who by, but I have a vague feeling it may even have been one of the Codegear QA staff who was aware of the bug but was trying to see if I could narrow down what affected or caused it. This was a couple of years ago now though, so don’t take that as gospel.
Splitting your files into smaller, say <5000 line units may also help. For me it only happened on large and complex files.
The issue seems to have been fixed in RAD Studio 2010. Another way to avoid the error would be to upgrade 🙂 If you do, wait a few days or talk to their salespeople first. The next version, RAD Studio XE, is due out at any moment. I’d recommend upgrading anyway: you’ll need to handle Unicode issues, but other than that the 2010 edition is the best version I’ve used, including its stability, and I’ve used Delphi since version 1.