Menu

#644 Regression: system tray no longer works in latest version due to incorrect detection results

v4.8.0
closed-fixed
nobody
None
5
2018-01-13
2017-03-27
No

Environment where bug was seen:
DavMail 4.8.0 installed from DEB file on Ubuntu GNOME 16.04
GNOME Shell version 3.18.5

Before upgrading to the latest version, the system tray worked without issue on the exact same system running DavMail 4.7.3. After upgrading to 4.8.0, the system tray icon failed to appear at launch and I was unable to bring up the main GUI at all. I had to kill the java process manually in order to quit DavMail. Relaunching the program resulted in the same behavior. I even restarted the computer, yet the problem persisted. Downgrading again to 4.7.3 solved the problem.

SWT appears to be a dependency of the DEB package, and I verified that the SWT jar is indeed present after the 4.8.0 install. Despite that, the DavMail log seems to indicate that SWT can't be found. Here is the whole (short) log:

2017-03-26 14:25:47,953 DEBUG [main] davmail  - OS Name: Linux Java 
version: 1.8.0_121 64 System tray supported Current Desktop: GNOME
2017-03-26 14:25:49,046 INFO  [main] davmail  - SWT not available, 
fallback to JDK 1.6 system tray support
2017-03-26 14:25:49,340 DEBUG [CheckRelease] davmail.DavGateway  - 
DavMail released version: 4.8.0-2479

To troubleshoot further, I looked at the java commandline as displayed by "ps -ef" and verified that the classpath did actually contain an entry for the path where the SWT jar could be found on my system. I copied this whole commandline and tried running DavMail manually from the terminal with the same exact command, and I got this exception dumped to stderr:

Exception in thread "SWT" java.lang.Error: System tray not available
     at davmail.ui.tray.SwtGatewayTray$5.run(SwtGatewayTray.java:232)

So, it looks like the log message, "SWT not available," is a red herring, because SWT must have been loaded for DavMail to get far enough to throw this exception. The exception itself looks like it was introduced in the following commit, which suspiciously happened between version 4.8.0 and 4.7.3:
https://sourceforge.net/p/davmail/code/2448/

Considering that DavMail's system tray feature was working fine for me on 4.7.3, I think it's reasonable to conclude that there is something wrong with this new system tray availability detection code such that it is incorrectly detecting the system tray as not being available on my system.

Please let me know if there is any more information that I can provide. I have limited access to the system where I am seeing this bug (I support it but don't own it), but I'll do what I can.

Thanks.

Discussion

  • Mickael Guessant

    Indeed, I was trying to detect Unity with / without system tray...

    Can you please check again with davmail_4.8.0.3-2488-1_all.deb ?

     
  • Brett Keller

    Brett Keller - 2017-04-03

    I was finally able to test the new deb, and it did the trick! The system tray icon is now functioning in GNOME again.

    Thanks so much!

     
  • stupendousMan

    stupendousMan - 2017-04-18

    I have the same problem in Fedora. Could you please update the 64-bit tgz file to 2488? Thanks a lot.

     
  • Mickael Guessant

    • status: open --> closed-fixed
     
  • Mickael Guessant

    Fix available in latest release (4.8.2)

     

Log in to post a comment.

Monday.com Logo