maemo.org Bugzilla – Bug 8258
sb-menu freezes with an unknown TERM
Last modified: 2010-10-25 17:55:51 UTC
You need to log in before you can comment on or make changes to this bug.
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
Scratchbox issue, Jussi, could you take a look?
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.
I'll take a look.
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?
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.