Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

MellowPlayer freezes briefly if you want to play a song or change the song. #128

Closed
ZeroDot1 opened this issue Oct 2, 2017 · 22 comments
Closed
Labels

Comments

@ZeroDot1
Copy link
Contributor

ZeroDot1 commented Oct 2, 2017

I noticed the MellowPlayer freezes during testing if you want to play a song or video, or if you want to switch to another song or video.
The freeze only happens when you press the play button and when you want to play a video on youtube.
I noticed it on Deezer and YouTube.

Tested on arch Linux, The cache was completely removed before the test, Otherwise, no changes were made and user scripts were not used.
Various log files: Logs.zip

The following settings were used for compiling:

cmake -DCMAKE_BUILD_TYPE=DebugRelWithDebInfo -DDEFAULT_THEME=MidnaDark -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib
make

I hope the information can help you find the problem.

@ColinDuquesnoy
Copy link
Owner

Can you check if the same freeze happens with qupzilla (another qtwebengine based browser).

Does it change anything if you compile with -DCMAKE_BUILD_TYPE=Release ?

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 2, 2017

I'm trying it out.

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 2, 2017

I've tested it, There's no problem with qupzilla,
Compiling with -DCMAKE_BUILD_TYPE=Release didn't help either, the error still occurs.

@ColinDuquesnoy
Copy link
Owner

