akrennmair / newsbeuter

Newsbeuter is an open-source RSS/Atom feed reader for text terminals.
http://www.newsbeuter.org/
MIT License
780 stars 97 forks source link

newsbeuter -x reload segfaults #81

Closed wookietreiber closed 11 years ago

wookietreiber commented 11 years ago

Everything else, interactive newsbeuter, even newsbeuter -x print-unread, works fine.

Here is the full gdb output of the backtrace:

$ gdb ./newsbeuter                                                                   
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/sources/newsbeuter-2.6/newsbeuter...done.
(gdb) run -x reload
Starting program: /home/sources/newsbeuter-2.6/newsbeuter -x reload
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff4e7f700 (LWP 6653)]
[Thread 0x7ffff4e7f700 (LWP 6653) exited]
[New Thread 0x7ffff4e7f700 (LWP 6654)]
[Thread 0x7ffff4e7f700 (LWP 6654) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00000000004325d2 in newsbeuter::view::force_redraw (this=0x7fffffffdcc0) at src/view.cpp:809
809             fa->set_redraw(true);
(gdb) bt
#0  0x00000000004325d2 in newsbeuter::view::force_redraw (this=0x7fffffffdcc0) at src/view.cpp:809
#1  0x0000000000443efb in newsbeuter::controller::reload_all (this=0x7fffffffddf0, unattended=true) at src/controller.cpp:895
#2  0x00000000004474b0 in newsbeuter::controller::execute_commands (this=0x7fffffffddf0, argv=0x7fffffffe1f8, i=2)
    at src/controller.cpp:1327
#3  0x0000000000440d77 in newsbeuter::controller::run (this=0x7fffffffddf0, argc=3, argv=0x7fffffffe1f8) at src/controller.cpp:592
#4  0x00000000004082b5 in main (argc=3, argv=0x7fffffffe1f8) at newsbeuter.cpp:30
(gdb) quit
A debugging session is active.

        Inferior 1 [process 6649] will be killed.

Quit anyway? (y or n) y

I wonder why something like force_redraw is called at all while batch executing newsbeuter with -x.

akrennmair commented 11 years ago

Have you checked whether the bug persists with the latest revision in git master?

wookietreiber commented 11 years ago

I hadn't. Just did, seems gone in current master. Would you be open to releasing a new bug-fix version or alternatively provide a patch for 2.6 distributions / package maintainers may use to fix this issue?

akrennmair commented 11 years ago

That's the plan, hopefully within the next few weeks.

wookietreiber commented 11 years ago

Thanks. Luckily, for my distribution, there is already a newsbeuter-git package.