newsbeuter
newsbeuter copied to clipboard
Seg. fault on TTRSS .OPML import
Newsbeuter version:
newsbeuter 2.10-d1c1 System: Linux 4.11.5-1-ARCH (x86_64) Compiler: g++ 7.1.1 20170528 ncurses: ncurses 6.0.20170527 (compiled with 6.0) libcurl: libcurl/7.54.1 OpenSSL/1.1.0f zlib/1.2.11 libpsl/0.17.0 (+libicu/59.1) libssh2/1.8.0 nghttp2/1.23.1 (compiled with 7.54.1) SQLite: 3.19.3 (compiled with 3.19.3) libxml2: compiled with 2.9.4
Steps to reproduce the issue:
- compile github master
- Fresh install
- Import tt-rss exported .opml
gdb debug log:
Starting program: /usr/bin/newsbeuter -i /tank/user/dump/selfhosted_data/TinyTinyRSS_2017-06-07.opml
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6424a36 in __strcmp_ssse3 () from /usr/lib/libc.so.6
#0 0x00007ffff6424a36 in __strcmp_ssse3 () from /usr/lib/libc.so.6
No symbol table info available.
#1 0x00000000004647cb in newsbeuter::controller::rec_find_rss_outlines (this=0x7fffffffdac0,
node=0x8857f0, tag="tt-rss-filters") at src/controller.cpp:1108
newtag = "tt-rss-filters"
__PRETTY_FUNCTION__ = "void newsbeuter::controller::rec_find_rss_outlines(xmlNode*, std::__cxx11::string)"
#2 0x000000000046508d in newsbeuter::controller::rec_find_rss_outlines (this=0x7fffffffdac0,
node=0x885320, tag="tt-rss-filters") at src/controller.cpp:1174
newtag = "tt-rss-filters"
__PRETTY_FUNCTION__ = "void newsbeuter::controller::rec_find_rss_outlines(xmlNode*, std::__cxx11::string)"
#3 0x000000000046508d in newsbeuter::controller::rec_find_rss_outlines (this=0x7fffffffdac0,
node=0x885020, tag="") at src/controller.cpp:1174
newtag = "tt-rss-filters"
__PRETTY_FUNCTION__ = "void newsbeuter::controller::rec_find_rss_outlines(xmlNode*, std::__cxx11::string)"
#4 0x00000000004641c2 in newsbeuter::controller::import_opml (this=0x7fffffffdac0,
filename="/tank/user/dump/selfhosted_data/TinyTinyRSS_2017-06-07.opml")
at src/controller.cpp:1063
node = 0x842fd0
doc = 0x831110
root = 0x831460
#5 0x000000000045b32f in newsbeuter::controller::run (this=0x7fffffffdac0, argc=3,
argv=0x7fffffffdf68) at src/controller.cpp:357
c = -1
do_import = true
do_export = false
cachefile_given_on_cmdline = false
do_vacuum = false
importfile = "/tank/user/dump/selfhosted_data/TinyTinyRSS_2017-06-07.opml"
do_read_import = false
do_read_export = false
readinfofile = ""
show_version = 0
silent = true
execute_cmds = false
getopt_str = "i:erhqu:c:C:d:l:vVoxXI:E:"
longopts = {{name = 0x578eaa "cache-file", has_arg = 1, flag = 0x0, val = 99}, {
name = 0x578eb5 "config-file", has_arg = 1, flag = 0x0, val = 67}, {
name = 0x578ec1 "execute", has_arg = 1, flag = 0x0, val = 120}, {
name = 0x578ec9 "export-to-file", has_arg = 1, flag = 0x0, val = 69}, {
name = 0x578ed8 Quit
quit
Hi! Thank you for the report!
I grabbed Gwern's OPML file from https://raw.githubusercontent.com/gwern/gwern.net/master/docs/personal/rss-subscriptions.opml , and it imported just fine. Can you share yours?
Alternatively you can narrow it down by deleting parts of the file and keeping the one that triggers the issue, then repeating until you boiled it down to a few lines, then share that (maybe censoring the URLs).
Oh, and of course you can try Gwern's file with your build to make sure this isn't due to compiler/libraries/other environment-specific things.
Gwern's OPML does work. I'll see if I can narrow down mine and post it shortly.
Found the error:
Whereas gwern has a working <outline>
for folders, tt-rss is exporting them as
<outline text="Android">
I was able to fix this by reformatting to
<outline title="Android" text="Android" description="Android" type="folder">
Cool! Here's what I'm going to do over the next few days regarding this:
- [x] Find out if there's a spec for OPML
- [x] Find out how acceptable is TT-RSS' behaviour
- [ ] If it turns out this is valid, I'll see how this can be fixed
OPML spec allows what TT-RSS does:
An
is an XML element containing at least one required attribute, text, and zero or more additional attributes.
Need to take a look at our OPML-importing code and see why it requires any other attributes at all. I don't plan to look into this immediately; this issue is free for the taking.