Bug 726252

Summary: [abrt] fslint-2.42-1.fc14: fslint-gui:1571:find_row_to_unselect:UnboundLocalError: local variable 'unselect_row' referenced before assignment
Product: [Fedora] Fedora Reporter: dweb98
Component: fslintAssignee: Pádraig Brady <p>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: pbrady, p
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:e16feaaa
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 21:32:57 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
File: backtrace
none
fslint corrupt mtime fix none

Description dweb98 2011-07-28 00:22:01 UTC
abrt version: 1.1.18
architecture: i686
cmdline: python /usr/bin/fslint-gui
component: fslint
executable: /usr/bin/fslint-gui
kernel: 2.6.35.13-92.fc14.i686
package: fslint-2.42-1.fc14
reason: fslint-gui:1571:find_row_to_unselect:UnboundLocalError: local variable 'unselect_row' referenced before assignment
release: Fedora release 14 (Laughlin)
time: 1311812434
uid: 500

backtrace
-----
fslint-gui:1571:find_row_to_unselect:UnboundLocalError: local variable 'unselect_row' referenced before assignment

Traceback (most recent call last):
  File "/usr/bin/fslint-gui", line 1544, in on_select_all_but_newest_in_each_group_activate
    self.on_select_all_but_one_in_each_group_activate("newest")
  File "/usr/bin/fslint-gui", line 1578, in on_select_all_but_one_in_each_group_activate
    unselect_row = find_row_to_unselect(clist, row, which)
  File "/usr/bin/fslint-gui", line 1571, in find_row_to_unselect
    return unselect_row
UnboundLocalError: local variable 'unselect_row' referenced before assignment

Local variables in innermost frame:
comp: <built-in function gt>
operator: <module 'operator' from '/usr/lib/python2.7/lib-dynload/operator.so'>
clist: <gtk.CList object at 0x9dfe3c4 (GtkCList at 0x9ec8250)>
which: 'newest'
mtime: -1.0
unselect_mtime: -1
row: 2876

How to reproduce
-----
1.Used Selecta all but newest from drop down list after a scan for duplicate files. 
2.Crash happened.
3.

Comment 1 dweb98 2011-07-28 00:22:03 UTC
Created attachment 515607 [details]
File: backtrace

Comment 2 Pádraig Brady 2011-07-28 10:20:36 UTC
This can happen if we get an mtime of -1 for all files,
which is strange to say the least. What file system is this?
Here is a patch to avoid the issue at least and provide some feedback.

http://code.google.com/p/fslint/source/detail?r=267

One of the files from the group at issue will be reported
by the above patch, and it would if you could paste the
output from the `stat` command for this file for comparison.

Comment 3 dweb98 2011-07-29 01:38:18 UTC
I was working with files on an Ext3 file system. I'm running Fslint in Fedora 14. But, I will note, that many of the files have been copied from an NTFS WinXP file system to one of the drives. I was working on files from two different drives, on the same local system. I went to the link for the Patch http://code.google.com/p/fslint/source/detail?r=267... But I don't see a way to install the Patch. Is this a Script that I need to run? Should I save the text as a .sh file and run it?

Don

Comment 4 Pádraig Brady 2011-07-29 14:59:14 UTC
Created attachment 515895 [details]
fslint corrupt mtime fix

Oops I presume one could download a patch from there.
You can apply the attached as root like:

patch < file-mtime.diff

And specify /usr/bin/fslint-gui when prompted for a file name.

You might need to fsck your ext3 file system if there are corrupt mtimes being returned, but it would be great if you could do as per comment #2 first.

Comment 5 dweb98 2011-08-02 03:10:28 UTC
Thanks for the clarification. I got the patch installed just fine. But the `stat` command is new to me and I don't know what parameters to ad to it. I was just guessing and got these errors... I'm pasting my command line output below. If you can give me the exact commands to run I will try again...

don@RedBlackBioStar FsLint info$ su
Password:
[root@RedBlackBioStar FsLint info]# patch < fslint-mtime.diff
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|Index: fslint-gui
|===================================================================
|--- fslint-gui (revision 266)
|+++ fslint-gui (revision 267)
--------------------------
File to patch: /usr/bin/fslint-gui
patching file /usr/bin/fslint-gui
Hunk #1 succeeded at 1562 (offset -1 lines).
Hunk #2 succeeded at 1577 (offset -1 lines).
[root@RedBlackBioStar FsLint info]# stat
stat: missing operand
Try `stat --help' for more information.
[root@RedBlackBioStar FsLint info]# `stat`
stat: missing operand
Try `stat --help' for more information.
[root@RedBlackBioStar FsLint info]#


Thanks,

Don

Comment 6 Pádraig Brady 2011-08-09 21:58:12 UTC
If the patched fslint reports an error, it will include a file name which you can pass to stat like: stat /path/to/file

Comment 7 dweb98 2011-08-11 03:40:43 UTC
Oh, ok then, mine installed with no errors. I haven't used Fslint again yet. But, I'll post again wen I do...

Don

Comment 8 Fedora End Of Life 2012-08-16 21:33:00 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping