Bug 374211

Summary: Pirut crashes on package selection
Product: [Fedora] Fedora Reporter: Brennan Ashton <comphappy>
Component: pirutAssignee: Jeremy Katz <katzj>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: james.antill
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-12 16:03:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed temp patch for selection bug (w/ correct filename) none

Description Brennan Ashton 2007-11-10 01:50:43 UTC
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 06:29:51 UTC
+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 21:19:05 UTC
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 22:30:27 UTC
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-11 00:14:29 UTC
Created attachment 254121 [details]
proposed temp patch for selection bug (w/ correct filename)

Comment 5 Brennan Ashton 2007-11-11 00:25:15 UTC
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-11 00:28:31 UTC
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 16:03:11 UTC
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 ***