module (config.py) in python-speechd breaks python's help system

Bug #534190 reported by Geir Hauge
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
speech-dispatcher (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: speech-dispatcher

Release: Ubuntu 9.10
Version: python-speechd 0.6.7+git20090914~unofficial-0ubuntu4

When searching for modules in python's help system, it stops and requests user input when it reaches the modules provided by the python-speechd package.

Steps to reproduce:

1. Launch a python shell
2. In the python shell, run: help()
3. At the help prompt, search for any module. e.g.: modules foo
You'll get output like the following:

help> modules foo

Here is a list of matching modules. Enter any module name to get more help.

Speech Dispatcher configuration tool
Do you want to setup a completely new configuration? [yes] :
>

The expected behavior would be to get a list of matching modules, then be returned to the "help> " prompt

The culprit is /usr/share/pyshared/speechd_config/config.py with the following lines at the end of the file:

if __name__ == "__main__":
    sys.exit(main())
else:
    main()

main() should only be executed if __name__ == "__main__", so removing the else-clause should fix the problem, though I don't know if any parts of speechd expects that module to behave that way.

Revision history for this message
Geir Hauge (geir-hauge) wrote :
tags: added: patch
Revision history for this message
arky (arky) wrote :

On lucid the python shell crashes with ...

[ 755.703883] python[4762]: segfault at bf2dcf48 ip 00dd7caa sp bf2dcf4c error 6 in libc-2.11.1.so[d9b000+14d000]
[ 755.703978] Process 4762(python) has RLIMIT_CORE set to 0
[ 755.703980] Aborting core

tags: added: needs-reassignment
removed: patch
Revision history for this message
arky (arky) wrote :
tags: removed: needs-reassignment
Revision history for this message
arky (arky) wrote :

Valgrind after patching the file

Changed in speech-dispatcher (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 534190] Re: module (config.py) in python-speechd breaks python's help system

 affects ubuntu/speech-dispatcher
 status confirmed

Thanks for the bug. I can confirm this and will fix it shortly, along with some other package updates.

arky (arky)
Changed in speech-dispatcher (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Nigel Babu (nigelbabu) wrote :

I made a debdiff and tested, but did not work. Are you sure it works?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package speech-dispatcher - 0.6.8~unofficial~rc2-0ubuntu3

---------------
speech-dispatcher (0.6.8~unofficial~rc2-0ubuntu3) lucid; urgency=low

  * debian/patches/07_fix_broken_spdconf.dpatch: Fix broken spd-conf code, which
    caused spd-conf to be run whenever anyone tried to search for help about a
    python module. (LP: #534190)
 -- Luke Yelavich <email address hidden> Thu, 15 Apr 2010 10:39:49 +1000

Changed in speech-dispatcher (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Jason Conti (jconti) wrote :

This issue is not actually fixed in the above package, because debian/patches/07_fix_broken_spdconf.dpatch is never applied. 07_fix_broken_spdconf.dpatch needs to be appended to debian/patches/00list.

Revision history for this message
Boris Dušek (dusek) wrote :

Fix in 0.7-5ubuntu1 is working for this issue, but breaks spd-conf (it does not do anything) - the attached fix is what I consider a correct solution.

Revision history for this message
Boris Dušek (dusek) wrote :

Hello, I am sorry for not checking the 0.7-5ubuntu2 package after it mentioned this as being fixed. The package does not contain my fix that is needed, it simply removes the old fix. This affects Maverick. Natty already includes 0.7.1 where this is fixed.

Revision history for this message
Luke Yelavich (themuso) wrote :

Ok I'll grab the proper fix from git, and make a stable release update for speech-dispatcher to fix this bug properly. ot sure if I'll get to it this week, but hopefully by the end of next week.

 affects ubuntu/speech-dispatcher
 status triaged

Changed in speech-dispatcher (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Luke Yelavich (themuso) wrote :

Whoops, I shouldn't have changed that, meant to open a maverick task.

 affects ubuntu/speech-dispatcher
status fixreleased

Luke Yelavich (themuso)
Changed in speech-dispatcher (Ubuntu):
status: Triaged → Fix Released
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.