Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi-BCB/IDE/Menus    [ Add a report in this area ]  
Report #:  124919   Status: Closed
Action event handlers for the File|Open and File|Exit menu handlers are swapped
Project:  Delphi Build #:  20.0.15596.9843
Version:    20.0 Submitted By:   Svend Meyland Nicolaisen
Report Type:  Basic functionality failure Date Reported:  5/20/2014 2:19:05 AM
Severity:    Infrequently encountered problem Last Updated: 12/11/2014 4:50:25 AM
Platform:    All versions Internal Tracking #:   51248
Resolution: As Designed (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (3 Total Ratings)
5.00 out of 5
Total Votes: 35
After the IDE has been running for some seconds the OnExecute event handlers for the File|Open and File|Exit actions are swapped.

I have tried to track down the problem by writing an plug-in for the IDE that hooks into the OnChange event handler for the File|Open action. But I haven't found the root cause.

1) After approximately 30 seconds the OnExecute event handler for the action associated with the File|Open menu item is replaced with a event handler that quits the IDE. Correctly prompting for save if any files have been changed. Apparently the event handlers for the File|Open and File|Exit event handlers are swapped.
2) The stack trace for the change of the event handler shows that the origin is TPlatFormWin.ThreadSync -> CheckSynchronize. It seems like some thread is causing the problem.
3) It is a anonymous method that is called by CheckSynchronize. The anonymous method is apparently located in the BDE.exe and not in a plug-in or package.

I am running Windows Vista 64 bit and have not installed any third part packages other than those that are part of the official installer from Embarcadero.

For me it seems like some kind for weird IDE bug.
Steps to Reproduce:
This problem might be related to the environment, so i might be hard to reproduce. I haven't tried XE6 on another PC.

If your system is affected then just start the IDE and wait 30 to 60 seconds.
1) Use the File|Open menu item to open files.
2) Write and IDE plug-in that enforces that the OnExecute handler don't change.

Svend Meyland Nicolaisen at 5/20/2014 7:05:12 AM -
Others are having the same problem:

Dalija Prasnikar at 5/20/2014 12:42:08 PM -
This issue has some similarities with

IDE Save toolbar button does not work

Might be worth checking.

Svend Meyland Nicolaisen at 5/21/2014 6:05:37 AM -
I have now tried to remove all the Borland/CodeGear/Embarcadero DLLs from my SYSWOW64 folder, but it haven't solved the problem.

Which kind of feedback do you need.

Markus Humm at 5/21/2014 11:09:28 AM -

as written in this thread:

somebody could trace the swapping of those two OnExecute handlers down to some anonymous method which gets called from some thread from bds.exe

So what more info is needed? The thing happens for some people on different OS versions and bitnes and not for tothers but for those it happens it does so with plain installations with only stuff installed which gets shipped with Rad Studio.

Would it help if you had remote access to one of the affected computers as folks who are affected report that it happens about 20 sec. after starting the IDE and without doing anything in between?



Svend Meyland Nicolaisen at 5/22/2014 4:09:50 AM -
It has been suggested to me that this behavior is caused by the copy protection that is build into the product. Can this be true? I have been wondering why anybody would write code that swaps the event handlers of two completely unrelated actions. But now that this has been brought to my attention, it might be the only plausible explanation.

I am pretty sure that I have a license for XE6, so of it is copy protection, then it is buggy and making it hard for me to use a product that I am fully licensed to....

Ralf Geschwender at 7/3/2014 3:18:47 AM -
The same here on a W7Ultimate 64Bit PC

Jean-Noel Voirol at 7/21/2014 7:24:25 AM -
Same here on W8.1 64bits

Paul Blackmore at 7/28/2014 10:18:28 PM -
Same issue here: Windows 7 Pro 64 bit

Borja Serrano at 7/31/2014 7:07:10 AM -
Can you please check if you have some DLLs not provided with the product in the "bin" folder? Only files provided by Embarcadero may reside in the bin folder.

Ralf Geschwender at 8/2/2014 8:17:54 AM -
@Borja Serrano
That helped.
I had placed a copy of 'libmariadb.dll' in the 'bin' directory. That makes it easy for the IDE to access the dll during the design process. After removing the dll exit and open buttons work as expected again.

Scott Hochberg at 9/6/2014 11:05:12 AM -
Had the same problem using XE5.  Tracked it to a DLL added by FastMM - this was automatically installed by FastMM in the bin folder. Removing it fixed the problem.  

I will notify the author of FastMM.


Postage Saver Software

Tomohiro Takahashi at 12/11/2014 4:52:09 PM -
Please see this support KB.
[Action event handlers for the File|Open and File|Exit menu handlers are swapped in RAD Studio/Delphi/C++ Builder]
Some customers have reported this strange behavior in the product in the past. It seems always related to have unsigned DLLs in the "bin" folder of the product (for instance, C:\Program Files (x86)\Embarcadero\Studio\14.0\bin in an XE6 default installation).

Only files provided by Embarcadero may reside in the bin folder. Common files which are mistakenly copied to the bin folder are third party components and database drivers (for example sqlite3.dll or libmysql.dll). The easiest way to determine if this might be your problem is to list files by timestamp and look for files created before or after the release of your product.

sylvain busson at 4/26/2016 8:01:21 AM -
I have the same problem with Delphi XE 10 seattle on W7.


sylvain busson at 4/26/2016 8:15:59 AM -
oups ! I had an unsigned DLLs in the "bin" folder !!!
removing the dll has fixed the problem.


Server Response from: ETNACODE01