Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict between two addins uses Excel-Dna #625

Open
orikoren12 opened this issue Jul 11, 2023 · 7 comments
Open

Conflict between two addins uses Excel-Dna #625

orikoren12 opened this issue Jul 11, 2023 · 7 comments

Comments

@orikoren12
Copy link

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?

@govert
Copy link
Member

govert commented Jul 11, 2023

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
Copy link
Member

govert commented Jul 11, 2023

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

@orikoren12
Copy link
Author

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 !

@govert
Copy link
Member

govert commented Jul 11, 2023

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.

@orikoren12
Copy link
Author

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

@govert
Copy link
Member

govert commented Jul 12, 2023

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.

@orikoren12
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants