Occasional Exception when Closing Word

Add-in Express™ Support Service
That's what is more important than anything else

Occasional Exception when Closing Word
 
Mark Stevens




Posts: 41
Joined: 2014-09-15
I'm using Delphi 10.1 with an ADX add-in.
Ever since I started using an embedded Excel object I started getting occasional exceptions (maybe 1 in 20) when closing Word (see below).
I assume it's some sort of timing issue - maybe I'm doing something wrong. Could you give me any pointers?
Thanks

main thread ($2d4):
0612a175 +00d ICCWordAddIn.dll System.Generics.Collections  2137  +1 TListHelper.DoIndexOfFwd8
0612a58a +006 ICCWordAddIn.dll System.Generics.Collections  2285  +1 TListHelper.DoRemoveFwd8
065958f6 +01a ICCWordAddIn.dll cxGeometry                            {System.Generics.Collections}TList<cxGeometry.TdxScaleFactorNotifyEvent>.Remove
06594e8d +019 ICCWordAddIn.dll cxGeometry                            TdxScaleFactor.ListenerRemove
06594fdb +01b ICCWordAddIn.dll cxGeometry                            TdxOwnedScaleFactor.SetOwner
06594f86 +00e ICCWordAddIn.dll cxGeometry                            TdxOwnedScaleFactor.BeforeDestruction
0607925d +009 ICCWordAddIn.dll System                      17576 +10 @BeforeDestruction
065948fe +002 ICCWordAddIn.dll cxGeometry                            TdxScaleFactor.Destroy
06078b48 +008 ICCWordAddIn.dll System                      16255  +1 TObject.Free
060cc044 +008 ICCWordAddIn.dll System.SysUtils             25229  +2 FreeAndNil
06731282 +05e ICCWordAddIn.dll cxEdit                                TcxCustomEditProperties.Destroy
06747a4a +032 ICCWordAddIn.dll cxTextEdit                            TcxCustomTextEditProperties.Destroy
06078b48 +008 ICCWordAddIn.dll System                      16255  +1 TObject.Free
060cc044 +008 ICCWordAddIn.dll System.SysUtils             25229  +2 FreeAndNil
0672e29a +026 ICCWordAddIn.dll cxEdit                                TcxEditRepositoryItem.Destroy
06078b48 +008 ICCWordAddIn.dll System                      16255  +1 TObject.Free
060cc044 +008 ICCWordAddIn.dll System.SysUtils             25229  +2 FreeAndNil
06737d71 +041 ICCWordAddIn.dll cxEdit                                Finalization
0607a352 +03e ICCWordAddIn.dll System                      22604 +17 FinalizeUnits
0611d1dc +054 ICCWordAddIn.dll madExcept                             InterceptFinalizeUnits
0611d1e4 +000 ICCWordAddIn.dll madExcept                             InterceptHalt0FinalizeUnits
0607a818 +0ac ICCWordAddIn.dll System                      24003 +87 @Halt0
06080b92 +046 ICCWordAddIn.dll SysInit                      1065 +21 @InitLib
06eece83 +00b ICCWordAddIn.dll ICCWordAddIn                  172  +0 initialization
77d99d9f +13c ntdll.dll                                              LdrShutdownProcess
77d99c41 +06f ntdll.dll                                              RtlExitUserProcess
778479d7 +00f kernel32.dll                                           ExitProcess
60e0b4ec +7b2 wwlib.dll                                              FMain
77843378 +010 kernel32.dll                                           BaseThreadInitThunk
Posted 14 Jun, 2017 04:23:22 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Mark,

We only have generic suggestions. Release COM objects and disconnect form events. You may want to use EurekaLog to locate the issue.


Andrei Smolin
Add-in Express Team Leader
Posted 14 Jun, 2017 05:28:32 Top
Mark Stevens




Posts: 41
Joined: 2014-09-15
Hi Andrei
Thanks. In the end I contacted https://www.devexpress.com/Support/Center/Question/Details/T525649/exceptions-in-addinexpress-dll-during-finalization and they came up with a modification to one of their finalization routines (in dxDPIAwareUtils).
It seems to have done the trick. Since then I haven't had any similar issues.
Posted 16 Jun, 2017 04:17:13 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Mark,

Thank you very much for sharing this info with forum readers!


Andrei Smolin
Add-in Express Team Leader
Posted 16 Jun, 2017 04:51:23 Top