MBanchuzhnyy

AN/AF SDK Exceptions during Notification history retrieving

Discussion created by MBanchuzhnyy on Nov 25, 2013
Latest reply on Nov 26, 2013 by MBanchuzhnyy

Hello everyone,

 

I have web service that gets notification history and then sends it back to user by request. The interesting thing that I noticed is during remote debug I see that very often some (out-of-my-code) exceptions happen. Below the example from output window of my VS. What can be the issue? Using my log, I see that it can be linked with the notifications which are stopped or which don't have history in archive. (Because of that there is probably some performance issue during notification history extraction).

 

Thank you.

 

P.S. To get history I use the method described here: http://vcampus.osisoft.com/discussion_hall/development_with_osisoft_sdks/f/29/p/2424/13091.aspx

 

Example:

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[HandMadeAlarmTest]: Could not retrieve any instance: System.NullReferenceException: Object reference not set to an instance of an object.

 

at PISDK.PointListClass.get_Data()

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 612

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 281

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 634

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 424

 

AFSDK Error: 0 : ANHistoryUpdateManager.SignupAndRetrieveEventsOnSTAThread[]: The given key was not present in the dictionary.

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[Test]: Could not retrieve any instance: System.Runtime.InteropServices.COMException (0x80010012): The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute. (Exception from HRESULT: 0x80010012 (RPC_E_SERVER_DIED_DNE))

 

at PISDK.Server.GetPoints(String WhereClause, PIAsynchStatus pAsynchStatus)

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.RetrieveHistoryTagsFromServer(Boolean toThrowException) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 522

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 607

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 282

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 635

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 426

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[test SNMP]: Could not retrieve any instance: System.NullReferenceException: Object reference not set to an instance of an object.

 

at PISDK.PointListClass.get_Data()

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 612

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 281

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 634

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 424

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[test WS]: Could not retrieve any instance: System.NullReferenceException: Object reference not set to an instance of an object.

 

at PISDK.PointListClass.get_Data()

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 612

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 281

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 634

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 424

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[Test!]: Could not retrieve any instance: System.NullReferenceException: Object reference not set to an instance of an object.

 

at PISDK.PointListClass.get_Data()

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 612

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 281

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 634

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 424

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[Test_Set_Acknowlege]: Could not retrieve any instance: System.NullReferenceException: Object reference not set to an instance of an object.

 

at PISDK.PointListClass.get_Data()

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 612

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 281

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 634

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 424

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[Test1]: Could not retrieve any instance: System.Runtime.InteropServices.COMException (0x80010012): The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute. (Exception from HRESULT: 0x80010012 (RPC_E_SERVER_DIED_DNE))

 

at PISDK.Server.GetPoints(String WhereClause, PIAsynchStatus pAsynchStatus)

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.RetrieveHistoryTagsFromServer(Boolean toThrowException) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 522

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 607

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 282

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 635

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 426

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[Test2]: Could not retrieve any instance: System.Runtime.InteropServices.COMException (0x80010012): The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute. (Exception from HRESULT: 0x80010012 (RPC_E_SERVER_DIED_DNE))

 

at PISDK.Server.GetPoints(String WhereClause, PIAsynchStatus pAsynchStatus)

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.RetrieveHistoryTagsFromServer(Boolean toThrowException) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 522

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 607

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 282

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 635

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 426

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[Test3]: Could not retrieve any instance: System.NullReferenceException: Object reference not set to an instance of an object.

 

at PISDK.PointListClass.get_Data()

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 612

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 281

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 634

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 424

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[testHTML]: Could not retrieve any instance: System.NullReferenceException: Object reference not set to an instance of an object.

 

at PISDK.PointListClass.get_Data()

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 612

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 281

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 634

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 424

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[testXML]: Could not retrieve any instance: System.NullReferenceException: Object reference not set to an instance of an object.

 

at PISDK.PointListClass.get_Data()

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 612

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 281

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 634

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 424

 

AFSDK Error: 0 : ANNotificationList.GetActiveInstances[testXML2]: Could not retrieve any instance: System.NullReferenceException: Object reference not set to an instance of an object.

 

at PISDK.PointListClass.get_Data()

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetListData() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 612

 

at OSIsoft.AN.Notification.ANNotificationHistoryTags.GetSnapshots() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistoryTags.cs:line 281

 

at OSIsoft.AN.Notification.ANNotificationHistory.GetLastInstance(ANGetInstanceMode activeInstanceMode, ANGetInstanceMode nonActiveInstanceMode, Boolean overrideBuffer) in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationHistory.cs:line 634

 

at OSIsoft.AN.Notification.ANNotificationList.GetLastInstances() in D:\Development\PIANO\1.2.1205\Library\ANSDK\Notification\ANNotificationList.cs:line 424

 

AFSDK Information: 0 : ANHistoryUpdateManager.SignupAndRetrieveEventsOnSTAThread[]: No history tags exist for Test. Will try again periodically.

 

AFSDK Information: 0 : ANHistoryUpdateManager.SignupAndRetrieveEventsOnSTAThread[]: No history tags exist for Test1. Will try again periodically.

 

AFSDK Information: 0 : ANHistoryUpdateManager.SignupAndRetrieveEventsOnSTAThread[]: No history tags exist for Test2. Will try again periodically.

Outcomes