changelog
changelog copied to clipboard
Crash on broken pipe
Bug Report
name = 'changelog'
operating_system = 'unix:Ubuntu'
crate_version = '0.3.4'
explanation = '''
Panic occurred in file 'library/std/src/io/stdio.rs' at line 993
'''
cause = 'failed printing to stdout: Broken pipe (os error 32)'
method = 'Panic'
backtrace = '''
0: 0x55ac701da772 - std::io::stdio::print_to::h9435376f36962f3f
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/io/stdio.rs:993
- std::io::stdio::_print::h0d31d4b9faa6e1ec
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/io/stdio.rs:1005
1: 0x55ac6fffc99b - changelog::main::ha8f4a0dd0e597edb
2: 0x55ac6fff90b3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h292c7de178945c2f
3: 0x55ac6fff90cd - std::rt::lang_start::{{closure}}::he23671a91b0e04e5
4: 0x55ac701e27e7 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::he179d32a5d10d957
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:259
- std::panicking::try::do_call::hcb3d5e7be089b2b4
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:381
- std::panicking::try::h7ac93b0cd56fb701
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:345
- std::panic::catch_unwind::h7b40e396c93a4fcd
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs:382
- std::rt::lang_start_internal::h142b9cc66267fea1
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/rt.rs:51
5: 0x55ac6fffd002 - main
6: 0x7fad9fc1d0b3 - __libc_start_main
7: 0x55ac6fff802e - _start
8: 0x0 - <unresolved>'''
Expected Behavior
Printing to a broken pipe (e.g. to less) should exit without an error if the pipe is closed.
Current Behavior
changelog panics.
Code Sample
changelog | less and then hit q without scrolling.
Also, I'd like to say how much I love the bug report panic handler :) It gives all the info for the bug report so I can copy paste it but doesn't try to reach out to the internet. The only thing that would make it better is having a link directly to https://github.com/yoshuawuyts/changelog/issues/new.