I'm using Delphi 2009. My program has been compiling and running fine. I use Action lists and have them built into my program - although I haven't changed them in a while.
So today I go to simply add a new action to my ActionList in the normal manner that it is done. Without doing anything else, I now build and run my program and I get the following error:
[DCC Fatal Error] Userface.pas(1): F2092 Program or unit 'Userface' recursively uses itself.
I have done nothing to change any of the uses clauses. I can't find any instances of my Userface unit calling itself or calling another unit that calls Userface. I place potentially recursive calls in the Implementation section as they should be.
If I exit Delphi without saving, rebuild and run it, it runs fine. If I attempt again to add a new action to the action list, the fatal error happens again.
I'm at a loss to figure out what is happening. I would appreciate any help to figure out how to get around this.
Edit: After Uwe's answer, I double checked to make sure it was still happening. Sure enough, I did it again as I described in my comment to Uwe. After building, it happened again.
... But then, by accident under the Project Menu I missed picking "Build" and selected "Compile" instead. It compiled fine. Then I tried building and now the build works correctly. No Fatal Error! Everything seems fine for me again.
If I try to add another action and then build, the error comes up again. But if I compile, then I can build it successfully - so at least I have a workaround.
This must be some sort of a glitch. I don't know what happened. Does anybody know what this is or why it might be happening?
Followup. As Marjan states, it can occur in other circumstances, and one of those happened to me. So it is probably NOT directly related to the adding an action, which my question asks.
None-the-less, it is a relatively rare happening so far for me and has only turned into a minor annoyance. It may already have been fixed in Delphi 2010, and my ultimate solution will be when I next upgrade to Delphi 2011 or 12 once they add either 64-bit or multi-platform.