Bug 8258 - sb-menu freezes with an unknown TERM
: sb-menu freezes with an unknown TERM
Status: RESOLVED WONTFIX
Product: Development platform
SDK
: 5.0-final
: All Ubuntu
: Unspecified normal (vote)
: ---
Assigned To: Jussi Hakala
: sdk-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2010-01-19 11:31 UTC by Tomi Pieviläinen
Modified: 2010-10-25 17:55 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Tomi Pieviläinen (reporter) 2010-01-19 11:31:17 UTC
SOFTWARE VERSION:
Karmic Koala, latest SDK (released 2010-01-10)

EXACT STEPS LEADING TO PROBLEM: 

1. Open uxrvt (rxvt-unicode)
2. run 'scratchbox' to login in chroot
3. run sb-menu

EXPECTED OUTCOME:
Menu would appear, or there would be an error.

ACTUAL OUTCOME:
Script freezes, constantly taking some amount of CPU, until ctrl-c is pressed
or process is killed.

REPRODUCIBILITY:
always

EXTRA SOFTWARE INSTALLED:
N/A

OTHER COMMENTS:
The problem is the function handle_exit_code in sb_menu.py. It can only handle
user initiated cancels. In case of an error it tries to output more questions
with the dialog, which cannot succeed when error is in the dialog.

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7)
Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7
Comment 1 Marcell Lengyel maemo.org 2010-01-19 12:22:16 UTC
Scratchbox issue, Jussi, could you take a look?
Comment 2 Lucas Maneos 2010-03-17 03:01:10 UTC
Confirming.  To reproduce without rxvt: "TERM=foo sb-menu".  Strace shows it
run dialog which terminates with an "Error opening terminal: foo." message and
repeating ad infinitum.
Comment 3 Jussi Hakala 2010-05-25 17:50:26 UTC
I'll take a look.
Comment 4 Jussi Hakala 2010-05-26 12:46:52 UTC
Reproducable, and indeed the problem is in how handle_exit_code takes care of
things.

Unfortunately, if you use something like TERM=foo sb-menu, the dialog python
module will return DIALOG_CANCEL for unsuccessful dialog execution instead of
DIALOG_ERROR.

Just out of curiosity, can you run sb-menu from outside scratchbox?
Comment 5 Jussi Hakala 2010-10-25 17:55:51 UTC
This is unfortunately something that has to be fixed in the dialog itself.

I checked the latest version available in squeeze - the situation was the same.
Unless we can't separate the case of user pushing cancel and dialog actually
not displayed due to badly set TERM, sb-menu is bound to freeze.

However, TERMINFO_DIRS is now set from scratchbox 1.0.19 onwards, which should
solve the particular issue you're having.

If upgrading to scratchbox >= 1.0.19 doesn't solve your issue, reopen this bug.