Package: lfm
Version: 2.3-1
Severity: important
--- DESCRIPTION ---
lfm crashes when it has to show informations (pressing "i" on the file) about a
file having this name pattern:
my_very_long_file_name_which_exceeds_the_terminal_width.(www.some-site.com)
in general, any file with a name in this form crashes it:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(zzz.xxx-ccc.vvv)
where the first part of the name (the "a"s) is a long string which exceeds the
terminal width.
--- RESULTS ---
This is what i get in my terminal after the crash:
Traceback (most recent call last):
File "/usr/bin/lfm", line 27, in <module>
lfm_start(sys.argv)
File "/usr/share/lfm/lfm/lfm.py", line 1155, in lfm_start
path = curses.wrapper(main, prefs, paths1, paths2)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/share/lfm/lfm/lfm.py", line 1077, in main
ret = app.run()
File "/usr/share/lfm/lfm/lfm.py", line 209, in run
ret = self.act_pane.manage_keys()
File "/usr/share/lfm/lfm/lfm.py", line 804, in manage_keys
ret = actions.do(self.act_tab, ch)
File "/usr/share/lfm/lfm/actions.py", line 169, in do
exec(act)
File "<string>", line 1, in <module>
File "/usr/share/lfm/lfm/actions.py", line 569, in file_info
do_show_file_info(tab)
File "/usr/share/lfm/lfm/actions.py", line 1202, in do_show_file_info
show_info(tab, tab.sorted[tab.file_i])
File "/usr/share/lfm/lfm/actions.py", line 1195, in show_info
pyview.InternalView('Information about \'%s\'' % encode(file), buf).run()
File "/usr/share/lfm/lfm/pyview.py", line 109, in __init__
self.init_curses()
File "/usr/share/lfm/lfm/pyview.py", line 152, in init_curses
self.win_title.addstr(0, int((app.maxw-len(title))/2), title)
_curses.error: addstr() returned ERR
--- TO REPRODUCE ---
$ touch
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\(www.some-site.com\)
$ lfm
$ < Once in lfm, browse for the file and press "i" on it to show its
informations >
I think the filename lenght may vary depending on the width of the terminal we
are testing in.
--- WHAT I TRIED ---
i'll refer to this filename:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(www.some-site.com)
I tested the issue creating some files with different names, trying to exclude
isolate the issue.
I couldn't come to a conclusion, or investigate more, since it has a very weird
behaviour. For example:
- using the above filename, but followed by something like
"(wwwwwwwwww.some-site.ccccccccccc)" doesn't crash it;
- using the above filename, but with no brackets and an underscore separating
the a's string from the url part, crashes it;
- using the above filename, but with no brackets and an nothing separating the
a's string from the url part, doesn't crash it;
- using the above filename, but with no hyphen, doesn't crash it;
- using the above filename, but with a shorter a's string, doesn't crash it;
I guess one should focus on the last part of the filename (the one including
brackets, dots and hyphens)
I flagged this issue as "important" since it makes the software unusable, and
there may be some more filename patterns affected by it.
Thanks for your nice work.
Bye.
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 3.13-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lfm depends on:
ii python 2.7.5-5
ii python-support 1.0.15
lfm recommends no packages.
lfm suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]