excepthook in gtk_ui.py should write a crash report instead of calling ubuntu-bug

Bug #901381 reported by Brian Murray
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
High
Brian Murray

Bug Description

In ubiquity/frontend/gtk_ui.py apport-bug is called directly which causes a couple of issues:

1) the bug is tagged apport-bug and not apport-crash
2) apport bug patterns are not checked

I discovered this when looking at bug 901330 which was reported after I wrote the bug pattern for bug 850264. I tested the bug pattern and it does in fact match bug 901330 and the pattern is live on people.canonical.com.

I think instead that the excepthook should create a crash report file in /var/crash which then be picked up by apport.

Tags: patch

Related branches

Revision history for this message
Mario Limonciello (superm1) wrote :

Is the appropriate notifier that sets an inotify on /var/crash actually running in ubiquity-dm mode though? I think that needs to happen too for this type of change to work.

Revision history for this message
Martin Pitt (pitti) wrote :

@Brian: Yes, I think that makes sense. I think it should either re-raise the exception and let /usr/share/pyshared/apport_python_hook.py do its magic, or if that is inappropriate, import that module and call apport_excepthook() directly.

@Mario: that problem is bug 712677, it's on my list of things to look into for precise.

Revision history for this message
Martin Pitt (pitti) wrote :

Indeed this call happens in

    def excepthook(self, exctype, excvalue, exctb):

which has the exact same signature as apport_excepthook() (well, unsurprisingly, as both are standard Python exception handlers). So it would just need to import apport_python_hook and call apport_excepthook(exctype, excvalue, exctb).

Revision history for this message
Martin Pitt (pitti) wrote :

Note that this depends on bug 712677 get fixed first.

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

I have a patch for this that works - aside of the fact that update-notifier doesn't notify you of the crash because of bug 882147.

Changed in ubiquity (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
tags: added: patch
Revision history for this message
Martin Pitt (pitti) wrote :

Until a while ago, ubiquity did not call apport any more, so we rather had the opposite problem of the apport GUI not appearing in only-ubiquity mode. I fixed that recently, see bug 712677.

The current code calls

  self.previous_excepthook(exctype, excvalue, exctb)

which is the apport one if apport is installed. So I think this is fixed now.

Changed in ubiquity (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

Apport isn't called in the "Try Ubuntu", maybe-ubiquity, case though as update-notifier isn't work due to overlayfs not supporting inotify as I mentioned in comment #5.

Changed in ubiquity (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.9.17

---------------
ubiquity (2.9.17) precise; urgency=low

  [ Colin Watson ]
  * Don't display "Ready when you are..." when the installer isn't actually
    waiting for user actions.
  * When waiting for user actions, just hide the progress bar and associated
    widgets rather than displaying "Ready when you are...", to avoid
    confusion associated with a progress bar being displayed when the system
    is in fact waiting for user input (LP: #670409, #925427).
  * Mark file descriptors used for communication with parted_server
    FD_CLOEXEC.
  * Restore finish-install's title after installing the oem-config frontend
    (LP: #925155).
  * Avoid duplicate call to osextras.find_on_path('check-language-support').
  * Stop filtering warnings from the apt module which are no longer emitted.
  * PEP-8 import ordering.
  * Make the "Choose a picture" page translatable (LP: #892384).
  * Make the "run all pending GTK events" function accessible from
    ubiquity.gtkwidgets, and use it in the test suite. This makes the test
    suite about four seconds faster.
  * Fix sys.path mishandling in test suite.
  * Mark WPA2-only access points as secure.
  * Add initial tests for wireless page.
  * Automatic update of included source packages: choose-mirror 2.39ubuntu3,
    netcfg 1.68ubuntu11.

  [ Brian Murray ]
  * ubiquity/gtk_ui.py: in the crash handler also call apport directly if in
    the maybe-ubiquity mode (LP: #901381)
 -- Colin Watson <email address hidden> Fri, 10 Feb 2012 17:27:15 +0000

Changed in ubiquity (Ubuntu):
status: In Progress → 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.