Bug 1114

Summary: Capture does not handle multiple sessions correctly
Product: libsigrok Reporter: James Churchill <pelrun>
Component: OtherAssignee: Nobody <nobody>
Status: CONFIRMED ---    
Severity: normal CC: soeren
Priority: Normal    
Version: unreleased development snapshot   
Target Milestone: ---   
Hardware: x86   
OS: Linux   

Description James Churchill 2018-01-20 11:28:47 CET
Open PV and create two sessions. Configure both to use the Demo device, then switch to Session 1 and run a capture.

The data gets added to Session 2 instead of Session 1, and the Session 2 UI gets stuck in the Run state ("Stop" button shown and driver configuration dropdowns disabled) even though the capture has completed. If additional captures are done in Session 1, then they are added as separate segments to Session 2 instead of replacing the original data.

If the two sessions have different drivers selected (in my case I have a DSLogic connected) then a segfault happens on capture.

If session 2 is left with "No Device" configured, then capture works as expected.
Comment 1 Soeren Apel 2018-02-23 16:51:20 CET
Thanks for the bug report.

> Open PV and create two sessions. Configure both to use the Demo device, then
> switch to Session 1 and run a capture.

> The data gets added to Session 2 instead of Session 1, and the Session 2 UI
> gets stuck in the Run state ("Stop" button shown and driver configuration 
> dropdowns disabled) even though the capture has completed. If additional
> captures are done in Session 1, then they are added as separate segments to
> Session 2 instead of replacing the original data.

This is a libsigrok bug because it doesn't correctly handle when the same device is used by two different sessions.

> If the two sessions have different drivers selected (in my case I have a
> DSLogic connected) then a segfault happens on capture.

Can't reproduce this - using demo and a generic FX2, everything works as expected here: sessions are separate and no crashes.
Comment 2 James Churchill 2018-02-24 14:42:37 CET
> This is a libsigrok bug because it doesn't correctly handle when the same device is used by two different sessions.

That sounds like a bad separation of concerns to me, or at least that a libsigrok session and a PV session are conceptually different things and should not be bound together so tightly.