Bug 909657

Summary: [abrt] ccsm-0.8.4-10.fc18: Settings.py:1024:HandleModifierRemoved:UnboundLocalError: local variable 'new' referenced before assignment
Product: [Fedora] Fedora Reporter: Francesco Casula <fra.casula>
Component: libcompizconfigAssignee: Wolfgang Ulbrich <fedora>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:953155515cd2dc03096a6cdce59bd3d07aef7560
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-24 08:45:43 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
File: environ none

Description Francesco Casula 2013-02-10 08:35:32 UTC
Version-Release number of selected component:
ccsm-0.8.4-10.fc18

Additional info:
cmdline:        /usr/bin/python /usr/bin/ccsm
core_backtrace: 1bda7bcc8e79f97ecd533e6bbbf864043a6506ca 0x400 HandleModifierRemoved /usr/lib/python2.7/site-packages/ccm/Settings.py -
executable:     /usr/bin/ccsm
kernel:         3.7.6-201.fc18.x86_64
uid:            1000

Truncated backtrace:
Settings.py:1024:HandleModifierRemoved:UnboundLocalError: local variable 'new' referenced before assignment

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ccm/Settings.py", line 1024, in HandleModifierRemoved
    label.set_text (self.GetLabelText (new))
UnboundLocalError: local variable 'new' referenced before assignment

Local variables in innermost frame:
current: '<Primary>t'
selector: <ModifierSelector object at 0x1d850a0 (ccm+Widgets+ModifierSelector at 0x1f87600)>
modifier: 'Control'
self: <ccm.Settings.KeySetting object at 0x1ff1090>
label: <gtk.Label object at 0x1d850f0 (GtkLabel at 0x1976810)>

Comment 1 Francesco Casula 2013-02-10 08:35:36 UTC
Created attachment 695685 [details]
File: backtrace

Comment 2 Francesco Casula 2013-02-10 08:35:39 UTC
Created attachment 695686 [details]
File: environ

Comment 3 Francesco Casula 2013-02-10 08:41:03 UTC
on CompizConfig => Mate => Open as terminal, I'm trying to setting the <Ctrl><Alt>t shortcut but <Ctrl> was named as <Primary> and an error was generated (and the shortcut <Ctrl><Alt>t doesn't open a terminal)

Package: ccsm-0.8.4-10.fc18
OS Release: Fedora release 18 (Spherical Cow)

Comment 4 Wolfgang Ulbrich 2013-02-10 10:56:50 UTC
i can confirm that <Ctrl><Alt>t doesn't work, but no error was generated on my desktop with abrt.
Can you try another shortcut?
<super>t is working well.

Comment 5 Francesco Casula 2013-02-10 11:14:12 UTC
<Super>t and <Super><Alt>t works well.

Note: error spawns when I'm trying to set and unset the shortcut with various different combinations through the compizconfig

Comment 6 Wolfgang Ulbrich 2013-02-10 11:17:34 UTC
Ok, a shortcut with <Ctrl> doesn't work, but all other with <super>, <shift> and <alt> are working.

Yes, the error spawns also by for the same reason.

Comment 7 Wolfgang Ulbrich 2013-02-10 11:24:47 UTC
(In reply to comment #6)
> Ok, a shortcut with <Ctrl> doesn't work, but all other with <super>, <shift>
> and <alt> are working.
> 
> Yes, the error spawns also by for the same reason.

I meant 'by me'

Same happens on Unbuntu with compiz-0.9.x
https://bugs.launchpad.net/ubuntu/+source/compizconfig-settings-manager/+bug/899610

Comment 8 Wolfgang Ulbrich 2013-02-10 14:16:38 UTC
I add a patch to fix the isue for me.
The <Ctrl> is working now, but it displayed as <Primary>.
<Primary> come from a gnome change, but don't asked me why they did that...
Can you download and install new scratch builds for compiz and libcompizconfig for testing, and give feedback?
http://koji.fedoraproject.org/koji/taskinfo?taskID=4946331
http://koji.fedoraproject.org/koji/taskinfo?taskID=4946338

Thank you

Comment 9 Francesco Casula 2013-02-10 14:30:55 UTC
(In reply to comment #8)
> I add a patch to fix the isue for me.
> The <Ctrl> is working now, but it displayed as <Primary>.
> <Primary> come from a gnome change, but don't asked me why they did that...
> Can you download and install new scratch builds for compiz and
> libcompizconfig for testing, and give feedback?
> http://koji.fedoraproject.org/koji/taskinfo?taskID=4946331
> http://koji.fedoraproject.org/koji/taskinfo?taskID=4946338
> 
> Thank you

I've installed your patch and the shortcut doesn't work.
Now the behaviour is different... when I try to set the shortcut all appears to be correct, but exiting and reopening the compizconfig will point out that compiz has set the shortcut to: <Control><Primary><Alt>t.
So now there is no way to don't have <Control> and <Primary> together.

Thank you for your support and sorry for my english :)

Comment 10 Francesco Casula 2013-02-10 14:32:34 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > I add a patch to fix the isue for me.
> > The <Ctrl> is working now, but it displayed as <Primary>.
> > <Primary> come from a gnome change, but don't asked me why they did that...
> > Can you download and install new scratch builds for compiz and
> > libcompizconfig for testing, and give feedback?
> > http://koji.fedoraproject.org/koji/taskinfo?taskID=4946331
> > http://koji.fedoraproject.org/koji/taskinfo?taskID=4946338
> > 
> > Thank you
> 
> I've installed your patch and the shortcut doesn't work.
> Now the behaviour is different... when I try to set the shortcut all appears
> to be correct, but exiting and reopening the compizconfig will point out
> that compiz has set the shortcut to: <Control><Primary><Alt>t.
> So now there is no way to don't have <Control> and <Primary> together.
> 
> Thank you for your support and sorry for my english :)

