ExcelDna icon indicating copy to clipboard operation
ExcelDna copied to clipboard

Conflict between two addins uses Excel-Dna

Open orikoren12 opened this issue 2 years ago • 7 comments

Hi

We are facing an issue with a customer who uses our addin along with another addin which is also using Excel-Dna. Both addin are using custom functions. The Excel is basically crashing and fails to launch when both addins are set.

Is this a known issue? Is there anything we can check from our end? Any other information we can provide here?

orikoren12 avatar Jul 11 '23 08:07 orikoren12

It's not a general problem that multiple add-ins can't work together (you can test this yourself). So it's something related to what your add-in or the other one is doing, probably during startup (AutoOpen or Ribbon loading)

Does it happen even if you make a very simple add-in (just a single function)? What version of Excel-DNA and .NET are you using? Does it happen with different Excel-DNA versions? Are you able to contact the other developers, and maybe give them a copy of your add-in?

govert avatar Jul 11 '23 08:07 govert

Your add-ins certainly should not have the same name, to be sure.

govert avatar Jul 11 '23 08:07 govert

Does it happen even if you make a very simple add-in (just a single function)? Ori > we can try this. What version of Excel-DNA and .NET are you using? Ori > we are using .NET framework 4.8, DNA version 1.6.0 Does it happen with different Excel-DNA versions? Ori > we didn't try, do you think we should? Are you able to contact the other developers, and maybe give them a copy of your add-in? Ori > we'll try to contact them

Thanks for the quick response !

orikoren12 avatar Jul 11 '23 09:07 orikoren12

You can check the Windows Event Log to find a code for the crash, and maybe some more information if it comes from an unhandled .NET exception.

govert avatar Jul 11 '23 09:07 govert

Hi @govert Thanks for you advices !

We have some progress We got this window in debug mode:

image

After modifying the name of the of the class which implements the ExcelRibbon class we didn't have this window any more. This seems like COM registration of two classes with same name (?)

The thing is that we still get Excel crash when running it with real installation (after the change above) And while debugging it, we are getting this dialog when closing the Excel:

image

Is this something that was seen in the past? Again all the issues are related to having two DNA addin simultaneously

orikoren12 avatar Jul 12 '23 08:07 orikoren12

If there is an Excel crash while your add-in is being called, then Excel will show the "running into problems" message. If you then disable the add-in (which might not disable the whole add-in, but just the ribbon part), you might get the first message, saying that the ribbon was not loaded, possibly because it has been disabled. You can go to File -> Options -> Add-Ins: Manage: Disabled add-ins to re-enable the add-in.

Why would the add-in crash Excel? Some delicate places would be any shutdown or update handler in the ribbon which might be called during shutdown. Also, workbook events the run when a workbook is closed can cause trouble since they might be handled by all the add-ins involved.

My advice is to figure out whether a trivial or very simple add-in (without ribbon or with very simple ribbon) still results in the same problems. If so, then you need the help of the other add-in vendor to resolve this. If not, you can figure out what part(s) of your add-in are needed to cause trouble.

govert avatar Jul 12 '23 11:07 govert

@govert Thanks for you feedback and your advice, I've tried very simple addin and the issue is still there. I'm contacting the other addin vendor to see if they will be able to somehow assist here.

orikoren12 avatar Jul 12 '23 12:07 orikoren12