jianbin wang
Posts: 5
Joined: 2024-11-17
|
Hi:
We have developed a Word COM add-in, which generally works without issues. However, on a specific user's computer, it fails to load. We examined the adxloader.log file, as shown below . Please, What could be the possible issue?
Add-in Express Loader Log File: 08/19/2025 15:05:32:871
Startup directory: D:\ABC\?
Loader version: 10.2.4714.0
Operating System: Microsoft Windows 10 Professional (build 18363), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files (x86)\Microsoft Office\Office16\WINWORD.EXE"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: High
UAC (User Account Control): Off
------------------------------------------------------------------------
15:05:32:873 5688 19928 Start.
15:05:32:873 5688 19928 The minimum supported Office version is 14
15:05:32:873 5688 19928 The host's version is 16.0.4266.0
15:05:32:873 5688 19928 Creating a new instance of the add-in loader.
15:05:32:873 5688 19928 Loading mscoree.dll
15:05:32:874 5688 19928 INFO: Assembly codebase - D:\ABC\Cpasit.Word.dll.
15:05:32:874 5688 19928 INFO: Assembly version - 3.6.2.0.
15:05:32:874 5688 19928 Success.
15:05:32:874 5688 19928 Loading the configuration from the system registry.
15:05:32:875 5688 19928 Getting the latest CLR version.
15:05:32:875 5688 19928 The latest CLR version is 'v4.0.30319'.
15:05:32:875 5688 19928 The configuration has been loaded successfully.
15:05:32:876 5688 19928 Runtime version: v4.0.30319.
15:05:32:876 5688 19928 Assembly name: Cpasit.Word.
15:05:32:876 5688 19928 Class name: Cpasit.Word.Addin.
15:05:32:876 5688 19928 Registry key: CLSID\{AC4C1316-E138-47E3-8A4C-6CF575FCE4CC}.
15:05:32:876 5688 19928 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
15:05:32:876 5688 19928 Loading CLR: v4.0.30319.
15:05:32:876 5688 19928 Calling CLRCreateInstance method.
15:05:32:876 5688 19928 Success.
15:05:32:876 5688 19928 Calling GetRuntime method.
15:05:32:876 5688 19928 Success.
15:05:32:876 5688 19928 Checking if the hosting API of .NET Framework v4.0 beta is installed.
15:05:32:876 5688 19928 The hosting API is up to date.
15:05:32:876 5688 19928 Calling SetDefaultStartupFlags method.
15:05:32:876 5688 19928 Success.
15:05:32:876 5688 19928 Calling GetInterface method for the CorRuntimeHost interface.
15:05:32:876 5688 19928 Success.
15:05:32:876 5688 19928 Starting CLR...
15:05:32:876 5688 19928 Success.
15:05:32:876 5688 19928 Getting the CLR version.
15:05:32:876 5688 19928 The CLR v4.0.30319 has been initialized successfully.
15:05:32:876 5688 19928 Creating a new domain setup.
15:05:32:878 5688 19928 Success.
15:05:32:878 5688 19928 Getting the add-in directory.
15:05:32:878 5688 19928 Success. The directory is 'D:\ABC\'
15:05:32:879 5688 19928 The configuration file is 'D:\ABC\Cpasit.Word.dll.config'
15:05:32:879 5688 19928 The 'shadow copy' is disabled.
15:05:32:879 5688 19928 Creating a new application domain.
15:05:32:880 5688 19928 Success.
15:05:32:880 5688 19928 Creating an instance of the managed class. Assembly identity: 'Cpasit.Word'
15:05:33:425 5688 19928 Error code: 0x80131604cpasit Co., Ltd |
|
Andrei Smolin
Add-in Express team
Posts: 19169
Joined: 2006-05-11
|
jianbin wang writes:
Error code: 0x80131604
0x80131604 stands for COR_E_TARGETINVOCATION or "Uncaught exception thrown by method called through Reflection".
As part of the process of loading your add-in, the Add-in Express loader creates an instance of your add-in's add-in module. This 1) initializes all class-level variables declared on the module and 2) invokes the constructor of the module. The main point is - this is done before the add-in gets fully connected to its host application: if the initializing calls or the calls you've added to the constructor aren't prepared to this, they fire an exception, and you get the result above. We recommend that you move such call in an event of the host application (which is Word in your case).
Still, with Word add-ins there is a scenario that I cannot remember at the moment; I remember (if I remember correct) it related to creating a lot of Word document in some fast process (probably, when you perform mail merge). The result is this: to bypass some issue that occurred in this forgotten scenario, we've added an overridable method OnHostApplicationInitialized: this method is called exactly when a reference to the add-in's host application is set and your code can use it freely.
There's another possibility: your log states the add-in's host application is run via "Run as administrator". I suggest that your user try to start Word as a normal user; usually, this can be fixed right in the shortcut the user starts Word with.
I'd add that Office is so multidimensioned you wouldn't expect from it. Still, some issues may relate the history of this product. Say, I remember an issue that can be solved if you use a long-forgotten Word VBA(?); and that is an official solution.
Regards from Poland (GMT+2),
Andrei Smolin
Add-in Express Team Leader |
|
jianbin wang
Posts: 5
Joined: 2024-11-17
|
Thanks Andrei.
The PC had installed Office 2016, and we recommend him to switch to Office 2024, which resolved the issue。cpasit Co., Ltd |
|
Andrei Smolin
Add-in Express team
Posts: 19169
Joined: 2006-05-11
|
Hello jianbin,
Thank you for letting me know.
Regards from Poland (GMT+2),
Andrei Smolin
Add-in Express Team Leader |
|