After a reboot the issue is fixed with your patch but now in compizconfig window the shortcut field is blank.

Thank you again

Comment 11 Wolfgang Ulbrich 2013-02-10 18:03:09 UTC
I have reworked the patches.
http://koji.fedoraproject.org/koji/taskinfo?taskID=4946711
http://koji.fedoraproject.org/koji/taskinfo?taskID=4946716
In result after a restart it displayed only <Primary><Alt>t in ccsm in my installation.
I think this is a better solution than the confused impression <Control><Primary><Alt>t .
What do you think about this?

You have first to downgrade the packages to fedora repo's version and than install the new sources again.
At this point i restart compiz in result the control key is working, but displayed a blank field in ccsm.
But after a restart everthing is fine.

Please confirm.

Comment 12 Francesco Casula 2013-02-10 19:38:50 UTC
(In reply to comment #11)
> I think this is a better solution than the confused impression
> <Control><Primary><Alt>t .
> What do you think about this?

Yes, it is better.

(In reply to comment #11) 
> Please confirm.

I confirm, everything works fine but all the previous shortcuts with the CTRL key need to be reconfigured (like Desktop Wall), but I think it's right, not a bug.

Comment 13 Wolfgang Ulbrich 2013-02-11 00:36:45 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > I think this is a better solution than the confused impression
> > <Control><Primary><Alt>t .
> > What do you think about this?
> 
> Yes, it is better.
> 
> (In reply to comment #11) 
> > Please confirm.
> 
> I confirm, everything works fine but all the previous shortcuts with the
> CTRL key need to be reconfigured (like Desktop Wall), but I think it's
> right, not a bug.
thanks for the reminder to change the defaults of the plugins.
new scratch builds:
compiz
http://koji.fedoraproject.org/koji/taskinfo?taskID=4948178
compiz-plugins-main
http://koji.fedoraproject.org/koji/taskinfo?taskID=4948181
compiz-plugins-extra
http://koji.fedoraproject.org/koji/taskinfo?taskID=4948186
all shortcuts with <Control> are renamed to <Primary> now in ccsm.

feedback is welcome.

Comment 14 Francesco Casula 2013-02-11 17:59:45 UTC
Patch (In reply to comment #13)
> (In reply to comment #12)
> feedback is welcome.

Patch reinstalled and everything seems to work correctly.

Comment 15 Fedora Update System 2013-02-12 10:41:54 UTC
compiz-0.8.8-14.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/compiz-0.8.8-14.fc18

Comment 16 Fedora Update System 2013-02-12 10:44:17 UTC
libcompizconfig-0.8.8-6.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/libcompizconfig-0.8.8-6.fc18

Comment 17 Fedora Update System 2013-02-12 10:47:05 UTC
compiz-plugins-main-0.8.8-7.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/compiz-plugins-main-0.8.8-7.fc18

Comment 18 Fedora Update System 2013-02-12 10:48:55 UTC
compiz-plugins-extra-0.8.8-8.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/compiz-plugins-extra-0.8.8-8.fc18

Comment 19 Fedora Update System 2013-02-13 04:26:39 UTC
Package compiz-plugins-main-0.8.8-7.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing compiz-plugins-main-0.8.8-7.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-2353/compiz-plugins-main-0.8.8-7.fc18
then log in and leave karma (feedback).

Comment 20 Fedora Update System 2013-02-13 18:58:03 UTC
compiz-0.8.8-15.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/compiz-0.8.8-15.fc18

Comment 21 Fedora Update System 2013-02-19 14:08:30 UTC
ccsm-0.8.4-11.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/ccsm-0.8.4-11.fc18

Comment 22 Fedora Update System 2013-02-24 08:45:44 UTC
ccsm-0.8.4-11.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2013-02-24 08:49:26 UTC
compiz-plugins-extra-0.8.8-8.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2013-02-24 08:52:10 UTC
libcompizconfig-0.8.8-6.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2013-02-24 08:56:37 UTC
compiz-plugins-main-0.8.8-7.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.