akrennmair / newsbeuter

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

typo in filter expression -> Segfault ( newsbeuter-2.7.tar.gz ) #94

Closed klartext closed 10 years ago

klartext commented 11 years ago

"F"-key or filtering and then:

title =¯ "foo"

=> SegFault.

akrennmair commented 10 years ago

Can you reproduce this issue in the latest version in the git repository? Because I can't.

If you can, then please run newsbeuter from within gdb, provoke the segfault, and paste the backtrace here, please.

klartext commented 10 years ago

Hi,

auf der Maschine, wo ich den Segfault hatte kriege ich den Newsbeuter so auf die Schnelle nicht compiliert. Altes System, anscheinend braucht man jetzt neue Libs, habe zu wenig Zeit, das alles jetzt zu installieren.

ich kann es in den nächsten Tagen mal auf meinen anderen Maschinen ausprobieren, da sind aktuellere Distributionen drauf, dann prüfe ich das da mal.

Gruß, Oliver

On Mon, Nov 18, 2013 at 10:16:10AM -0800, Andreas Krennmair wrote:

Can you reproduce this issue in the latest version in the git repository? Because I can't.

If you can, then please run newsbeuter from within gdb, provoke the segfault, and paste the backtrace here, please.


Reply to this email directly or view it on GitHub: https://github.com/akrennmair/newsbeuter/issues/94#issuecomment-28723046

gs93 commented 10 years ago

I can reproduce this issue with the latest git version (4be8591).

Program received signal SIGSEGV, Segmentation fault.
0x00000000004d6df2 in StartStates::state (this=0x7fffffffd0a8, key=-62) at filter/Scanner.h:136
136                     while (e != NULL && e->key != key) e = e->next;

Backtrace:

#0  0x00000000004d6df2 in StartStates::state (this=0x7fffffffd0a8, key=-62) at filter/Scanner.h:136
#1  0x00000000004d6423 in Scanner::NextToken (this=0x7fffffffd070) at filter/Scanner.cpp:482
#2  0x00000000004d6a61 in Scanner::Scan (this=0x7fffffffd070) at filter/Scanner.cpp:572
#3  0x00000000004d7255 in Parser::Get (this=0x7fffffffd030) at filter/Parser.cpp:24
#4  0x00000000004d761f in Parser::matchop (this=0x7fffffffd030, op=@0x7fffffffcf7c: 3) at filter/Parser.cpp:89
#5  0x00000000004d77e6 in Parser::matchexpr (this=0x7fffffffd030) at filter/Parser.cpp:160
#6  0x00000000004d78a3 in Parser::expr (this=0x7fffffffd030) at filter/Parser.cpp:176
#7  0x00000000004d7994 in Parser::Filter (this=0x7fffffffd030) at filter/Parser.cpp:192
#8  0x00000000004d7a0c in Parser::Parse (this=0x7fffffffd030) at filter/Parser.cpp:202
#9  0x00000000004d42ad in FilterParser::parse_string (this=0xc01dc8, str="title =¯ \"foo\"") at filter/FilterParser.cpp:93
#10 0x00000000004d0ca6 in newsbeuter::matcher::parse (this=0xc01dc8, expr="title =¯ \"foo\"") at src/matcher.cpp:34
#11 0x000000000047f296 in newsbeuter::feedlist_formaction::op_end_setfilter (this=0xc01cf0) at src/feedlist_formaction.cpp:688
#12 0x000000000047e8e7 in newsbeuter::feedlist_formaction::finished_qna (this=0xc01cf0, op=newsbeuter::OP_INT_END_SETFILTER) at src/feedlist_formaction.cpp:628
#13 0x000000000047788d in newsbeuter::formaction::start_next_question (this=0xc01cf0) at src/formaction.cpp:384
#14 0x0000000000474f75 in newsbeuter::formaction::process_op (this=0xc01cf0, op=newsbeuter::OP_INT_END_QUESTION, automatic=false, args=0x0) at src/formaction.cpp:127
#15 0x000000000042c9a1 in newsbeuter::view::run (this=0x7fffffffdcc0) at src/view.cpp:239
#16 0x000000000044140f in newsbeuter::controller::run (this=0x7fffffffddf0, argc=1, argv=0x7fffffffe1f8) at src/controller.cpp:605
#17 0x0000000000408785 in main (argc=1, argv=0x7fffffffe1f8) at newsbeuter.cpp:30
akrennmair commented 10 years ago

Thanks, the backtrace helps a lot. I can now reproduce the issue as well (I added a unit test with which I can deal directly). I'm working on a fix.

akrennmair commented 10 years ago

The crash should be fixed now. Please test.

gs93 commented 10 years ago

Yes, the crash is fixed, it's just printing the expected Error: couldn't parse filter command! message.

akrennmair commented 10 years ago

Thanks for the feedback! I'll close the issue now.