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 671872 - JS ERROR: !!! message = '"this._mainWindow is undefined"'
JS ERROR: !!! message = '"this._mainWindow is undefined"'
Status: RESOLVED NOTABUG
Product: gnome-documents
Classification: Core
Component: general
0.3.x
Other Linux
: Normal major
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-03-12 09:23 UTC by Michael Biebl
Modified: 2012-04-01 07:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Biebl 2012-03-12 09:23:20 UTC
Version: 0.3.91

I've installed all dependencies according to configure.ac, but when I run gnome-documents, I get 

$ gnome-documents 
    JS ERROR: !!!   Exception was: TypeError: this.application.add_action is not a function
    JS ERROR: !!!     lineNumber = '88'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-documents/js/application.js"'
    JS ERROR: !!!     stack = '"()@/usr/share/gnome-documents/js/application.js:88
([object _private_Gtk_Application])@/usr/share/gnome-documents/js/application.js:181
start()@/usr/share/gnome-documents/js/main.js:26
@<command line>:1
"'
    JS ERROR: !!!     message = '"this.application.add_action is not a function"'
    JS ERROR: !!!   Exception was: TypeError: this._mainWindow is undefined
    JS ERROR: !!!     lineNumber = '78'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-documents/js/application.js"'
    JS ERROR: !!!     stack = '"([object _private_Gtk_Application])@/usr/share/gnome-documents/js/application.js:78
([object _private_Gtk_Application],[object _private_Gio_ApplicationCommandLine])@/usr/share/gnome-documents/js/application.js:186
start()@/usr/share/gnome-documents/js/main.js:26
@<command line>:1
"'
    JS ERROR: !!!     message = '"this._mainWindow is undefined"'


I didn't see such an error with 0.2.x
Comment 1 Cosimo Cecchi 2012-03-12 15:20:06 UTC
(In reply to comment #0)
> Version: 0.3.91
> 
> I've installed all dependencies according to configure.ac, but when I run
> gnome-documents, I get 
> 
> $ gnome-documents 
>     JS ERROR: !!!   Exception was: TypeError: this.application.add_action is
> not a function

You don't have a recent enough GLib installed.
Keep in mind that you also need a recent gobject-introspection version having gir information for the new GLib methods. I bumped up the minimum gobject-introspection requirement in git master now to reflect this.
Comment 2 Michael Biebl 2012-03-12 15:22:24 UTC
I do have gobject-introspection 1.31.20 and glib 2.31.20
Comment 3 Cosimo Cecchi 2012-03-12 15:31:06 UTC
(In reply to comment #2)
> I do have gobject-introspection 1.31.20 and glib 2.31.20

Are you sure that's the introspection information that actually ends up being used by Documents?
We're just calling g_action_map_add_action() there, I don't see any reason why it would fail like that if you have the right introspection information installed (and it works fine here and everywhere else I tried).
Comment 4 Michael Biebl 2012-04-01 05:42:58 UTC
So I did a git bisect run and the fist failing commit is 
be80461d62df4c8cba33fb6e0ec9b0697658cf0b

I'm using glib 2.32.0 and gobject-introspection 1.32.0 now, which has been built against that glib version.

I still get that error, so I'd appreciate any help in tracking down the problem.

Is there anything I can test?
Comment 5 Michael Biebl 2012-04-01 07:15:34 UTC
I've checked again, and glib2.0 2.32.0 and gtk 3.4.0 had been built against gobject-introspection 1.31.20

After recompiling both against gobject-introspection 1.32.0, it seems to work fine now.