Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading a Qt5 program for the first time causes panel to go black #7

Closed
mcfadzgit opened this issue May 28, 2015 · 11 comments
Closed
Assignees
Labels

Comments

@mcfadzgit
Copy link

Am using fully upgraded Arch Linux with Openbox and the AUR package tint3-cpp-git-r743.7aed132-1-x86_64.pkg.tar.xz (but no compositor being used). Also, I'm using PCManFM to manage desktop icons and background. After a fresh login, tint3's panel looks as normal, but the first time I run a Qt5 program - such as qpdfview or sqlitebrowser (Arch packages) - the panel goes completely black. The tint3 process continues to run, but the only way I get my panel back is to kill the process and re-run tint3. Then when I run a Qt5 program again and again, everything seems as normal.
This effect does not seem to happen with Qt4 programs.
It's a strange problem, I know, but that's the best description I have of it for now!

@jmc-88 jmc-88 self-assigned this May 28, 2015
@jmc-88 jmc-88 added the bug label May 28, 2015
@jmc-88
Copy link
Owner

jmc-88 commented May 28, 2015

I've tried reproducing this issue, but I can't. I've set pcmanfm --desktop & in my OpenBox autostart file, disabled my compositor, and tried launching sqlitebrowser, and everything still seems to be working.

Have you tried:

  • running sqlitebrowser in a terminal, to see if it's producing any error message?
  • running a debug version of tint3 (-DCMAKE_BUILD_TYPE=Debug), and examined the contents of the produced /tmp/tint3.dbg log?

@mcfadzgit
Copy link
Author

Thanks for your swift reply - much appreciated.
I've now tried running sqlitebrowser and qpdfview from a terminal and they produce no messages when the tint3 panel goes black. Also, I added the debug as you suggested and the output just before and after the offending loading of sqlitebrowser was as follows:
....
tint3: nb monitor 1, nb monitor used 1, nb desktop 2
Setting panel items: LTSC
Area::DrawBackground -> draw background from (0, 0), 1440x26
task: " sqlitebrowser", desktop: 0, monitor: 0
Add task (desktop 0, task sqlitebrowser)
task: " tmp", desktop: 0, monitor: 0
Add task (desktop 0, task tmp)
Panel 0:
Panel(0x10bf858, kByLayout)
Launcher(0x10bfd10, kByContent)
LauncherIcon(0x1016410, kByContent)
LauncherIcon(0x101bc10, kByContent)
Taskbar(0x101a748, kByLayout)
Task(0x101ad00, kByLayout)
Task(0x101b280, kByLayout)
Taskbar(0x101a858, kByLayout)
Systraybar(0x759c40, kByContent)
Clock(0x10bfbc0, kByContent)
Area::DrawBackground -> draw background from (0, 0), 58x26
Area::DrawBackground -> draw background from (0, 0), 662x26
Area::DrawBackground -> draw background from (0, 0), 328x22
Area::DrawBackground -> draw background from (0, 0), 328x22
Area::DrawBackground -> draw background from (0, 0), 662x26
Area::DrawBackground -> draw background from (0, 0), 58x26
Area::DrawBackground -> draw background from (0, 0), 1440x26
Area::DrawBackground -> draw background from (0, 0), 1440x26
Area::DrawBackground -> draw background from (0, 0), 58x26
Area::DrawBackground -> draw background from (0, 0), 613x26
Area::DrawBackground -> draw background from (0, 0), 304x22
Area::DrawBackground -> draw background from (0, 0), 303x22
Area::DrawBackground -> draw background from (0, 0), 613x26
Area::DrawBackground -> draw background from (0, 0), 98x26
Area::DrawBackground -> draw background from (0, 0), 58x26
task: " DB Browser for SQLite", desktop: 0, monitor: 0
Add task (desktop 0, task DB Browser for SQLite)
Area::DrawBackground -> draw background from (0, 0), 202x22
Area::DrawBackground -> draw background from (0, 0), 202x22
Area::DrawBackground -> draw background from (0, 0), 201x22
Area::DrawBackground -> draw background from (0, 0), 202x22
Area::DrawBackground -> draw background from (0, 0), 201x22
Window desktop changed from 0 to 0
Area::DrawBackground -> draw background from (0, 0), 613x26
Area::DrawBackground -> draw background from (0, 0), 304x22
... etc

Nothing too interesting there?

@jmc-88
Copy link
Owner

jmc-88 commented May 29, 2015

No, nothing of great interest in that log. I've also tried replicating a similar setup on an Ubuntu Trusty system, still can't reproduce.

Unfortunately the error log for tint3 only goes to stderr for now, and doesn't get written to a file, which would be useful in such a case. You can maybe try running tint3 in your session such that stderr gets redirected to a file (tint3 2>/tmp/tint3.err) and see if anything interesting pops up there.

@mcfadzgit
Copy link
Author

Again to stress, it's only on the FIRST invocation of any Qt5 program after logon which causes the problem. Subsequent runs are fine after tint3 is restarted. (By the way, does tint3 support a re-read of the configuration as you could do with: killall -SIGUSR1 tint2 ?).

