"The real-time data server is not responding" message after disabling my addin

430 views
Skip to first unread message

Andrei F

unread,
Nov 22, 2016, 5:27:18 AM11/22/16
to Excel-DNA
I'm getting the "The real-time data server is not responding" message in a few seconds after disabling my addin.
This addin is based on the ExcelRtdServer class, but the ServerTerminate method of my class is never called when this problem happens.
I wonder if this is a know bug?
Excel 2016 x86, Excel-DNA "0.33.9", .NET 4.5.2

Govert van Drimmelen

unread,
Nov 22, 2016, 5:38:25 AM11/22/16
to exce...@googlegroups.com

The situation if you have ‘live’ topics when you disable the add-in is not handled well at the moment.

 

There’s no way to tell Excel that an RTD server has become disabled, so the best we can do is to keep the RTD server alive (even though you’ve disabled the rest of the add-in).

Then when Excel recalculates it will find the functions are no longer valid and hopefully unload the RTD server.

 

But the current ‘unloading’ code does not try to keep the RTD server alive, which I think is making Excel unhappy.

 

Basically you need to get to the point where Excel calls ServerTerminate, before you unload the add-in.

The only way I can think of doing that is to have a global flag that indicates you want to unload, and in every RTD-related function, check the flag and immediately return if it is set.

Then when you want to unload, you need to UpdateNotify all active topics (or completely recalculate somehow).

ServerTerminate will be called when Excel is done with the RTD server, and you can safely unload.

 

Not a great solution, I’m afraid.

 

-Govert

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.

Andrei F

unread,
Nov 22, 2016, 11:10:30 PM11/22/16
to Excel-DNA
Thanks for explaining.
Reply all
Reply to author
Forward
0 new messages