Bug 1071 - PV crashes with -l5000
Summary: PV crashes with -l5000
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Command-line options (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords: low_hanging_fruit
Depends on:
Blocks:
 
Reported: 2017-12-09 23:35 CET by Uwe Hermann
Modified: 2018-01-11 00:57 CET (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2017-12-09 23:35:23 CET
As reported on IRC, there's a crash with invalid log levels supplied on the command line:

$ pulseview -l 5000
terminate called after throwing an instance of 'sigrok::Error'
  what():  invalid argument
Aborted (core dumped)

(gdb) bt
#0  0x00007f9d454c7fff in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f9d454c942a in __GI_abort () at abort.c:89
#2  0x00007f9d45de6b85 in __gnu_cxx::__verbose_terminate_handler() () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007f9d45de4956 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007f9d45de49a1 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007f9d45de4be4 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x000055fad983762e in sigrok::EnumValue<sigrok::LogLevel, sr_loglevel>::get(int) (id=<optimized out>) at [...]/include/libsigrokcxx/libsigrokcxx.hpp:1051
#7  0x000055fad9834fd0 in main(int, char**) (argc=<optimized out>, argv=0x7ffc77740108) at [...]/build/pulseview/main.cpp:124


With sigrok-cli:

$ sigrok-cli -l 5000
sr: log: Invalid loglevel 5000.
Comment 1 Wolfram Sang 2018-01-03 00:49:13 CET
Gerhard fixed it [1], patch waiting to be applied...

[1] http://repo.or.cz/pulseview/gsi.git/commitdiff/17c42a6b460e16b8bdc9e76b795a1b760af22ef6
Comment 2 Uwe Hermann 2018-01-11 00:57:12 CET
Fixed in ed6f8680ba30649409b35ffccb7f815cb7b1a23a, thanks!