Here's the stderr output after I redirected it as you suggested:
NO XSETTINGS manager, tint3 use config 'launcher_icon_theme'.
Loading "oxygen". Icon theme: 'oxygen', 'hicolor', 'gnome',
tint3: pixmap background detection failed
launcher.c 211: Using icon /usr/share/pixmaps/whippet.png
launcher.c 211: Using icon /usr/local/share/icons/menu-icon_48.png
-> Xlib error (4): BadPixmap (invalid Pixmap parameter)
-> Xlib error (4): BadPixmap (invalid Pixmap parameter)
-> Xlib error (12): BadColor (invalid Colormap parameter)
NO XSETTINGS manager, tint3 use config 'launcher_icon_theme'.
Loading "oxygen". Icon theme: 'oxygen', 'hicolor', 'gnome',
-> Xlib error (13): BadGC (invalid GC parameter)
-> Xlib error (13): BadGC (invalid GC parameter)
-> Xlib error (13): BadGC (invalid GC parameter)
launcher.c 211: Using icon /usr/share/pixmaps/whippet.png
launcher.c 211: Using icon /usr/local/share/icons/menu-icon_48.png
-> Xlib error (13): BadGC (invalid GC parameter)
-> Xlib error (13): BadGC (invalid GC parameter)
... about 18 more times
WindowErrorHandler: BadGC (invalid GC parameter)
WindowErrorHandler: BadGC (invalid GC parameter)
-> Xlib error (3): BadWindow (invalid Window parameter)
-> Xlib error (13): BadGC (invalid GC parameter)
... about 18 more times
-> Xlib error (3): BadWindow (invalid Window parameter)
-> Xlib error (3): BadWindow (invalid Window parameter)
-> Xlib error (13): BadGC (invalid GC parameter)
... about 23 more times
-> Xlib error (9): BadDrawable (invalid Pixmap or Window parameter)
-> Xlib error (143): RenderBadPicture (invalid Picture parameter)
-> Xlib error (143): RenderBadPicture (invalid Picture parameter)
-> Xlib error (13): BadGC (invalid GC parameter)
-> Xlib error (13): BadGC (invalid GC parameter)
... many times thereafter

I am wondering whether this might be a Qt 5.4 issue (current Arch version) - there have been many reports of graphical glitches with it. For example, with KDE: https://bugs.archlinux.org/task/44083 (supposedly fixed with a new KDE release). Maybe Qt 5.5 will solve everything?! I think tint3 is a great project with very commendable aims, and hope that others will help you to test it out.

@jmc-88
Copy link
Owner

jmc-88 commented May 29, 2015

Those Xlib errors indicate that probably the issue is in tint3, not in Qt. But it might be a mixture of fails, who knows? :)

I'm going to try debugging it a bit more in the evening, and maybe trying to align more closely to your configuration (e.g., I see you're using launchers, while I usually don't -- if you could also attach your tint3rc it would be awesome).

P.S.: yes, tint3 also supports SIGUSR1 for restarting... unless I broke that too. :)

@mcfadzgit
Copy link
Author

Please find my tint3rc here (don't see how to attach a file to a GitHub issue comment):
http://pastebin.com/dzYBKfDh

I'm afraid 'killall -SIGUSR1 tint3' causes the panel to go black too - no matter when after logon.
Looked at the debug and stderr output and it was similar to previous.

@jmc-88
Copy link
Owner

jmc-88 commented May 30, 2015

I've committed some small fixes, which might address at least the SIGUSR1 case.
Can you try running a build at HEAD and see if it fixes?

@mcfadzgit
Copy link
Author

Bravo! It's looking good so far - both the loading of Qt5 programs and issuing SIGUSR1 seem to be working as expected. Will monitor further and let you know if any problems return.
Many thanks for working so promptly on these fixes.

@jmc-88
Copy link
Owner

jmc-88 commented May 30, 2015

Sweet! I'm going to close the issue then, but of course feel free to reopen it as needed (or to file a new one).

Thanks for the patient testing.

@jmc-88 jmc-88 closed this as completed May 30, 2015
@mcfadzgit
Copy link
Author

Sorry about not observing it before, but it seems there is an entrail of the above problem still lingering:

When I run Qpdfview immediately after logon, an icon in the system tray - usually that of the NetworkManager applet or Pasystray - gets duplicated, sometimes it also shows some graphical junk in the system tray. When I reload Tint3's configuration, or load Qpdfview later in the logon session, everything seems okay. (I also tried with sqlitebrowser - another Qt5 program - and it didn't cause the problem.)
Qpdfview definitely seems the worst culprit, for some reason.

Note: I had occasional problems with Tint2 duplicating icons too, but can't recall any special circumstances or programs involved. Again, reloading Tint2's configuration cleared the problem.

@jmc-88
Copy link
Owner

jmc-88 commented Jun 9, 2015

This looks like a problem with the systray, though, instead of the whole panel? Can you file it as a separate bug?

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

No branches or pull requests

2 participants