Ok. Thank you for trying out. There is one last thing to test before I investigate this issue (which I don't seem to have): try with a qml web engine view (qupzilla is made with QtWidgets and Qml introduce another layer on top of web engine view widgets which might be the cause of these micro freezes).

To test this, do the following steps:

  1. Create a text file named main.qml with the below content:
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtWebEngine 1.5

ApplicationWindow {
    width: 1024
    height: 768
    visible: true
    
    WebEngineView {
        anchors.fill: parent
        url: "https://youtube.com"
    }
}
  1. Run the file with qmlscene (might be name qt5-qmlscene on Archlinux, I am not sure):
    qmlscene main.qml. This will start a minimal QML Web Engine Application that loads youtube.

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 3, 2017

I have tried, I get the following error message:

pacaur -Syy qt5-declarative

[user@A632-OS ~]$ qmlscene '/home/user/Schreibtisch/main.qml'
qt5ct: using qt5ct plugin
QGLXContext: Failed to create dummy context
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
[8295:8295:0100/000000.164199:ERROR:zygote_linux.cc(636)] Zygote could not fork: process_type renderer numfds 3 child_pid -1
[8295:8295:0100/000000.164833:ERROR:zygote_linux.cc(668)] write: Datenübergabe unterbrochen (broken pipe)
Abgebrochen (Speicherabzug geschrieben)

@ColinDuquesnoy
Copy link
Owner

Hmm weird, that works fine on SUSE. I know why it fails on your system (a C++ part is needed to execute QtWebEngine::initialize()). I guess SUSE patched qmlscene to do that... I'll need to provide you with a minimal CMake/C++/QML example. I'll try to do that on sunday (I'll be too busy until then).

Meanwhile, may I ask you to record a video that show the freezes? (Ideally start recording from the point where you start MellowPlayer).

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 4, 2017

I have created a video, when scrolling with the mouse, MellowPlayer doesn't react anymore, and the scrollbar can't be moved either.
It only takes a few seconds, then it works again, and when I play another title, exactly the same thing happens. I uploaded the video to Google Drive, here is the link:
https://drive.google.com/open?id=0BxK4dMpq7mr5Yk5NdWdzTjQ4VlU

@ColinDuquesnoy
Copy link
Owner

Thank you. The video helps, those are very serious freezes. It's unlikely that it come from QML WebEngineView.

I suspect this may come from the listening history database... May I ask you to backup the db ( mv ~/.local/share/MellowPlayer/MellowPlayer/history.db ~/.local/share/MellowPlayer/MellowPlayer/history.db.backup) and try again? If you don't see any freeze with a clean db, please attach the backed-up one here so that I can debug and fix the issue.

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 6, 2017

The history is empty, and freezing occurs when I delete the entire folder or when I delete history.db

sudo rm -rf '/home/user/.local/share/MellowPlayer'

mv ~/.local/share/MellowPlayer/MellowPlayer/history.db ~/.local/share/MellowPlayer/MellowPlayer/history.db.backup

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 6, 2017

I will reinstall the Qt components and test them again
pacaur -Syy --force qt5-quickcontrols2 qt5-quickcontrols qt5-declarative qt5-graphicaleffects qt5-webengine qt5-translations qt5-svg cmake git xorg-server-xvfb libnotify

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 6, 2017

The reinstallation of the Qt components didn't work, it is still freezing.
I am still trying the AppImage.

@ColinDuquesnoy
Copy link
Owner

Ok. I'll make you a small qml webengine example to check if this is a qt/qml issue. Maybe also try without any user script. And also check with the 3.0 release, maybe there is a regression.

Can you also post the output of inxi -F (https://www.archlinux.org/packages/community/any/inxi/)

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 6, 2017

inxi -F

System:    Host: A632-OS Kernel: 4.13.4-1-ARCH x86_64 bits: 64
           Desktop: Xfce 4.12.4 Distro: Antergos Linux
Machine:   Device: desktop Mobo: MSI model: 760GM-P23(FX) (MS-7641) v: 3.0 serial: N/A
           BIOS: American Megatrends v: V17.15 date: 04/28/2013
CPU:       Dual core AMD Athlon II X2 270 (-MCP-) cache: 2048 KB
           clock speeds: max: 3400 MHz 1: 3399 MHz 2: 3399 MHz
Graphics:  Card: NVIDIA GT215 [GeForce GT 240]
           Display Server: x11 (X.Org 1.19.3 ) driver: nvidia
           Resolution: [email protected]
           OpenGL: renderer: GeForce GT 240/PCIe/SSE2
           version: 3.3.0 NVIDIA 340.104
Audio:     Card-1 NVIDIA High Def. Audio Controller driver: snd_hda_intel
           Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA)
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.13.4-1-ARCH
Network:   Card: Realtek RTL8111/8168/8411 PCIE Gigabit Ethernet Controller
           driver: r8169
           IF: enp2s0 state: up speed: 1000 Mbps duplex: full
           mac: 44:8a:5b:68:2c:a4
Drives:    HDD Total Size: 1750.4GB (8.6% used)
           ID-1: /dev/sda model: ST1000DM003 size: 1000.2GB
           ID-2: /dev/sdb model: ST3250824AS size: 250.1GB
           ID-3: /dev/sdc model: WDC_WD5000AAKX size: 500.1GB
Partition: ID-1: / size: 450G used: 132G (31%) fs: ext4 dev: /dev/sdc2
           ID-2: /boot size: 243M used: 51M (23%) fs: ext4 dev: /dev/sdc1
           ID-3: swap-1 size: 8.41GB used: 0.00GB (0%)
           fs: swap dev: /dev/sdc5
Sensors:   System Temperatures: cpu: 31.5C mobo: N/A gpu: 54C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 154 Uptime: 2:05 Memory: 2034.3/16049.1MB
           Client: Shell (bash) inxi: 2.3.40 

Sorry, my computer is a little older, and it's certainly not the best.

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 6, 2017

The same problem also occurs when I use version 2.99.
Is it possible that my computer is broken and the problem occurs because of this?

@ColinDuquesnoy
Copy link
Owner

Is it possible that my computer is broken and the problem occurs because of this?

No I don't think so. Maybe the system is bricked for whatever reason or maybe this is due to a bad video driver (QML relies on OpenGL and require hardware accelerations to work well but if animations elsewhere in the application are fluid then it may not be the problem)

For how long do you have those issues? Could this be related to an NVIDIA driver update? What if you switch back to nouveau?

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 6, 2017

When I switch back to Nouveau, the system crashes because there is an error in Nouveau, the problem only occurs with a few cards.
I've noticed the problem since I described it.
At that time there were one or two updates of the NVIDIA driver.

@ColinDuquesnoy
Copy link
Owner

Have you tried to rollback those updates? (https://wiki.archlinux.org/index.php/Downgrading_packages might help)

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 6, 2017

Yes, I did, but it didn't work out.

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 6, 2017

https://wiki.archlinux.org/index.php/NVIDIA#Automatic_configuration
I'll try this, maybe it'll help.

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 6, 2017

sudo nvidia-xconfig

This is completely crazy, now it's fine, thanks a lot for the support, maybe we should add a note in the MellowPlayer wiki.

@ZeroDot1 ZeroDot1 closed this as completed Oct 6, 2017
@ColinDuquesnoy
Copy link
Owner

Ok, good to know.

maybe we should add a note in the wiki

This is a system issue, not related at all with MellowPlayer so I don't think it is necessary.

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Oct 6, 2017

OK, thank you :)

Linux and NVIDIA are not really good friends, there is definitely no NVIDIA card in my next computer.

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