apport-bug exits with exit_success even if it fails

Bug #1023912 reported by Sergey "Shnatsel" Davidoff on 2012-07-12
This bug affects 5 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)

Bug Description

/usr/share/apport/apport-gtk, both when invoked directly and with apport-bug, exits with exit_success even if it fails to submit the report because the target package is unofficial. This blocks graceful fallback for third-party apps without custom hooks.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: apport 2.0.1-0ubuntu8
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
CrashReports: 600:0:122:125855:2012-07-05 19:52:02.745966000 +0400:2012-07-05 19:52:03.745966000 +0400:/var/crash/zramswap-enabler.0.crash
Date: Thu Jul 12 18:19:05 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120303)
PackageArchitecture: all
 PATH=(custom, no user)
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apport (Ubuntu):
status: New → Confirmed

Same is true for apport-cli.

Jarl (jarl-dk) wrote :

Same is also tru for apport-kde, it exists with the following output on console:
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted

and exit status (echo $?) is 1

mikhail-777 (wpr-oxym) wrote :

When it will be fixed?
These programs don't want to submit bug and bug additional information for third-party packages (e.g. for ubuntu-tweak):
1) ubuntu-bug
) apport-collect
3) apport-bug

mikhail-777 (wpr-oxym) wrote :

$ lsb_release -rd
Description: Ubuntu 12.04.1 LTS
Release: 12.04

Mikhail: your problem has nothing to do with this report, and can be fixed only in the apps. Please refer to foe additional info.

Evan (ev) on 2012-11-30
Changed in apport:
importance: Undecided → Low
status: New → Confirmed

I've fixed it by exiting with exit code 1 from the "check_unreportable" function that displays the error dialog. See linked branch.

I'm not sure if it's a good idea though, because the function is supposed to check only, not abort the whole thing (isn't it?). I've tried returning false from the "run_report_bug" function that calls "check_unreportable" and then returning false from all the places that call "run_report_bug" but the error handling is still not advanced enough to pick up even those errors and bail out, so I guess I'll quit poking around and leave this to somebody who's familiar with the codebase.

Martin Pitt (pitti) wrote :

I don't see an attached branch here, but indeed check_unreportable() should not exit the program. This needs to be passed down through the return values. Also, please keep in mind that /usr/share/apport/apport-gtk potentially process more than one report (and indeed this will happen a lot more often in the near future when we submit the "system level" reports in batches). So a single exit code does not tell you a lot.

Third party packages which want to integrate with Apport are much better off with shipping a proper package hook which adjusts the crash database.

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in apport (Ubuntu):
status: Confirmed → Incomplete

This issue has sat incomplete for more than 60 days now. I'm going to close it as invalid. Please feel free re-open if this is still an issue for you. Thank you.

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

Other bug subscribers