Repository: CDrummond/cantata

Issue #1291: Cantata hangs with QT_QPA_PLATFORMTHEME=qt5ct but cantata --platformtheme qt5ct works just fine
Created: 2018-05-27T09:44:46Z
Build type: Arch Linux package 2.3.0-2 and git clone as of noon yesterday
I upgraded my QT version from the 5.10.1-8 version to 5.11.0-1 version and cantata stopped working.
When I start up cantata I just get this pattern repeated in the error logs:
qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no

Empty filename passed to function
^ this line repeats about a thousand times and then stops ^
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::save: Painter not active

^ these lines then start and repeat without end ^
The Cantata window doesn't draw. A quick search online for similar error logs to leads me to believe there was a minor update in how QT is used and something is leading to something not being drawn.
When I delete the .config/cantata/cantata.config file, and start a new setup etc. Cantata strangely enough opens and works fine the first run if I tell it to use a "Basic single user setup" but fails to draw the window and prints the same error message the second time I open the newly-configured instance. Telling it to use a "Standard multi-user/server setup" yields the same error messages and no window the first time. I've connected to the mpd server on my machine just fine with gmpc so I don't think it's an mpd-side issue.

Duplicate issue #1301: Cantata 2.3.0 gives QWidget/QPainter errors on Manjaro Linux with Qt 5.11
Created: 2018-06-04T15:06:14Z
After my Manjaro Linux got updated to incorporate Qt 5.11 instead of 5.10 (their 2018-06-01 Stable Update), Cantata 2.3.0 does no longer function properly. Calling Cantata from a terminal yields the following error messages (abridged, it goes on and on):
cantata qt5ct: using qt5ct plugin qt5ct: D-Bus global menu: no QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::fillPath: Painter not active QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::save: Painter not active QPainter::setPen: Painter not active QPainter::setBrush: Painter not active QPainter::drawRects: Painter not active QPainter::restore: Unbalanced save/restore QPainter::save: Painter not active QPainter::setBrush: Painter not active QPainter::setPen: Painter not active QPainter::restore: Unbalanced save/restore QPainter::save: Painter not active QPainter::setPen: Painter not active QPainter::setBrush: Painter not active QPainter::drawRects: Painter not active QPainter::restore: Unbalanced save/restore QPainter::save: Painter not active QPainter::setBrush: Painter not active QPainter::setPen: Painter not active QPainter::restore: Unbalanced save/restore QPainter::save: Painter not active QPainter::setPen: Painter not active QPainter::setBrush: Painter not active QPainter::drawRects: Painter not active QPainter::restore: Unbalanced save/restore QPainter::save: Painter not active QPainter::setBrush: Painter not active QPainter::setPen: Painter not active QPainter::restore: Unbalanced save/restore QPainter::save: Painter not active QPainter::setPen: Painter not active QPainter::setBrush: Painter not active QPainter::drawRects: Painter not active QPainter::restore: Unbalanced save/restore QPainter::save: Painter not active QPainter::setBrush: Painter not active QPainter::setPen: Painter not active QPainter::restore: Unbalanced save/restore QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::setRenderHint: Painter must be active to set rendering hints 
I am sure it worked at the time when Manjaro had Qt 5.10. I am of course not sure at all whether the strange behavior is due to a failed implementation of Qt 5.11 in Manjaro, a failed Cantata in the Manjaro repository, or an issue with Qt 5.11 in Cantata itself. Thus I am submitting this issue report here.
I have posted this issue on the Manjaro Forum and asked for help, but to no avail yet. Links:
Post 1
Post 2
Post 3
Post 4
Post 5
These posts describe what I see. In short, Cantata's main window is not displayed, it is just a shadowy outline. But the tooltips show up for action buttons and songs in the playlist, I can hit those places on the "empty/transparent" window and invoke menus as well as play songs.
I would be very grateful for feedback regarding the potential source of the issue.
Manjaro is a Linux distro based on Arch Linux.
BTW: A heart-felt THANK YOU for Cantata, my go-to client for MPD !!!
Please excuse me for not having figured out yet how GitHub wants code inserts to be formatted - the paste was copied from the Linux terminal and looked okay during "Write" here.

Closing comment (2018-06-04T18:53:03Z): Looks the same as #1291  Can you update to git/master (which will be 2.3.1), and see if this fixes the issue?
If you can't update please try launching Cantata from the commandline as follows:
QT_QPA_PLATFORMTHEME=  cantata

Note there is a space after = and before cantata
Does this resolve the issue? If so, then it is fixed for 2.3.1