Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

libappindicator mode broken #175

Closed
RalfJung opened this issue Apr 4, 2015 · 15 comments
Closed

libappindicator mode broken #175

RalfJung opened this issue Apr 4, 2015 · 15 comments
Labels

Comments

@RalfJung
Copy link

RalfJung commented Apr 4, 2015

When I install libappindicator, the tray icon functionality breaks completely:

  • After starting Thunderbird, when the main window is visible, clicking the tray icon does not hide the window
  • Closing the window results in the program quitting, with the following console output:
$ icedove

(process:18882): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
[calBackendLoader] Using libical backend at /usr/lib/icedove/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical.manifest
enigmail.js: Registered components
mimeVerify.jsm: module initialized
22:34:35.965 ERROR firetray.ChatStatusIcon Icon missing

(icedove:18882): Gtk-CRITICAL **: IA__gtk_status_icon_set_from_gicon: assertion 'GTK_IS_STATUS_ICON (status_icon)' failed
TypeError: this._mucs[norm].incomingMessage is not a function
22:34:54.444 ERROR firetray.FiretrayWindow unknown window while lookup
22:34:54.444 ERROR firetray.Window can't unregister unknown window null
22:34:54.561 ERROR firetray.ChatStatusIcon Icon missing

(icedove:18882): Gtk-CRITICAL **: IA__gtk_status_icon_set_from_gicon: assertion 'GTK_IS_STATUS_ICON (status_icon)' failed

I am using KDE 4.14.2.

@foudfou
Copy link
Owner

foudfou commented Apr 5, 2015

Hi, could you try with the latest build ?
And, if TB still fails, enable debug logs and send them to me ?

@RalfJung
Copy link
Author

RalfJung commented Apr 5, 2015

The self-built plugin does not even use appindicator mode, even though I had libappindicator3-dev installed during compilation.

@foudfou
Copy link
Owner

foudfou commented Apr 5, 2015

Right: libappindicator3 is meant as a fallback lib, because it brings a lot of limitations. But if you really want FireTray as an appindicator in kde4, then you'll have to patch modules/linux/FiretrayStatusIcon.jsm around line 55:

