0

When my RTD server starts, it goes through the ServerStart and ConnectData calls, then just when the data starts arriving, it gets a call to ServerTerminate which shuts everything down. I have added a stack trace dump but that's not telling me anything useful:

public void ServerTerminate()
        {
            Logger.DebugLog("TRACE: ServerTerminate {0}", new System.Diagnostics.StackTrace(true));

            timer_.Dispose();
            DataSource.Shutdown();
            topicIdMap_.Clear();
            fieldLookup_.Clear();
        }

2014-09-18 11:22:12Z TRACE: ServerTerminate    at Mike.RtdServer.ServerTerminate() in c:\Code\Mike\RtdServer.cs:line 347
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

What could cause this call to ServerTerminate ?

Valid
  • 767
  • 7
  • 14
  • how about posting the code that calls this method `ServerTerminate()` also could his be an issue with how you are using / invoking the timer.. are you using any locking mechanism ? I think that you need to show more code.. – MethodMan Sep 18 '14 at 15:52
  • This is an RTD server: Excel calls ServerStart and ServerTerminate. I don't call either of them directly – Valid Sep 18 '14 at 21:11
  • I am not using any locks and the timer is something I added to try to get around the issue (apparently Excel doesn't like it if you call UpdateNotify() too often so I am using the timer to cal it once a second. – Valid Sep 18 '14 at 21:51

1 Answers1

0

The issue was an uninitialized List accessed during the ConnectData() call.

Valid
  • 767
  • 7
  • 14