_run_hook called with ui=None

Bug #1983481 reported by Jonathan Kamens
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Apport
Fix Released
Medium
Unassigned
apport (Ubuntu)
Fix Released
Medium
Unassigned
Jammy
New
Undecided
Unassigned

Bug Description

When totem crashes and I try to report the crash with ubuntu-bug, sometimes I get a stack trace:

jik@jik5:~$ ubuntu-bug /var/crash/_usr_bin_totem.1000.crash
ERROR: hook /usr/share/apport/package-hooks/source_totem.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 228, in _run_hook
    symb['add_info'](report, ui)
  File "/usr/share/apport/package-hooks/source_totem.py", line 9, in add_info
    response = ui.choice("How would you describe the issue?", ["The totem interface is not working correctly", "No sound is being played", "Some audio files or videos are not being played correctly"], False)
AttributeError: 'NoneType' object has no attribute 'choice'
jik@jik5:~$

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: totem-common 42.0-1ubuntu1
ProcVersionSignature: Ubuntu 5.15.0-43.46-generic 5.15.39
Uname: Linux 5.15.0-43-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Wed Aug 3 10:35:28 2022
InstallationDate: Installed on 2019-01-02 (1308 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
LogAlsaMixer:
 Simple mixer control 'Line',0
   Capabilities: cvolume cvolume-joined cswitch cswitch-joined
   Capture channels: Mono
   Limits: Capture 0 - 15
   Mono: Capture 15 [100%] [15.00dB] [on]
PackageArchitecture: all
SourcePackage: totem
UpgradeStatus: Upgraded to jammy on 2022-02-20 (163 days ago)

Revision history for this message
Jonathan Kamens (jik) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

When the development release of Ubuntu is being used crash reports are sent to Launchpad, while for stable releases of Ubuntu crash reports are sent to the Ubuntu Error Tracker (errors.ubuntu.com). In your /var/crash folder there should be a /var/crash/_usr_bin_totem.1000.uploaded file which will contain the unique identifier for the crash.

Revision history for this message
Jonathan Kamens (jik) wrote :

1) Your comment does not address the stack trace I am getting, shown above, from the apport script in totem-common.

2) The crash is not being uploaded successfully to the crash tracker either; see https://bugs.launchpad.net/ubuntu/+source/totem/+bug/1983294/comments/2 .

3) I understand that crashes are not reported automatically, but I believe when a crash is reported manually with ubuntu-bug as I'm doing it should go into Launchpad, which as I indicated above is not happening.

Revision history for this message
Brian Murray (brian-murray) wrote :

Your point regarding reporting crashes to Launchpad using ubuntu-bug for stable releases is tracked in this bug report:

https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1972115

affects: totem (Ubuntu) → apport (Ubuntu)
Revision history for this message
Benjamin Drung (bdrung) wrote :

Let untangle the different problem and make this bug report only about the stack trace. Bug #1983294 seems to be addressed and bug #1972115 will track the requested changed workflow.

description: updated
summary: - Can't report totem crash with ubuntu-bug
+ _run_hook called with ui=None
Revision history for this message
Benjamin Drung (bdrung) wrote :

From the stack trace it is clear that _run_hook was called with ui=None (which is wrong). The followed back the call to at least: Report.add_hooks_info -> Report._add_hooks_info -> _run_hook

Revision history for this message
Benjamin Drung (bdrung) wrote :

...and I could reproduce it:

```
totem&
killall -11 totem
ubuntu-bug /var/crash/_usr_bin_totem.1000.crash
```

Changed in apport (Ubuntu):
status: New → Triaged
Benjamin Drung (bdrung)
Changed in apport:
importance: Undecided → Medium
Changed in apport (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Benjamin Drung (bdrung) wrote :
Changed in apport:
status: New → Fix Committed
milestone: none → 2.23.0
Benjamin Drung (bdrung)
Changed in apport:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.23.0-0ubuntu1

---------------
apport (2.23.0-0ubuntu1) kinetic; urgency=medium

  * New upstream release:
    - apport-gtk:
      - Gracefully handle import failure of gi (LP: #1980561)
      - Catch AssertionError when importing Gdk (LP: #1980238)
    - data/apport:
      - Fix PermissionError for setuid programs inside container (LP: #1982487)
      - Fix reading from stdin inside containers (LP: #1982555)
    - apport-kde:
      - Fix inverse order of choices (LP: #1967965)
      - Import apport before usage (LP: #1980553)
      - Drop old workaround for bug in SIP destructor (LP: #1980553)
    - apport-unpack: Fix ValueError: ['separator'] has no binary content
      (LP: #1889443)
    - Fix _run_hook getting called with ui=None (LP: #1983481)
  * Refresh patches and drop backported patches
  * Fix pydocstyle and pylint complains in patches

 -- Benjamin Drung <email address hidden> Mon, 22 Aug 2022 22:31:55 +0200

Changed in apport (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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