You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we configure a OpcPublishingInterval of 0 via publishednodes.json, and a non-zero HeartbeatInterval , a DivideByZeroException is triggered in /src/components/opc-ua/src/Microsoft.Azure.IIoT.OpcUa.Protocol/src/Services/SubscriptionServices.cs:line 573
Happens both when configured via the IIoT Stack and stand-alone via publishednodes.json .
To Reproduce
Setup a subscription (IIoT stack or standalone via publishednodes.json) that has a non-zero HeartbeatInterval and a 0 OpcPublishingInterval.
Screenshots
[2021-06-10 13:30:30Z ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] Failed to activate subscription
System.DivideByZeroException: Attempted to divide by zero.
at Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices.SubscriptionWrapper.<>c__DisplayClass32_0.<GetSubscription>b__0(MonitoredItemModel m) in /src/components/opc-ua/src/Microsoft.Azure.IIoT.OpcUa.Protocol/src/Services/SubscriptionServices.cs:line 573
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices.SubscriptionWrapper.GetSubscription(Session session, SubscriptionConfigurationModel configuration, Boolean activate) in /src/components/opc-ua/src/Microsoft.Azure.IIoT.OpcUa.Protocol/src/Services/SubscriptionServices.cs:line 571
at Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices.SubscriptionWrapper.ReapplyAsync(Session session, Boolean activate) in /src/components/opc-ua/src/Microsoft.Azure.IIoT.OpcUa.Protocol/src/Services/SubscriptionServices.cs:line 259
at Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices.SubscriptionWrapper.ActivateAsync(Session session) in /src/components/opc-ua/src/Microsoft.Azure.IIoT.OpcUa.Protocol/src/Services/SubscriptionServices.cs:line 229
The text was updated successfully, but these errors were encountered:
Describe the bug
When we configure a OpcPublishingInterval of 0 via publishednodes.json, and a non-zero HeartbeatInterval , a
DivideByZeroException
is triggered in/src/components/opc-ua/src/Microsoft.Azure.IIoT.OpcUa.Protocol/src/Services/SubscriptionServices.cs:line 573
A publishing interval of 0 means max sampling rate / event based sampling, and is supported by the OPC UA server. (And the OPC UA standard ( https://reference.opcfoundation.org/v104/Core/docs/Part4/5.12.1/ ))
The bug appears only in conjunction with a HeartbeatInterval, and is triggered by this code:
Happens both when configured via the IIoT Stack and stand-alone via publishednodes.json .
To Reproduce
Setup a subscription (IIoT stack or standalone via publishednodes.json) that has a non-zero HeartbeatInterval and a 0 OpcPublishingInterval.
Screenshots
The text was updated successfully, but these errors were encountered: