ExcelDna icon indicating copy to clipboard operation
ExcelDna copied to clipboard

Error message: "Attempting to load MY-ADDIN.RESOURCES.EN-US from resources."

Open fandrei opened this issue 4 years ago • 8 comments

One of the users is getting a number of error messages like above from Excel-Dna, and then Excel crashes. I wonder what may be the reason of such behavior?

fandrei avatar Oct 24 '19 17:10 fandrei

@fandrei The message is coming from AssemblyManager around line 90 and may not necessarily what's causing Excel to crash...

From the source code:

We expect failures when loading .resources assemblies, so only log at the Verbose level.
From: http://blogs.msdn.com/b/suzcook/archive/2003/05/29/57120.aspx
"Note: Unless you are explicitly debugging the failure of a resource to load, 
       you will likely want to ignore failures to find assemblies with the ".resources" extension 
       with the culture set to something other than "neutral". Those are expected failures when the
       ResourceManager is probing for satellite assemblies."

Are you able to put together a sample add-in that reproduces the error?

augustoproiete avatar Oct 24 '19 17:10 augustoproiete

@augustoproiete I can't even reproduce it on my PC, it's only happening to some users. I'm not sure what other reasons can make it crash, but this is the only clue that I currently have. Any ideas how to diagnose it, besides this log?

fandrei avatar Oct 24 '19 20:10 fandrei

@fandrei Off the top of my head, I would suggest the following (in any order you think is best):

  • Check the problematic user's Regional Settings on Windows, Windows install language, Excel language, etc. to see if there's a pattern somewhere

  • Check if you have any culture settings defined on your assemblies, resource files, satellite assemblies, and try removing them (for testing purposes)

  • Build a simple add-in with a "hello world" function, and a simple "hello world" ribbon, etc... i.e. A very simplified add-in, and prove that it runs on the problematic users' machine, so if it crashes too, you know it's a problem with their Excel install, and not your add-in

  • Put a try...catch everywhere to prevent any exception from bubbling up to excel, and log any exceptions you catch... i.e. AutoOpen & AutoClose, all Ribbon callback methods, any function handler...

  • Add logging everywhere, so you can trace the code that is being executed and perhaps help you identify when it stops

  • Catch all unhandled exceptions and log them and/or display them in a message box so you can catch hidden exception that might be happening

augustoproiete avatar Oct 24 '19 21:10 augustoproiete

@augustoproiete ok thanks, will try the ones that I haven't tried yet.

fandrei avatar Oct 24 '19 21:10 fandrei

@fandrei Any news on this one?

augustoproiete avatar Mar 11 '20 21:03 augustoproiete

@augustoproiete nothing.

fandrei avatar Mar 13 '20 22:03 fandrei

@fandrei Do you want to put together a reproducible example that we can test? Or should we close this one for the time being?

augustoproiete avatar Mar 14 '20 16:03 augustoproiete

@augustoproiete I have no idea how to reproduce it.

fandrei avatar Mar 14 '20 17:03 fandrei