Add apport hook for cheese

Bug #542091 reported by Vish
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cheese (Ubuntu)
Fix Released
Wishlist
Nigel Babu

Bug Description

Binary package hint: cheese

I'v noticed in several cheese package bugs that the users are asked to run commands in the terminal to gather information required for the developers to work on.

This is quite an unfriendly way for users .

Kindly implement apport hooks for cheese so that the apport collects the required information.

ProblemType: Bug
Architecture: i386
CheckboxSubmission: a488dc8580a64da042cc99114e54d55a
CheckboxSystem: 5484a8dd99f006173bd2ac53fa4837c2
Date: Fri Mar 19 23:56:27 2010
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha i386 (20091209)
Package: cheese 2.29.92-0ubuntu1
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-16.25-generic
SourcePackage: cheese
Uname: Linux 2.6.32-16-generic i686

Revision history for this message
Vish (vish) wrote :
Revision history for this message
Vish (vish) wrote :

Assigning to Nigel after discussing with him , as he is interested in getting this done

Changed in cheese (Ubuntu):
assignee: nobody → Nigel Babu (nigelbabu)
importance: Undecided → Wishlist
Nigel Babu (nigelbabu)
Changed in cheese (Ubuntu):
status: New → In Progress
Revision history for this message
Filippo Argiolas (fargiolas) wrote :

Nigel, if Vish forwarded you my mail, you should be working on fixing the cheese log.txt creation by now.
So, could you please open a bug for the cheese related part of this hook (i.e. the cheese.c print handler) in gnome bugzilla and attach your patch there? it would greatly speed up my review.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

Filippo, I was on the verge of asking more info about this. The thing is apport can call the GST_DEBUG=*cheese*:3 cheese -v on its own. So, for it to work in Ubuntu, I can do it without fixing bug buddy. And, I dont know enough of C to find the error (which is the main problem), I can try to fix buddy though after this.

Revision history for this message
Filippo Argiolas (fargiolas) wrote :

Ok, don't worry. Now that I think about it I'm not sure it makes so much sense to create a debug log file as we did. Enabling GST_DEBUG can really slow down the whole execution, writing all that stuff to a file would be even worse. I think I'll completely get rid of that log file.

The nice thing with that hook with bugbuddy was that you would get the debug stuff included in the stacktrace if cheese crashed. I really doubt that's possible with apport unless you change cheese to always start with debug enabled.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

I think apport can do that too I think, but I'm not sure. Please see https://wiki.ubuntu.com/Apport#Crash%20interception for details on that. I'm almost done with the hook, I'll attach it for review here and a copy of what it logs in my system.

Revision history for this message
Vish (vish) wrote :

Generated a test bug for the hook Bug #543591
It shows all the information collected when the debug is done.

Revision history for this message
Vish (vish) wrote :

Nigel, the log is attached as Cheese-Debug.log.gz ,
Could we just add it as Cheese-Debug.log , would be easier to read , than having to download ,extract and then reading it

Revision history for this message
Filippo Argiolas (fargiolas) wrote :

Also CheeseDebug (with no dash) seems to fit better the naming style used for the other logs.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

I've attached the hook I made. Can you just review UI for the hook and see if any corrections need to be made?

Revision history for this message
Filippo Argiolas (fargiolas) wrote :

Seems ok to me looking at the code.

Revision history for this message
Nigel Babu (nigelbabu) wrote :
Changed in cheese (Ubuntu):
status: In Progress → Triaged
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Thanks for working on this and help making Ubuntu better!

So, here are some feedback:
- do we have other apport hooks packages killing a process to rerun it into debug mode? That sounds a little bit touchy.
- if we do, I guess it will be good to check the return code of subprocess and abort if we can't kill it before going further.
- I guess "report["CheeseDebug.log"] = apport.hookutils.command_output(['env', 'GST_DEBUG=*cheese*:3', 'cheese', '-v'])" should be executed only in case of "response == 0", no?

Revision history for this message
Nigel Babu (nigelbabu) wrote :
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Hey Nigel.

Once I have adapted your patch to the last ubuntu version (and move the file from cheese package to cheese-common one, I got that error whatever option I choose:

hook /usr/share/apport/package-hooks//source_cheese.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport/report.py", line 636, in add_hooks_info
    symb['add_info'](self, ui)
  File "/usr/share/apport/package-hooks//source_cheese.py", line 13, in add_info
    report["HardwareInformation"] = apport.hookutils.attach_hardware(report)
  File "/usr/lib/python2.6/dist-packages/problem_report.py", line 500, in __setitem__
    and (hasattr(v[0], 'isalnum') or hasattr(v[0], 'read'))))
AssertionError

Care about fixing that?

Revision history for this message
Nigel Babu (nigelbabu) wrote :

This one is against the newest source and should address all the issues.

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

This bug was fixed in the package cheese - 2.30.0-0ubuntu2

---------------
cheese (2.30.0-0ubuntu2) lucid; urgency=low

  * debian/source_cheese.py:
    - Apport hook for cheese (lp: #542091)
  * debian/cheese-common.install:
    - Ship the new apport hook.
 -- Nigel Babu <email address hidden> Mon, 12 Apr 2010 20:00:53 +0530

Changed in cheese (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.