"Byobu Terminal has closed unexpectedly" non-crash crash message

Bug #1279533 reported by Omid
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
byobu
Fix Released
High
Unassigned
Fedora
Won't Fix
Undecided

Bug Description

Thanks for writing and maintaining Byobu. It had made my interaction with different terminal multiplexers so much easier because of the uniform keyboard shortcuts and commands it provides.

Everyonce in a while (and almost always upon initial login to an X session with different Window Managers, e.g., LXDE and Cinnamon) I get a Crash report window with the title

"The application Byobu Terminal has closed unexpectedly".

But as far as I can tell Byobu has not crashed and I can continue my work without a problem.
The offending ExecutablePath reported is

/usr/lib/byobu/include/select-session.py.

My current Byobu is from PPA (5.71) but this has been occuring for a few versions now.
Here is the error listed under Title:

select-session.py crashed with TypeError in get_sessions(): decode() argument 1 must be string, not None

I have seen this message on different GNU/Linux distributions, e.g., Ubuntu 12.04 and Trisquel 6.0, using different shells, e.g., bash and zsh, different terminal multiplexers, screen and tmux, and using different kernels (3.2.0-58-generic and older, 32bit or 64bit).
This is not a critical "bug" (if it is one at all) but it would be nice to find its source and fix it. Any help you could offer is greatly appreciated.

Revision history for this message
In , Alois (alois-redhat-bugs) wrote :

Description of problem:
I just ran `sh -c byobu` in Xfce via "Run..." (Alt+F2).

BTW I have instaled byobu just few moments ago and at the moment when it crashed I was running one session. (I wanted to access that using above command.)

Version-Release number of selected component:
byobu-5.69-2.fc20

Additional info:
reporter: libreport-2.1.11
cmdline: python /usr/libexec/byobu/include/select-session.py
executable: /usr/libexec/byobu/include/select-session.py
kernel: 3.12.8-300.fc20.x86_64
runlevel: unknown
type: Python
uid: 22482

Truncated backtrace:
select-session.py:66:get_sessions:TypeError: decode() argument 1 must be string, not None

Traceback (most recent call last):
  File "/usr/libexec/byobu/include/select-session.py", line 117, in <module>
    sessions = get_sessions()
  File "/usr/libexec/byobu/include/select-session.py", line 66, in get_sessions
    output = output.decode(sys.stdout.encoding)
TypeError: decode() argument 1 must be string, not None

Local variables in innermost frame:
i: 0
output: '1: 1 windows (created Fri Jan 31 13:59:36 2014) [88x141]\n'
sessions: []

Revision history for this message
In , Alois (alois-redhat-bugs) wrote :

Created attachment 857854
File: backtrace

Revision history for this message
In , Alois (alois-redhat-bugs) wrote :

Created attachment 857855
File: environ

Revision history for this message
In , Jan (jan-redhat-bugs) wrote :

Package byobu-5.73-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing byobu-5.73-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2757/byobu-5.73-1.fc20
then log in and leave karma (feedback).

Revision history for this message
In , Jan (jan-redhat-bugs) wrote :

please test and let me know

Revision history for this message
In , Jan (jan-redhat-bugs) wrote :

