Bug 374211 - Pirut crashes on package selection
Pirut crashes on package selection
Status: CLOSED DUPLICATE of bug 336791
Product: Fedora
Classification: Fedora
Component: pirut (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-09 20:50 EST by Brennan Ashton
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-12 11:03:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed temp patch for selection bug (w/ correct filename) (461 bytes, patch)
2007-11-10 19:14 EST, Brennan Ashton
no flags Details | Diff

  None (edit)
Description Brennan Ashton 2007-11-09 20:50:43 EST
Description of problem:
When the GUI package manager is used, it sometimes crashes on component
selection at times.
Version-Release number of selected component (if applicable):
Fedora 8

How reproducible:
Select packages, seems to happen more if you use the space bar to select, but it
may be irrelevant, as I have had it fail just by clicking 

Steps to Reproduce:
1.Open Pirut
2.Select some packages until fails
3.
  
Actual results:
Crashes and closes leaves with a trace

Expected results:
Package selected

Additional info:
Exception
Component: pirut
Summary: TB91835f44 GroupSelector.py:211:_pkgToggled:TypeError:
GtkTreeModel.get_iter_from_string() argument 1 must be string, not tuple

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/pirut/GroupSelector.py", line 208, in
_rowToggle
    self._pkgToggled(None, path)
  File "/usr/lib/python2.5/site-packages/pirut/GroupSelector.py", line 211, in
_pkgToggled
    i = self.pkgstore.get_iter_from_string(path)
TypeError: GtkTreeModel.get_iter_from_string() argument 1 must be string, not tuple

Local variables in innermost frame:
path: (5,)
widget: None
self: <pirut.GroupSelector.OptionalPackageSelector instance at 0xa2b816c>
Comment 1 Aravind Seshadri 2007-11-10 01:29:51 EST
+1 same here. The crash happens when space bar is used.

Component: pirut
Summary: TB91835f44 GroupSelector.py:211:_pkgToggled:TypeError:
GtkTreeModel.get_iter_from_string() argument 1 must be string, not tuple

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/pirut/GroupSelector.py", line 208, in
_rowToggle
    self._pkgToggled(None, path)
  File "/usr/lib/python2.5/site-packages/pirut/GroupSelector.py", line 211, in
_pkgToggled
    i = self.pkgstore.get_iter_from_string(path)
TypeError: GtkTreeModel.get_iter_from_string() argument 1 must be string, not tuple

Local variables in innermost frame:
path: (3,)
widget: None
self: <pirut.GroupSelector.OptionalPackageSelector instance at 0xde3df0c>
Comment 2 Brennan Ashton 2007-11-10 16:19:05 EST
You must move into a customize view to make it happen. Does look like it is
space bar triggered
Comment 3 Brennan Ashton 2007-11-10 17:30:27 EST
I did some more debuging, i added pdb.set_trace() to line 211 of
/usr/lib/python2.5/site-packages/pirut/GroupSelector.py
after selecting (or deselecting) a optional package the trace that i added come up
When i ask for the value of path
p path 
i get
(0,) if i use the space bar
and
'0' if i use the mouse, on the same package
For ref the package i was using test select/deselect is the first one under
GNOME Desktop Environment (alacarte)
Comment 4 Brennan Ashton 2007-11-10 19:14:29 EST
Created attachment 254121 [details]
proposed temp patch for selection bug (w/ correct filename)
Comment 5 Brennan Ashton 2007-11-10 19:25:15 EST
Comment on attachment 254121 [details]
proposed temp patch for selection bug (w/ correct filename)

--- GroupSelector.py	    2007-11-10 15:51:38.000000000 -0800
+++ GroupSelector.py	2007-11-10 15:52:50.000000000 -0800
@@ -205,7 +205,8 @@
	 self.pkgstore.set_sort_column_id(1, gtk.SORT_ASCENDING)

     def _rowToggle(self, tree, path, col):
-	 self._pkgToggled(None, path)
+	 if isinstance(path,str):
+	     self._pkgToggled(None, path)

     def _pkgToggled(self, widget, path):
	 i = self.pkgstore.get_iter_from_string(path
Comment 6 Brennan Ashton 2007-11-10 19:28:31 EST
The patch hiddes the underlying problem of why (1,) is getting passed SOME TIMES
when '1' should be being passed. This just ignores any attempted selection that
is made that does not pass a correctly formated path.
Comment 7 Jeremy Katz 2007-11-12 11:03:11 EST
Whoops, I had fixed this and thought I had pushed a build but it appears that I
hadn't.  Will be fixed in an update in a day or three.

*** This bug has been marked as a duplicate of 336791 ***

Note You need to log in before you can comment on or make changes to this bug.