View Issue Details

IDProjectCategoryView StatusLast Update
0000401.NET APIImplementation Bugpublic2008-08-13 01:57
ReporterMariusz Postol Assigned ToRandy Armstrong  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platform.NET API 
Summary0000401: Invalid client handle when subscribing to an invalid tag
Description

OpcCom.Da.Subscription.AddItems(Opc.Da.Item[]) calls m_items.ApplyFilters with inconsistent results list. Some results have API client handle (succeeded) another ones assigned by the user (failed). User handles does not make sense in ApplyFilters.

Workarounds:

  1. New overloaded ApplyFilters applying filters only for succeeded items.
  2. Use guid as internal items index.
Steps To Reproduce

Try to add items with correct name and client handles int 0-5, and wrong names with client handles 6-9; you should receive duplicated result for item with client handle = 5.

TagsNo tags attached.

Activities

Randy Armstrong

2008-08-13 01:57

administrator   ~0000744

Added to Build 102.0

Restored the original code and added an additional processing step:

ItemResult[] filteredResults = (ItemResult[])m_items.ApplyFilters(m_filters, results);

// need to return the client handle for failed items.
if ((m_filters & (int)ResultFilter.ClientHandle) != 0)
{
for (int ii = 0; ii < count; ii++)
{
if (filteredResults[ii].ResultID.Failed())
{
filteredResults[ii].ClientHandle = items[ii].ClientHandle;
}
}
}

return filteredResults;

Issue History

Date Modified Username Field Change
2008-08-05 11:54 Mariusz Postol New Issue
2008-08-13 01:56 Randy Armstrong Status new => assigned
2008-08-13 01:56 Randy Armstrong Assigned To => Randy Armstrong
2008-08-13 01:57 Randy Armstrong Status assigned => resolved
2008-08-13 01:57 Randy Armstrong Resolution open => fixed
2008-08-13 01:57 Randy Armstrong Note Added: 0000744