(desktop.name === 'kde' && desktop.ver > 4))) {
to
(desktop.name === 'kde'))) {

Hopefully we'll get enough debug info then.

@RalfJung
Copy link
Author

RalfJung commented Apr 5, 2015

Well, the X11-based icons behave really bad with Plasma: They often end up using the wrong size, and are either way larger or way smaller than their space in the tray.

What is the non-fallback appindicator lib? Or do you mean appindicator in general when you say it has too many limitations?

@foudfou
Copy link
Owner

foudfou commented Apr 5, 2015

FireTray uses GTK+ which currently uses X11 under the hood.
For environments which do not support X11 system tray icons anymore (Unity, Kde5), it also uses libappindicator3 as a fallback.
Compared to X11 icons, appindicators in general are limiting, and for FireTray in particular. This might be overcome by #143.

@RalfJung
Copy link
Author

RalfJung commented Apr 5, 2015

After enforcing libappindicator mode with the current master, the problems as described in the first post persist. I also only now noticed that the chat icon does not show up at all anymore. On stderr, I see:

18:38:9.317 ERROR firetray.ChatStatusIcon Icon missing

(icedove:12518): Gtk-CRITICAL **: IA__gtk_status_icon_set_from_gicon: assertion 'GTK_IS_STATUS_ICON (status_icon)' failed
TypeError: this._mucs[norm].incomingMessage is not a function
18:38:19.224 ERROR firetray.ChatStatusIcon Icon missing

(icedove:12518): Gtk-CRITICAL **: IA__gtk_status_icon_set_from_gicon: assertion 'GTK_IS_STATUS_ICON (status_icon)' failed
18:38:19.692 ERROR firetray.FiretrayWindow unknown window while lookup
18:38:19.692 ERROR firetray.Window can't unregister unknown window null
r@r-schnelltop:~/src/FireTray/src$ icedove 

(process:12684): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
[calBackendLoader] Using libical backend at /usr/lib/icedove/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical.manifest
enigmail.js: Registered components
mimeVerify.jsm: module initialized
18:38:27.166 ERROR firetray.ChatStatusIcon Icon missing

(icedove:12684): Gtk-CRITICAL **: IA__gtk_status_icon_set_from_gicon: assertion 'GTK_IS_STATUS_ICON (status_icon)' failed
TypeError: this._mucs[norm].incomingMessage is not a function
18:39:2.521 ERROR firetray.FiretrayWindow unknown window while lookup
18:39:2.521 ERROR firetray.Window can't unregister unknown window null
18:39:2.626 ERROR firetray.ChatStatusIcon Icon missing

Are that the debug logs you asked for?

@foudfou
Copy link
Owner

foudfou commented Apr 5, 2015

Almost: could you set the log level to debug in src/modules/logging.jsm:

const FIRETRAY_LOG_LEVEL = "All"; // "All" for debugging

@RalfJung
Copy link
Author

RalfJung commented Apr 5, 2015

$ make clean ; DEBUG=on make build
Removing build dirs: ../build-d122489*
Cleanup is done.
checking version consistency
checking loglevel
Makefile:205: recipe for target 'check_loglevel' failed
make: *** [check_loglevel] Error 1

EDIT: Oh, I see. I'm supposed to edit the thing in-place in ~/.thunderbird. Will do that.

@foudfou
Copy link
Owner

foudfou commented Apr 5, 2015

Oops, right, this is best changed in the uncompressed xpi:
~/.mozilla/firefox/YOUR_PROFILE.default/extensions/\{9533f794-00b4-4354-aa15-c2bbda6989f8\}/modules/logging.jsm
So build it with FIRETRAY_LOG_LEVEL = "Warn" and then modify it in the installed addon.

@RalfJung
Copy link
Author

RalfJung commented Apr 5, 2015

Okay, did that. I also set browser.dom.window.dump.enabled to true as described in the wiki.

I started Thunderbird, then clicked the tray icon once, and then hit the X in the window deco. I expected the window to hide on the first click, and same on the second click. Instead, nothing happened on first click, and the program quit on 2nd click.

$ icedove 

(process:14005): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
System JS : WARNING chrome://sieve/content/modules/overlays/SieveOverlay.jsm:58 - mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
System JS : WARNING resource://gre/modules/Preferences.jsm:378 - mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
[calBackendLoader] Using libical backend at /usr/lib/icedove/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical.manifest
enigmail.js: Registered components
System JS : WARNING resource://gre/components/steelApplication.js:783 - mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
mimeVerify.jsm: module initialized
JavaScript error: resource://firetray/linux/FiretrayChatStatusIcon.jsm, line 54: firetray.GtkIcons is undefined
19:9:16.350 ERROR firetray.ChatStatusIcon Icon missing

(icedove:14005): Gtk-CRITICAL **: IA__gtk_status_icon_set_from_gicon: assertion 'GTK_IS_STATUS_ICON (status_icon)' failed
TypeError: this._mucs[norm].incomingMessage is not a function
19:9:20.721 ERROR firetray.FiretrayWindow unknown window while lookup
19:9:20.721 ERROR firetray.Window can't unregister unknown window null
System JS : ERROR chrome://sieve/content/modules/overlays/SieveOverlayManager.jsm:403 - TypeError: SieveOverlayManager._imports[url] is undefined
19:9:20.822 ERROR firetray.ChatStatusIcon Icon missing

(icedove:14005): Gtk-CRITICAL **: IA__gtk_status_icon_set_from_gicon: assertion 'GTK_IS_STATUS_ICON (status_icon)' failed

@foudfou
Copy link
Owner

foudfou commented Apr 5, 2015

We'd need the DEBUG logs to see where exactly something goes wrong. Could you modify the definition of the log level in ~/.mozilla/firefox/YOUR_PROFILE.default/extensions/\{9533f794-00b4-4354-aa15-c2bbda6989f8\}/modules/logging.jsm to FIRETRAY_LOG_LEVEL = "All" ?

foudfou pushed a commit that referenced this issue Apr 6, 2015
@foudfou
Copy link
Owner

foudfou commented Apr 6, 2015

I've missed this line:

JavaScript error: resource://firetray/linux/FiretrayChatStatusIcon.jsm, line 54: firetray.GtkIcons is undefined

@RalfJung does it work for you with a627772 ?

@RalfJung
Copy link
Author

RalfJung commented Apr 7, 2015

(Please disregard my earlier, now deleted comment - I accidentally installed an old version of the plugin)

So things got better with that patch. The following changed:

  • The chat status icon appears, as normal X11-style tray icon, next to the appindicator-style "main" icon
  • Closing the Thunderbird window now correct keeps Thunderbird running in background

However, left-clicking on the tray icon to show/hide the Thunderbird window still does not work.

@foudfou
Copy link
Owner

foudfou commented Apr 7, 2015

Good. For AppIndicators, left-clicking on main the tray icon should show the popup menu (not show/hide) ...which doesn't work with libappindicator under KDE currently (see #130) :(

Otherwise, I just realized that the Chat icon should also be rendered as an Appindicator if libappindicator is used for the main icon... if that's even possible.
I'll create a separate issue for that.

Can this one be closed ?

@RalfJung
Copy link
Author

I have two remaining problems (click-to-show doesn't work, and chat icon doesn't work). But the latter has its own bug, the former you say is a KDE bug, then indeed there's nothing left to be tracked here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants