views:

39

answers:

1

I have a Delphi exe that is built with packages. The exe processes successfully but in the shutdown, I get errors. I rebuilt the exe and then one of the DLLs that is called by the exe with the MadExcept error logging software. It traces the exception "MouseTrackingTimerList.Count <> 0" into the finalization of the devexpress cxcontrols unit. Nothing in that low level unit has been changed. Any suggestions on what might be causing this error?

+1  A: 

Well, you didn't say what exception it's causing, but one thing I've seen happen with packages is that if your finalization is referencing something from another package, and that package has already been unloaded, then the reference is bad and will give an Access Violation, or sometimes an Invalid Pointer Operation.

Make sure that MouseTrackingTimerList is still available, and make sure that that's actually what it's trying to do. If you're working with global interface references in a unit, it will put in hidden finalization code to clean them up, and if that references something that's part of another package you can get the same problems.

To avoid this, make sure that all global interface references from other packages are set to nil before program finalization begins, and make sure that your finalization sections don't refer to any objects whose code resides in another package that might unload before the current one.

Mason Wheeler