Genesis - a graphical frontend for SyncEvolution

Indicator Applet icon disappears in case of a sync error (hicolor)

Reported by baeza on 2011-01-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Genesis Sync
Low
Frederik Elwert

Bug Description

Genesis-sync icon disappears randomly (or unless is my first impression) from the Indicator-Applet. It is actually there, because I click in the area it is supposed to be and then I get a transparent square and the context menu pops-up. After choosing a synch process the icons appears (with the moving arrows) and after the synch it remains but after suspend or in the least expected moment (I still keep on investigating) the icon turns transparent!

baeza (baeza) on 2011-01-05
summary: - Icon dissepear randomly in Indicator Applet
+ Icon disappears randomly in Indicator Applet

Thanks for your report.

Could you please tell me which operating system and version you are running?

I have noticed the weirdest quirks with indicators on Ubuntu Lucid (mostly drawing errors), but never specifically the symptom you describe (nor specific to Genesis). Maybe we can find out some details. It might also be worth running Genesis from a terminal window with the -v switch and see if there is anything special when the icon disappears.

Changed in genesis-sync:
status: New → Incomplete
importance: Undecided → Low
baeza (baeza) wrote :

I use Ubuntu 10.10

Under some more testing, the icon disappears after resume from suspend. It appears again during any synch process; f.i. during automatic synchronization of SyncEvolution or forcing synch in context menu of Genesis-sync. The icons disappears again after other resume from suspend process.

Thanks for the information.

Does this only happen with Genesis? Or also with other indicators?

It might also be worth a try to see if it is specific to python-appindicator. Maybe you could try another app based on python-appindicator, e.g. http://jonls.dk/redshift/ ?

I don’t handle suspend/resume at all in Genesis, so I would assume that this is a bug in the underlying library. If I knew how to get information about resume, I could force the redraw of the icon, but I don’t know if there is a way to get this information from python.

baeza (baeza) wrote :

Just tested "Redshift". No problem after resume, the icon is there! ... Redshift icon, Genesis-syn is there but transparent or skimmed.

Thanks for the info.

This is still strange to me, because I cannot really explain why Genesis behaves differently than other apps.

I attached a patch that contains a potential workaround: It gets notification about resume from sleep from upower and redraws the icon.

Could you try the patch and tell me if it solves the issue for you? Since I don’t experience the bug, I’m unfortunately unable to test it. (I don’t know if you’re familiar with applying patches. You should just place the patch in the genesis-sync directory of the source distribution, apply it using "patch < genesis_redraw_after_resume.patch" and then run "bin/genesis-sync -v".)

Thanks.

Changed in genesis-sync:
status: Incomplete → In Progress
assignee: nobody → Frederik Elwert (frederik-elwert)
baeza (baeza) wrote :

Not familiar with patches, but will try! where is the directory to copy the patch file?

Just download the source package http://launchpad.net/genesis-sync/0.6/0.6.2/+download/genesis-sync_0.6.2.tar.gz and unpack it. Then copy the patch to the unpacked directory genesis-sync. After applying the patch, you can run bin/genesis-sync from the source package without installing it.

baeza (baeza) wrote :

Got this problem:

jose@jose-laptop:~/Descargas/genesis-sync/genesis_sync$ patch < genesis_redraw_after_resume.patch
patching file genesis-sync
Hunk #1 FAILED at 91.
Hunk #2 FAILED at 214.
2 out of 2 hunks FAILED -- saving rejects to file genesis-sync.rej

I’m sorry, I should have tried it by myself before giving instructions. You have to to into the bin directory, not the toplevel directory, in order for the patch to apply.

baeza (baeza) wrote :

Done. On loading the program in the terminal I got some warnings:
jose@jose-laptop:~/Descargas/genesis-sync/bin$ genesis-sync -v

** (genesis-sync:9236): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (genesis-sync:9236): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (genesis-sync:9236): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'
DEBUG:root:logging enabled
DEBUG:root:Server caps: {'ConfigChanged': True, 'GetConfigName': True, dbus.String(u'SessionAttach'): True, 'SessionFlags': True, 'Notifications': True, 'Version': True}

Thanks for the effort.

