Leonardo78

Problem with RemoveSignUp

Discussion created by Leonardo78 on Apr 2, 2014
Latest reply on Apr 11, 2014 by Leonardo78

Hello everyone,

 

I'm experimenting a tough bug with the EventPipe (PISDK.IEventPipe2) and with RemoveSignUp() method in particular.

 

In a nutshell, when I try to remove PIPoints from the PointList, sometimes the system crashes with an uncatchable exception. It simply closes itself after the code line RemoveSignUp().

 

After lots of tests, I can assert the crash is pretty related to the EventPipe changing values and the interval rates (poll interval). Probably, I'm not able to remove a PIPoint which, concurrently, has triggered a new event in the pipe.

 

In fact, I don't have any issue when there's no listener to the OnNewValue event (RemoveSignUp works greatly in this case) and, furthermore, the system crashes about 20 times less when I'm monitoring PIPoints with changing rate around 30 seconds (that means less triggers for the OnNewValue event). Unluckly, my requirements force me to monitor PIPoints with changing rate even around 1 second so, you can understand how solving this bug is essential to me.

 

Notes:

  • I'm on a WPF application and I'm pretty sure the application is running in a Single Threading Apartment.
  • This bug is pretty similar to this, even with little differences. 
Thanks for any help you can provide.

Outcomes