After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683234 - Clicking city name gets white screen
Clicking city name gets white screen
Status: RESOLVED FIXED
Product: gnome-clocks
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Clocks maintainer(s)
Clocks maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-09-03 03:02 UTC by Jeremy Bicha
Modified: 2012-09-16 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix white screen when adding new clock (1.85 KB, patch)
2012-09-16 11:40 UTC, Maël Lavault
none Details | Review

Description Jeremy Bicha 2012-09-03 03:02:13 UTC
Clock 0.1.0 on Ubuntu 12.10 Alpha

1. Click New to add a new world clock.
2. Enter a city name, like Paris, France
3. After adding the city, click the city.

The first few times I tried this, the entire app screen turned white and the error below showed up on the terminal. Although you can't see the interface, if you can manage to click something that does work like London by guessing where it is, the UI comes back.

After a few times closing and reopening the app, the new cities managed to work.


Traceback (most recent call last):
  • File "/usr/lib/python2.7/dist-packages/gnomeclocks/app.py", line 99 in _on_show_standalone
    self.embed.spotlight(show_standalone_page)
  • File "/usr/lib/python2.7/dist-packages/gnomeclocks/widgets.py", line 454 in spotlight
    action()
  • File "/usr/lib/python2.7/dist-packages/gnomeclocks/app.py", line 94 in show_standalone_page
    self.toolbar.show_standalone_toolbar(widget)
  • File "/usr/lib/python2.7/dist-packages/gnomeclocks/app.py", line 305 in show_standalone_toolbar
    self.titleLabel.set_markup("<b>%s</b>" % self.standalone.get_name())
  • File "/usr/lib/python2.7/dist-packages/gnomeclocks/world.py", line 418 in get_name
    return GLib.markup_escape_text(self.location.get_city_name())
TypeError: glib.markup_escape_text() argument 1 must be string or read-only buffer, not None

Comment 1 Paolo Borelli 2012-09-03 09:39:45 UTC
I think this happens if we try to see the city before libgweather fetches the data: we need to fix this.
Comment 2 Maël Lavault 2012-09-10 20:50:43 UTC
This need UI design first. Do we darken the world clock and add a spinner on it the time for libgweather to fetch data ? 

Or must we wait to add the clock (but in this case, the user may think it's a bug because nothing happens)
Comment 3 Paolo Borelli 2012-09-10 21:28:45 UTC
I like the idea of the spinner, though it is still not clear to me how is it possible that we have fecthed the name that we display in the iconview, but not yet fetched the data for the standalone clock...
Comment 4 Maël Lavault 2012-09-12 20:43:34 UTC
Seems that names are fetched when searching the city in the new world clock dialog. That explain why the name is available but time, sunrise time and sunset time are not.
Comment 5 Paolo Borelli 2012-09-16 10:37:52 UTC
I noticed that this happens for newly added clocks, while it works for the clocks loaded at startup
Comment 6 Maël Lavault 2012-09-16 11:40:30 UTC
Created attachment 224443 [details] [review]
Fix white screen when adding new clock
Comment 7 Paolo Borelli 2012-09-16 14:04:47 UTC
After more investigation with Mael, it turns out that the problem is that we need to make sure te GWeather world does not get garbage collected.

I fixed it in git using a singleton