Hanging/deadlock after upgrade to 64 bit

Jan 19, 2015 at 11:40 AM
Hello,
I have a fairly complicated Excel DNA add-in, it contains many functions & ribbon items and performs over-the-wire requests (WCF, CORBA) in a client-server model.

The add-in is functioning correctly and has been for some time as a 32 bit plug-in. I have now upgraded it to 64 bit.

The issue I am having is that as a 64 bit plug-in it will hang Excel. Mostly it will freeze immediately after Excel and the plug-in have loaded although sometimes it will freeze later, after both the ribbon and function functionality have been successfully used. Regardless of when, it will always freeze. The freezing can be exhibited by not interacting with the plug-in or during interaction.

I have tried to identify the issue myself by debug/logging around all our thread logic but the issue is not there. Running in debug I get this message after Excel is frozen -

"The CLR has been unable to transition from COM context xxxx to COM context xxxx for 60 seconds. etc.. etc...

I should also mention that viewing the threads at this point shows the main thread in a location outside of our code base and none of the other threads are in user code.

Nothing is logged to the event log.

Thanks for any help Govert.
Coordinator
Jan 19, 2015 at 12:23 PM
Hi,

I'm not aware of any problems with Excel-DNA under 64-bit Excel that would explain what you're seeing.
It is of course possible that your complicated add-in is surfacing some issue in Excel-DNA, in Excel itself or in some of the related libraries.
It's not clear from your post that the issue even has to do with Excel - might it be an interaction between the other libraries?

The best suggestion I have is that you either start with a simple add-in that does not exhibit the problem, or simplify your add-in until you can pinpoint what causes the problem, and have a simple case that reproduces the issue.

Can you confirm that you have no code using the Excel COM object model running on threads other that the main Excel thread?

Some other features that are higher risk, that you might want to eliminate first (or add first to your simple add-in):
  • Any use of ExcelAscynUtil.QueueAsMacro
  • Any async or RTD-based features
  • Anything complicated in the ribbon callbacks
  • Any IsThreadSafe=true functions
Once you have a simple case that reproduces the issue, we can look further,

Regards,
Govert
Jan 20, 2015 at 8:42 AM
Govert,

Thank you for your reply.
It turns out it is actually third party "user profile admin" software that is attaching to the Excel process which is causing the issue.
I would delete this thread if I were able and I welcome you to do so if you can.

Thank you,
Value2
Coordinator
Jan 21, 2015 at 8:59 AM
Hi,

Thanks for getting back with the resolution.
I think it might be helpful to anyone else running into the same issue.

Do you know what the third-party software is called, just as a reference?

Regards,
Govert