Bug 1114 - Capture does not handle multiple sessions correctly
Summary: Capture does not handle multiple sessions correctly
Status: CONFIRMED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Acquisition (show other bugs)
Version: unreleased development snapshot
Hardware: x86 Linux
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-20 11:28 CET by James Churchill
Modified: 2018-02-24 14:42 CET (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.