Why do I get a errors when running the DualSource sample code ?

 

When running the DualSource C# sample code after connecting to the device an exception is thrown.

This is due to a bug in the MainForm.cs. When the method void Connect(PvDeviceInfo aDI) tries to open the channels the exception, NullReferenceException, is thrown because the lSourceStreamChannel variable has a null value.

 

This bug can be fixed by replacing the line:

UInt16 lChannel = (UInt16)lSourceStreamChannel.Value;

with the line:

UInt16 lChannel = (UInt16)lEE.ValueInt;

 

When running the DualSource C++ sample code on Ubuntu a segmentation fault occurs. The reason is the same reason as C#.

This bug can be fixed by replacing the line:

lSourceStreamChannel->GetValue( lChannel );

with the line:

lEE->GetValue( lChannel );

 

Note:

The versions of the eBUS SDK affected by this bug in the C# DualSource sample code are: up to 6.2.8.

Have more questions? Submit a request

0 Comments

Article is closed for comments.