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 737818 - Gnome-weather does not work: Invalid object type `GWeatherLocationEntry'
Gnome-weather does not work: Invalid object type `GWeatherLocationEntry'
Status: RESOLVED FIXED
Product: gnome-weather
Classification: Applications
Component: general
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Weather Maintainer(s)
GNOME Weather Maintainer(s)
3.14.1
Depends on:
Blocks:
 
 
Reported: 2014-10-03 05:46 UTC by Ankur Sinha (FranciscoD)
Modified: 2014-10-06 19:41 UTC
See Also:
GNOME target: ---
GNOME version: 3.13/3.14


Attachments
Adapt to a GtkBuilder change (1.16 KB, patch)
2014-10-03 12:52 UTC, Matthias Clasen
rejected Details | Review
Same change in another place (1.06 KB, patch)
2014-10-03 13:07 UTC, Matthias Clasen
rejected Details | Review

Description Ankur Sinha (FranciscoD) 2014-10-03 05:46:07 UTC
Hi,

gnome-weather isn't working for me here. This is what I get:

[asinha@localhost  ~]$ gnome-weather 

(org.gnome.Weather.Application:10862): Gjs-WARNING **: JS ERROR: Gtk.BuilderError: Invalid object type `GWeatherLocationEntry' on line 2
MainWindow<._init@resource:///org/gnome/Weather/Application/js/app/window.js:57
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Application<._createWindow@resource:///org/gnome/Weather/Application/js/app/main.js:112
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Application<.vfunc_activate@resource:///org/gnome/Weather/Application/js/app/main.js:141
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
main@resource:///org/gnome/Weather/Application/js/app/main.js:154
run@resource:///org/gnome/gjs/modules/package.js:192
@/usr/bin/gnome-weather:6


According to Clocks, my location is "Luton, United Kingdom". I've rebooted to ensure all updates were applied, and the error still persists.

[asinha@localhost  ~]$ rpm -q gjs gnome-weather
gjs-1.42.0-1.fc21.x86_64
gnome-weather-3.14.0-1.fc21.noarch
Comment 1 Matthias Clasen 2014-10-03 12:52:01 UTC
Created attachment 287668 [details] [review]
Adapt to a GtkBuilder change

GtkBuilder relies on heuristics to guess the name of the
get_type function from a class name. Recently, these heuristics
were changed slightly to fix a few cases. Sadly, that makes it
get the GWeather... -> gweather... wrong.
To avoid guessing games, just specify the get_type function
explicitly in the ui file.
Comment 2 Matthias Clasen 2014-10-03 13:07:08 UTC
Created attachment 287670 [details] [review]
Same change in another place

This is not currently needed, since the class name will work
once the type is registered, but better avoid an ordering
dependency and just use the type-func here, too.
Comment 3 Matthias Clasen 2014-10-03 13:31:15 UTC
I'm reverting the heuristics changes in GTK+, but it might be a good idea to apply these patches anyway.
Comment 4 Ankur Sinha (FranciscoD) 2014-10-03 16:17:28 UTC
Kalev pushed an update to F21 with the gtk+ reversions and it fixes the issue. Thanks Matthias.
Comment 5 Giovanni Campagna 2014-10-06 19:41:44 UTC
I don't like using type-funcs in GtkBuilder, because they are a
lot less readable than the object names, they are inconsistent
with gtk+, and they rely on C details which should be invisible
in a JS app.
I pushed a different fix instead, which is to eagerly ensure
the type when the app is started up.