similar issue appears in other distributions, so the issue is raised to upstream (https://bugs.launchpad.net/byobu/+bug/1279533)

Revision history for this message
Jan Klepek (jan-klepek-gmail) wrote :

Description of problem:
I just ran `sh -c byobu` in Xfce via "Run..." (Alt+F2).

BTW I have instaled byobu just few moments ago and at the moment when it crashed I was running one session. (I wanted to access that using above command.)

Version-Release number of selected component:
byobu-5.69-2.fc20

Additional info:
reporter: libreport-2.1.11
cmdline: python /usr/libexec/byobu/include/select-session.py
executable: /usr/libexec/byobu/include/select-session.py
kernel: 3.12.8-300.fc20.x86_64
runlevel: unknown
type: Python
uid: 22482

Truncated backtrace:
select-session.py:66:get_sessions:TypeError: decode() argument 1 must be string, not None

Traceback (most recent call last):
  File "/usr/libexec/byobu/include/select-session.py", line 117, in <module>
    sessions = get_sessions()
  File "/usr/libexec/byobu/include/select-session.py", line 66, in get_sessions
    output = output.decode(sys.stdout.encoding)
TypeError: decode() argument 1 must be string, not None

Local variables in innermost frame:
i: 0
output: '1: 1 windows (created Fri Jan 31 13:59:36 2014) [88x141]\n'
sessions: []

System variables: https://bugzilla.redhat.com/attachment.cgi?id=857855

Revision history for this message
In , Alois (alois-redhat-bugs) wrote :

byobu-5.73-1.fc20 is now not available so I tried to simply update byobu and I got byobu-5.73-4.fc20.

However, the crash still happens.

Current reproducer is:

1. Start a byobu session in terminal
2. Press F6 to detach from the session
3. Press Alt+F2 and enter sh -c byobu
    * byobu crashes, taking down the existing session

This happens with one or two sessions in the background. However, if there are no sessions, step 3 shows no activity (not sure if this is OK).

Revision history for this message
In , Jan (jan-redhat-bugs) wrote :

well, this is quite a catch, when you start byobu with already existing sessions, it basically expects that you choose what session you would like to restore. However gnome shell does not offer any "window" where it will print such question and process will just hang (you can try to do it with "yes" command, when you run it from gnome shell (alt+f2), it keeps running and eating system resources and you do not see it's output anywhere. This is reason why this crashes, it is looking of encoding of stdout, however there is no stdout, so there is no encoding of stdout, I can fix that it will not crash, however that is not really solution, just workaround to stop crashing without fixing issue that you would not be able to start byobu this way.

Revision history for this message
Jan Klepek (jan-klepek-gmail) wrote :

well, this is quite a catch here, when I start byobu with already existing sessions, it basically expects that you choose what session you would like to restore.

However gnome shell does not offer any "window" where it will print such question and process will just hang.

This is reason why this crashes, it is looking of encoding of stdout, however there is no stdout, so there is no encoding of stdout, I can provide patch that it will not crash, however that is not really solution, just workaround to stop crashing without fixing issue that you would not be able to start byobu this way.

Dustin, what are plans to make byobu gnome-shell compatible? What is your opinion how this situation should be handled?

Changed in byobu:
importance: Undecided → High
status: New → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hi Jan,

Thanks for the triaging.

So I don't have a gnome-shell system (but, of course, I'd Byobu to work just as well under gnome-shell).

What is happening when you press Alt-F2 in gnome-shell? Does it know that byobu (or byobu-select-session) needs to actually run inside of a terminal application?

Changed in byobu:
status: In Progress → Incomplete
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

bzr commit -m '* usr/lib/byobu/include/select-session.py: LP: #1279533
  - quick hack to fix crashes when python can't figure out the encoding' --fixes 'lp:1279533'
Committing to: /local/media/src/byobu/byobu/
modified debian/changelog
modified usr/lib/byobu/include/select-session.py
Committed revision 2314.

Changed in byobu:
status: Incomplete → In Progress
status: In Progress → Fix Committed
Revision history for this message
In , Jan (jan-redhat-bugs) wrote :

i was reading gnome-shell manual today and i have found out:
Alt+F2 allows entering a command to launch an application. If you want to launch a shell command in a new Terminal window press Ctrl+Enter.

So basically, you should run command in new terminal window (Ctrl+Enter) instead of just "enter".
So from byobu side, there is nothing what we can do.

Revision history for this message
In , Alois (alois-redhat-bugs) wrote :

Thank you for your replies, Jan!

I was aware that this is not correct way to start terminal application or anything that uses or even depends on stdin/stdout/stderr.

What I think is a problem here that byobu crashes *and takes down* existing session instead of just not connecting to it. (Sorry, it's probably not clear from the report.)

So

> I can fix that it will not crash, however that is not really solution,
> just workaround to stop crashing without fixing issue that you would
> not be able to start byobu this way.

from my POV it is solution--if it also prevents killing of the existing session.

Changed in byobu:
status: Fix Committed → Fix Released
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 20 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Changed in fedora:
importance: Unknown → Undecided
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.