akrennmair / newsbeuter

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

Try to read from http://www.usinenouvelle.com/rss/ blocks newsbeuter #582

Open Moebius444 opened 7 years ago

Moebius444 commented 7 years ago

Newsbeuter version (copy from newsbeuter -v): newsbeuter 2.9 - http://www.newsbeuter.org/ Copyright (C) 2006-2010 Andreas Krennmair

newsbeuter est un logiciel libre, publié sous licence MIT/X Consortium. Tapez `newsbeuter -vv' pour obtenir plus d'informations.

Compilation date/time: Jul 2 2017 23:14:38 System: FreeBSD 11.0-RELEASE-p1 (amd64) Compiler: g++ 4.2.1 Compatible FreeBSD Clang 3.8.0 (tags/RELEASE_380/final 262564) ncurses: ncurses 5.9.20140222 (compiled with 5.9) libcurl: libcurl/7.54.1 OpenSSL/1.0.2j zlib/1.2.8 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:

  1. (Editing the config is a step, too!) URL contains : % cat .newsbeuter/urls http://www.usinenouvelle.com/rss/

  2. On Jul 20, try to open the news that begins with : "Aujourd?hui, nos concurrents..." blocks newsbeuter. Can not use CTRL-C. Need to call kill -9 from another session.

polyzen commented 7 years ago

If the browser was not already started, that's just how it works, unfortunately.

Minoru commented 7 years ago

You can write a script that will start the browser in background, and use that as your browser:

#/bin/sh
/usr/bin/firefox "$@" &

(Technical details: Newsbeuter will fork for the script, the script will fork for Firefox, then the script will finish; control will be returned to Newsbeuter, and Firefox will be scooped up by initd. This is a double fork.)

Newsbeuter doesn't do this for you because users might want it to block while the browser is running. The most obvious example is using Lynx: you want Newsbeuter to give up the terminal to Lynx, and stay that way until you quit the browser. Opting out of blocking is easier than adding it back, hence blocking being the default behaviour.

Hope this helps!

Moebius444 commented 7 years ago

Hi, I use lynx as web browser. This problem happens before following link and opening web page with lynx. Other feeds resumé can be read, and then link open with lynx without problem.

Minoru commented 7 years ago

Ah, so you're opening the article in the Newsbeuter itself, not the browser? Okay. I tried the same in 2.9 and 2.10, and both opened it fine.

You say you use Lynx but you didn't show us your config. Can you please post the contents of your ~/.newsbeuter/config (or ~/.config/newsbeuter/config if that's where you keep it)?

Moebius444 commented 7 years ago

I forgot, try to opening this specific thread "Aujourd?hui, nos concurrents...", make newsbeuter use 100% cpu.

The config file is not present:

gibson@planys:~/.newsbeuter% pwd
/home/gibson/.newsbeuter
gibson@planys:~/.newsbeuter% ls -la
total 14672
drwx------   2 gibson  wheel       512 21 juil. 14:46 .
drwxr-xr-x  12 gibson  wheel      1024 23 juil. 14:56 ..
-rw-r--r--   1 gibson  wheel  14946304 21 juil. 14:46 cache.db
-rw-r--r--   1 gibson  wheel         0 21 juil. 14:46 history.cmdline
-rw-r--r--   1 gibson  wheel         7 21 juil. 14:46 history.search
-rw-r--r--   1 gibson  wheel      1418 11 mai   19:43 urls
gibson@planys:~/.newsbeuter%

gibson@planys:~% cat .zshenv | grep LC_
export LC_CTYPE=fr_FR.ISO8859-1
export LC_COLLATE=fr_FR.ISO8859-1
export LC_TIME=fr_FR.ISO8859-1
export LC_NUMERIC=fr_FR.ISO8859-1
export LC_MONETARY=fr_FR.ISO8859-1
export LC_MESSAGE=fr_FR.ISO8859-1
export LC_ALL=fr_FR.ISO8859-1
Minoru commented 7 years ago

(Edited your post to use a code block to quote terminal's output.)

I couldn't reproduce that with your exports and Newsbeuter 2.9 from the repo. Does anyone has FreeBSD machine handy? I am testing on Linux; maybe the problem is in iconv?

arvedarved commented 7 years ago

I tried on FreeBSD 11. Can't reproduce.

One thing that is different, I have not questionmark in "Aujourd’hui, nos concurrents. So maybe it is an encoding issue?

Moebius444 commented 7 years ago

With UTF-8 in locale on FreeBSD, newsbeuter show correctly the message of questionmark "Aujourd'hui, nos concurrents..." on Jul 20. It is no longer blocked, and it does not use 100%.

gibson@planys:~% cat .zshenv | grep LC_
export LC_CTYPE=fr_FR.UTF-8
export LC_COLLATE=fr_FR.UTF-8
export LC_TIME=fr_FR.UTF-8
export LC_NUMERIC=fr_FR.UTF-8
export LC_MONETARY=fr_FR.UTF-8
export LC_MESSAGE=fr_FR.UTF-8
export LC_ALL=fr_FR.UTF-8
Minoru commented 7 years ago

@arvedarved, thanks!

So the next logical step is for someone with FreeBSD to figure out what's wrong exactly (I'm pretty sure it's iconv) and provide a patch. Or at least post your findings so the next person has a place to start from. I doubt I'm of much use here as I don't have much experience with development on FreeBSD, but feel free to ask anyway.

Moebius444 commented 7 years ago

I open a thread in FreeBSD forums : https://forums.freebsd.org/threads/62282/ with code sample.