The warnings are perfectly normal. The first warnings come from the wnck library, so I can do nothing about it, but they don’t harm. The other output is just debug information.

Does the patch fix the icon after resume, though? In the terminal, there should be a debug message “resuming from sleep”, and hopefully the icon should be visible after that.

baeza (baeza) wrote :

Nope. After resume there is no debug message. It seems the resume event is not trapped by the patch.

I have activated "automatic synchronization" in SyncEvolution-ui. I am going to deactivate it and test. Tell you more things at night.

baeza (baeza) wrote :

Whoops! I tested the non-patched version!! Please forget comment #12.

baeza (baeza) wrote :

Tested: Yes, I got the message "DEBUG:root:Resuming from sleep" No, the icon did not appear!!!

Thanks for investing so much time and effort into investigating this issue. I have to confess I’m at my wits’ end. I’ll try to get some input from the appindicator developers, maybe there will be some ideas from that direction. Sorry I’m not able to do more at the moment.

baeza (baeza) wrote :

Ok. The bug is not so important as to commit suicide. Take into account that I don't do a fresh installation since ubuntu 7.04 ...

baeza (baeza) wrote :

More info:

If I switch off automatic synchro in Synce-ui, the icon is there after resume. It seems that when I resume from suspend, usually some hours later, syncevolution autosynch tries to synch, but the network connection is still down (wifi) so it shows an error message (sync error) and the icons dissapears.

Ah, that sounds interesting. I should find out why the error icon isn’t drawn. Maybe there is something I can do about it.

This just also reveals one weakness of SyncEvolution: It should detect the missing network connection and not even attempt to sync in this state. Genesis had this detection when it handled automatic syncing by itself, but since the autosync feature is in SyncEvolution core (which generally is a better idea), this is missing. IIRC, SE currently only supports ConMan, which is the network manager of Moblin/MeeGo, but not GNOME NetworkManager.

summary: - Icon disappears randomly in Indicator Applet
+ Indicator Applet icon disappears after resume from suspend in case of a
+ sync error

As I use your app since the first version, maybe the error icon has been erased or lost ... where should it be?

baeza (baeza) wrote :

I have checked that, actually, the error icon never appears, no matter there has been a resume-from-suspend or not!

Oh, I guess I found the issue. ;-)

You’re probably not using the Ubuntu default theme, are you? I just discovered that I never created an error icon for the hicolor theme. So that would explain why the icon disappears as soon as an error is encountered. If you could confirm this, the fix is pretty easy, I just have to create an appropriate icon.

So, normally the icon should be under /usr/share/hicolor/22x22/status/genesis-error.png—but you probably won’t find it there. ;-)

Sorry for the mess, seems to be a pretty simple issue, although triaging it was so tricky.

baeza (baeza) wrote :

Some icons are not present in the packet, e.g. in hicolor there is no genesis-error.png nor genesis-setup.png!

baeza (baeza) on 2011-01-14
summary: - Indicator Applet icon disappears after resume from suspend in case of a
- sync error
+ Indicator Applet icon disappears in case of a sync error (hicolor)

I just added an error icon, you can find it in the unstable ppa in a few minutes.[1] Could you try if it fixes the issue for you? (The built is for lucid, but it should work in maverick as well.)

The genesis-setup icon seems to be a leftover in the Humanity icon package, an old release of Genesis used it, but the new version doesn’t. It also isn’t in the ubuntu-mono icon packages, which are the most recent ones. I’ll remove it for the next version.

[1] https://launchpad.net/~genesis-devs/+archive/unstable

baeza (baeza) wrote :

I have just created 2 error icons for 22x22 and 24x24. Closed and reopen session, but no luck.

When you add the icons by hand, you also have to update the icon cache via gtk-update-icon-cache. The packages in the unstable PPA should handle this for you.

baeza (baeza) wrote :

gtk-update-icon-cache didn't help so I installed the 0.6.2-public3 version from unstable PPA.

Now it works perfect. There is no need for the patch to repaint icon after resume. Just check all icons in your next version ;)

You can close this bug!

Changed in genesis-sync:
status: In Progress → Fix Released

Thanks for the feedback and the work!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments