Bug 1125 - PulseView crashes after first acquisition
Summary: PulseView crashes after first acquisition
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Acquisition (show other bugs)
Version: unreleased development snapshot
Hardware: x86 Windows
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
: 1139 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-02-25 13:04 CET by beholder
Modified: 2018-03-31 17:14 CEST (History)
2 users (show)



Attachments
debug log (2.71 KB, text/plain)
2018-02-25 13:04 CET, beholder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description beholder 2018-02-25 13:04:10 CET
Created attachment 387 [details]
debug log

Overview: 
---------
PV crashed during acquisition.

Steps to Reproduce:
-------------------
1. Install pulseview-NIGHTLY-32bit-static-release-installer.exe
2. Run PulseView
3. Select device demo or USBee AX-pro clone from ARMFLy (the same on both)
4. Run first acquisition (default settings)- OK
5. Run second - crash

Result:
-------
Application ends with error.

Version with debug pulseview-NIGHTLY-32bit-static-debug-installer.exe crashes immediately after starting first acquisition. Debug -l 5 in attachment.

More details observed:
----------------------
Each new PV static-relase installation for first time works well.

sigrok-cli works without any error:

 sr: [00:01.062000] fx2lafw: receive_transfer(): status LIBUSB_SUCCESS / LIBUSB_T
RANSFER_COMPLETED received 512 bytes.
sr: [00:01.062000] session: Running transform module 'nop'.
sr: [00:01.062000] transform/nop: Received packet of type 10004, passing on unmo
dified.
sr: [00:01.062000] session: bus: Received SR_DF_LOGIC packet (232 bytes, unitsiz
e = 1).
cli: Received SR_DF_LOGIC (232 bytes, unitsize = 1).
D0:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D1:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D2:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D3:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D4:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D5:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
D6:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
D7:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D0:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D1:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D2:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D3:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D4:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D5:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
D6:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
D7:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D0:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D1:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D2:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D3:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D4:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
D5:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
D6:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
D7:11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
sr: [00:01.093000] session: Running transform module 'nop'.
sr: [00:01.093000] transform/nop: Received packet of type 10007, passing on unmo
dified.
sr: [00:01.093000] session: bus: Received SR_DF_ANALOG packet (232 samples).
cli: Received SR_DF_ANALOG (232 samples).
.
.
.
.
sr: [00:01.187000] std: fx2lafw: Sending SR_DF_END packet.
sr: [00:01.187000] session: Running transform module 'nop'.
sr: [00:01.187000] transform/nop: Received packet of type 10001, passing on unmo
dified.
sr: [00:01.187000] session: bus: Received SR_DF_END packet.
D0:11111111 11111111 11111111 11111111 11111111
D1:11111111 11111111 11111111 11111111 11111111
D2:11111111 11111111 11111111 11111111 11111111
D3:11111111 11111111 11111111 11111111 11111111
D4:11111111 11111111 11111111 11111111 11111111
D5:00000000 00000000 00000000 00000000 00000000
D6:00000000 00000000 00000000 00000000 00000000
D7:11111111 11111111 11111111 11111111 11111111
cli: Received SR_DF_END.
sr: [00:01.187000] usb: usb_source_finalize
sr: [00:01.187000] session: Stopped.
sr: [00:01.187000] hwdriver: Cleaning up all drivers.
sr: [00:01.187000] fx2lafw: Closing device on 5.2 (logical) / usb/5-1 (physical)
 interface 0.
 
Build Date & Platform:
----------------------
This applies to the Windows nightly build on Feb 24 2017 downloaded from http://sigrok.org/wiki/Windows on Windows XP (Service Pack 3)
Comment 1 Uwe Hermann 2018-03-12 16:28:11 CET
Fixed in 20df1a39d587c284f5ee8873dc05470d6a6b11eb, thanks!
Comment 2 beholder 2018-03-22 22:42:51 CET
The last (22.03.2018) and previous compilation causes the same error:


sr: [03:11.144000] session: Using thread-default main context.
sr: [03:11.144000] session: Starting.
sr: [03:11.144000] hwdriver: demo: Starting acquisition.
sr: [03:11.144000] demo: num logic 8, partial off 1, mask 0x00.
sr: [03:11.144000] demo: Generating sine pattern.
sr: [03:11.144000] demo: Generating square pattern.
sr: [03:11.144000] demo: Generating sawtooth pattern.
sr: [03:11.144000] demo: Generating triangle pattern.
sr: [03:11.144000] std: demo: Sending SR_DF_HEADER packet.
sr: [03:11.144000] session: bus: Received SR_DF_HEADER packet.
sr: [03:11.300000] session: bus: Received SR_DF_LOGIC packet (312 bytes, unitsiz
e = 1).
Assertion failed!

Program: C:\Program Files\sigrok\PulseView\pulseview.exe
File: /home/jenkins_slave/fsroot/workspace/sigrok-cross-mingw/buildtype/static/d
ebugtype/debug/platform/cross-i686-w64-mingw32/cross-compile/mingw/build_debug_3
2/pulseview/pv/data/logicsegment.cpp, Line 297

Expression: index < sample_count_

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I'm  not sure it is fixed.
Comment 3 Uwe Hermann 2018-03-25 17:30:31 CEST
Hm, weird. Can you please retry with the current PulseView installer as of today? Maybe it wasn't properly rebuilt at the time you downloaded, not sure. I just downloaded and installed 5 minutes ago, tested on Windows 10 64bit, and I cannot reproduce the issue.

Both demo and CWAV USBee AX (8 logic, 1 analog channel) acquisitions work fine multiple times in a row for me. Tested both the release and the debug installer, both work fine.

If this issue persists, are you running this on Windows XP maybe? There's an open issue for that, might be related (or not).
Comment 4 beholder 2018-03-26 19:58:31 CEST
  Install on Widnows XP SP3. Latest build (relase or debug) not work too. It's the same bug (#1139). pulseview-NIGHTLY-32bit-static-release (0.5.0-git-30677c1) crashes on second acquisition but pulseview-NIGHTLY-32bit-static-debug crashes immediately after starting first acquisition. Maybe the difference in behavior of builds will help you find for cause of error.
Comment 5 Uwe Hermann 2018-03-31 17:06:19 CEST
*** Bug 1139 has been marked as a duplicate of this bug. ***
Comment 6 Uwe Hermann 2018-03-31 17:14:28 CEST
Quick update, I think this should now be fixed by 4bd0ecb8d08b655a4e2a1d60b3166e97b290475c, thanks!

I've been able to reproduce this on Windows XP SP3 (32bit):

  Assertion failed!
  Expression: index < sample_count_

I could *not* reproduce it on Windows 10 (64bit) or Linux or Mac OS X.

With the fix above, this specific assertion doesn't happen for me anymore; neither with demo, nor with a USBee AX (8 + 1 channels).

Please note that I'm now running into the issue in bug #1148 with the USBee AX (but not with demo!), that's an independent bug, though, so closing this one.

The Windows installers for this will be updated in half an hour or so, please retry the latest installers and reopen the bug in case this is still a problem. Thanks!