crash reporter should squash errors while formatting the plugin list

Bug #488766 reported by Alberto Garcia (Factor Libre) on 2009-11-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Low
Unassigned
bzr (Ubuntu)
Low
Jelmer Vernooij

Bug Description

bzr: ERROR: bzrlib.errors.IllegalUseOfScopeReplacer: ScopeReplacer object 'QtCore' was used incorrectly: Object already cleaned up, did you assign it to another variable?: _factory

Traceback (most recent call last):
  File "/usr/bin/bzr", line 142, in <module>
    exit_val = bzrlib.commands.main()
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 1115, in main
    ret = run_bzr_catch_errors(argv)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 1127, in run_bzr_catch_errors
    return exception_to_return_code(run_bzr, argv)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 847, in exception_to_return_code
    exitcode = trace.report_exception(exc_info, sys.stderr)
  File "/usr/lib64/python2.6/site-packages/bzrlib/trace.py", line 452, in report_exception
    report_bug(exc_info, err_file)
  File "/usr/lib64/python2.6/site-packages/bzrlib/trace.py", line 485, in report_bug
    report_bug(exc_info, err_file)
  File "/usr/lib64/python2.6/site-packages/bzrlib/crash.py", line 55, in report_bug
    report_bug_legacy(exc_info, stderr)
  File "/usr/lib64/python2.6/site-packages/bzrlib/crash.py", line 72, in report_bug_legacy
    err_file.write(_format_plugin_list())
  File "/usr/lib64/python2.6/site-packages/bzrlib/crash.py", line 158, in _format_plugin_list
    (name, a_plugin.path(), a_plugin.__version__))
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugin.py", line 349, in path
    if getattr(self.module, '__path__', None) is not None:
  File "/usr/lib64/python2.6/site-packages/bzrlib/lazy_import.py", line 106, in __getattribute__
    obj = _replace()
  File "/usr/lib64/python2.6/site-packages/bzrlib/lazy_import.py", line 88, in _replace
    extra=e)
IllegalUseOfScopeReplacer: ScopeReplacer object 'QtCore' was used incorrectly: Object already cleaned up, did you assign it to another variable?: _factory

bzr 2.0.0 on python 2.6.0 (linux2)
arguments: ['/usr/bin/bzr', 'explorer']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'es_ES.UTF-8'
plugins:
  QtCore /usr/lib64/python2.6/site-packages/PyQt4/QtCore.so [unknown]
  QtGui /usr/lib64/python2.6/site-packages/PyQt4/QtGui.so [unknown]
  bzrdir /usr/lib64/python2.6/site-packages/bzrlib/bzrdir.py [unknown]
  bzrlib /usr/lib64/python2.6/site-packages/bzrlib [2.0.0]
  bzrtools /usr/lib64/python2.6/site-packages/bzrlib/plugins/bzrtools [1.14.0]
  checkout_dialog /usr/lib64/python2.6/site-packages/bzrlib/plugins/explorer/lib/checkout_dialog.py [unknown]
  debug /usr/lib64/python2.6/site-packages/bzrlib/debug.py [unknown]
  explorer /usr/lib64/python2.6/site-packages/bzrlib/plugins/explorer [0.8.2]
  gtk /usr/lib64/python2.6/site-packages/bzrlib/plugins/gtk [0.95.0.final.1]
  launchpad /usr/lib64/python2.6/site-packages/bzrlib/plugins/launchpad [2.0.0]
  lib /usr/lib64/python2.6/site-packages/bzrlib/plugins/lib [unknown]
  netrc_credential_store /usr/lib64/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.0.0]
  qbzr /usr/lib64/python2.6/site-packages/bzrlib/plugins/qbzr [0.11.0]
  sys <module 'sys' (built-in)> [2.6.0]
  tests /usr/lib64/python2.6/site-packages/bzrlib/plugins/tests [unknown]
  ui /usr/lib64/python2.6/site-packages/bzrlib/ui [unknown]
  widgets /usr/lib64/python2.6/site-packages/bzrlib/plugins/widgets [unknown]
  workspace_dialogs /usr/lib64/python2.6/site-packages/bzrlib/plugins/explorer/lib/workspace_dialogs.py [unknown]
  workspace_models /usr/lib64/python2.6/site-packages/bzrlib/plugins/explorer/lib/workspace_models.py [unknown]

Related branches

Hi,

This looks like some kind of installation problem with qbzr. It's strange that QtCore and QtGui are showing up on your list of bzr plugins - do you have BZR_PLUGIN_PATH set to something strange?

Do you have qbzr installed? If so, by what method did you install them?

summary: - execute bzr visualise or bzr explorer
+ IllegalUseOfScopeReplacer (QtCore) while formatting the plugin list
Changed in bzr:
status: New → Incomplete
Martin Pool (mbp) wrote :

Also - possibly the crash code should have an exception wrapper around attempts to interrogate plugins, in case they're already in a failing state.

How can i view the BZR_PLUGIN_PATH?

Yes I have installed Qbzr

Martin Pool (mbp) wrote :

echo $BZR_PLUGIN_PATH

This command not have values, get blank

Martin Pool (mbp) wrote :

I'd like to work out what underlying error is causing this. Could you try editing

  File "/usr/lib64/python2.6/site-packages/bzrlib/crash.py", line 72, in report_bug_legacy

to comment out format_plugin_list; hopefully then bzr will show the original error and that may give a clue. Otherwise, as I said in #2, we should just squash the exception I suppose.

Changed in bzr:
status: Incomplete → Confirmed
importance: Undecided → Low

I have reinstalled bazaar, I don't why. Now work well

I have put report_bug_legacy in line 72

For the moment work well

Thanks martin

Martin Pool (mbp) wrote :

OK, I'm glad it's working for you. I'm not surprised that reinstalling helped, though it would have been kind of nice to understand what was really going on.

I'll repurpose this bug to say we should report these situations better.

summary: - IllegalUseOfScopeReplacer (QtCore) while formatting the plugin list
+ crash reporter should squash errors while formatting the plugin list
tags: added: apport easy
Robert Collins (lifeless) wrote :

This is fixed as of rev 6426.

Changed in bzr:
status: Confirmed → Fix Committed
milestone: none → 2.6b2
Vincent Ladeuil (vila) on 2012-07-10
Changed in bzr:
status: Fix Committed → Fix Released
Jelmer Vernooij (jelmer) on 2012-07-11
Changed in bzr (Ubuntu):
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer) on 2012-07-20
Changed in bzr (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers