FCR001 / cantata

Automatically exported from code.google.com/p/cantata
GNU General Public License v3.0
0 stars 0 forks source link

Notification area icon is blank #660

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of Cantata?

Git master head. (The release tarball download links don't seem to work, and 
there isn't one for 1.6.0, which seems to be released.)

Which build? KDE, Qt4, Qt5, Windows, Ubuntu, Mac?

Qt5 on Ubuntu 14.04.

What steps will reproduce the problem?
1. Build, install, run.
2. Configure to show notification area icon.
3. On my GNOME 3 desktop I use the TopIcons extension to display notification 
area icons, which works for a wide range of programs, including the Ubuntu 
14.04 package of Cantata 1.1.3.

What is the expected output? What do you see instead?

Expected: Cantata notification area icon.

Actual result: blank area where the icon should be. I can open the menu there 
as normal.

Please provide any additional information below.

I configured the build with:

cmake .. -DENABLE_QT5=ON -DCMAKE_INSTALL_PREFIX=/home/.local

Other programs that are installed under .local can find their own icons, e.g. 
gmpc, redshift, FontForge.

I tried to see if I could find any errors in my X session log. I found this:

QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap

amongst other lines that seemed to come from Cantata:

"Qt Warning: Compose file: "en_GB.UTF-8" can't be found" 
"Qt Warning - invalid keysym: circumflex" 
"Qt Warning - invalid keysym: circumflex" 
"Qt Warning - invalid keysym: pareleft" 
"Qt Warning - invalid keysym: _" 
"Qt Warning - invalid keysym: _" 
"Qt Warning - invalid keysym: KP_Subract" 
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
Window manager warning: Invalid WM_TRANSIENT_FOR window 0x2600002 specified for 
0x2600007 (Cantata Fi).
QSystemTrayIcon::setVisible: No Icon set
*** Error in `cantata': double free or corruption (fasttop): 0x0000000002051050 
***

I can't tell whether those are actually errors from Cantata, or whether they 
relate to the notification area icon, though!

Happy to help further, as I'd really like to get a recent version of Cantata 
running, because I have a Retina Macbook that really needs it!

Original issue reported on code.google.com by rrt@sc3d.org on 2 Apr 2015 at 3:12

GoogleCodeExporter commented 9 years ago
By the way, the integration with the GNOME 3 main menu works fine: I can see 
the media player control there (along with its small Cantata icon).

Original comment by rrt@sc3d.org on 2 Apr 2015 at 3:17

GoogleCodeExporter commented 9 years ago
I tried adding -DINSTALL_UBUNTU_ICONS=ON but that didn't make any difference 
(not least, it didn't install any additional icons, according to cmake).

Original comment by rrt@sc3d.org on 2 Apr 2015 at 3:32

GoogleCodeExporter commented 9 years ago
This would appear to be an issue on your system. Just tried under KDE 4.14.1 
with a KDE4 build, a pure Qt4, and a pure Qt5 build. All showed the icon in the 
KDE system tray. Under Unity, the tray icon is shown - but Qt5 5.3.0 (on Ubuntu 
14.10) still places the icon top-left, instead of the system tray.

Cantata uses the QSystemTrayIcon class to provide this feature. If it is not 
working then I'm guessing it is a Qt issue.

See Qt bugs:
https://bugreports.qt.io/browse/QTBUG-31762
https://bugreports.qt.io/browse/QTBUG-43859

"Error in `cantata': double free or corruption (fasttop):" does not sound to 
good though. But this is a different issue.

Original comment by craig.p....@gmail.com on 2 Apr 2015 at 4:46

GoogleCodeExporter commented 9 years ago
Thanks for your testing and feedback. As I said above, I'm using GNOME 3, not 
KDE or Unity. The two bugs you mention are fixed in Qt 5.2.0, and I'm using 
Ubuntu 14.04's packaging of 5.2.1, so they shouldn't be the problem.

I had a suspicion that the problem might be that some component cannot find the 
icons when the program is installed in my home directory, so I reinstalled the 
Ubuntu package of Cantata (which installs its icons in a system directory), and 
that fixed the problem: to be clear, I run the build of Cantata 1.5.50 which I 
installed in my home directory, and it now picks up the icons from Cantata 
1.1.x, installed from the Ubuntu package.

Does this help you find the underlying bug?

Original comment by rrt@sc3d.org on 2 Apr 2015 at 8:57

GoogleCodeExporter commented 9 years ago
Also, would you like me to look into the double free/corruption message? If so, 
what would you like me to do? I'm familiar with Valgrind, if that helps.

Original comment by rrt@sc3d.org on 2 Apr 2015 at 8:57

GoogleCodeExporter commented 9 years ago
Please checkout trunk (which will be 1.6.0) - should now be fixed.

As I said, Unity issue is still present in 5.3.0

As to the double free - whatever you want/can do would be fine. I'm not seeing 
it here. Try running in gdb, perhaps it might cause a crash? then you could 
show a stack trace.

Original comment by craig.p....@gmail.com on 3 Apr 2015 at 9:14

GoogleCodeExporter commented 9 years ago
Thanks for the fix. However, it seems it should apply to all platforms: the 
documentation for QIcon does not say that non-standard directories are searched 
on Mac OS X or Windows:

doc.qt.io/qt-5/qicon.html

For GNU/Linux users, there's an alternative fix (which may well help other 
apps), which is to append the install-data directory (typically, $prefix/share) 
to XDG_DATA_DIRS. It might be worth mentioning this.

On my system, this should not be necessary, as I installed under 
$XDG_DATA_HOME, which, according to the XDG Base Directory Specification, 
should be searched as well as $XDG_DATA_DIRS. That it is not appears to be a Qt 
bug (certainly, it's not mentioned in the QIcon documentation), so I've filed a 
bug:

https://bugreports.qt.io/browse/QTBUG-45394

Apologies for overlooking what you said about the positioning not working on Qt 
5.3.0 on Unity. I guess that's why it says it's fixed in 5.5.0 alpha as well as 
in 5.2.0?

Finally, I will investigate the double free and report in a separate bug if I 
get anywhere.

Original comment by rrt@sc3d.org on 3 Apr 2015 at 11:48

GoogleCodeExporter commented 9 years ago
No, the icon is installed into the bundled copy of oxygen for Windows and OSX, 
and Cantata already adds this path to the QIcon theme path - hence there is no 
issue here. It really is only Linux.

Original comment by craig.p....@gmail.com on 3 Apr 2015 at 3:04

GoogleCodeExporter commented 9 years ago
OK, thanks for the explanation. Also, I am curious to know why you didn't go 
with the shorter fix of adding the installation path with 
QIcon::setThemeSearchPaths?

Original comment by rrt@sc3d.org on 3 Apr 2015 at 8:46

GoogleCodeExporter commented 9 years ago
I tried, but it did not work. When Cantata installs its icons into 
$prefix/share/icons/hicolor it does not install an icon theme file. Normally 
/usr/share/icons/hicolor is used - and this has a index.theme file, so all is 
ok. But ~/.local/share/icons/hicolor does not - or at least does not on my 
system, as it was only Cantata installed there. Therefore, the QIcon theme 
loading did not work. As the only Cantata icon installed there is the app icon, 
it was easier to just add the files separately to the icon. For Windows/OSX, 
Cantata *does* install a index.theme file with its copy of oxygen.

At least, that's why I think r5719 did not work.

Original comment by craig.p....@gmail.com on 3 Apr 2015 at 9:04

GoogleCodeExporter commented 9 years ago
Thanks again.

Original comment by rrt@sc3d.org on 3 Apr 2015 at 9:05