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

GUI Freezes During Copy To Device (transcode) #2806

Open
Clementine-Issue-Importer opened this issue Dec 11, 2013 · 32 comments
Open

GUI Freezes During Copy To Device (transcode) #2806

Clementine-Issue-Importer opened this issue Dec 11, 2013 · 32 comments

Comments

@Clementine-Issue-Importer

From cclonch on March 14, 2012 14:50:18

What steps will reproduce the problem? 1. Launch Clementine.
2. From Devices > double click on device to open it.
3. From Library > right click on album > Copy to device... What is the expected output? What do you see instead? I would expect the interface continues to function while transcoding happens in background. Instead, usually around 3-5% completion, the whole interface freezes and becomes unresponsive. Any song currently playing will finish playing but the next song in the playlist will not play.

Launching Clementine from the command line, I can see that the transcode job continues to run so it is just the interface that is frozen. After transcoding concludes, the interface remains frozen and unresponsive. What version of the product are you using? On what operating system? Clementine v1.0.1 running on Fedora 16, 32-bit Please provide any additional information below. Transcoding from FLAC to Ogg Vorbis, q 6. FLAC songs are located on a NAS shared by CIFS that is locally mounted. Device is an HTC Droid Incredible 2.

Attachment: CopyToDeviceLog.txt

Original issue: http://code.google.com/p/clementine-player/issues/detail?id=2806

@Clementine-Issue-Importer
Copy link
Author

From cclonch on March 15, 2012 07:41:05

I've attempted to use gdb and strace but neither reveal any useful information on what is happening. If anyone has ideas I'll be happy to try them.

@Clementine-Issue-Importer
Copy link
Author

From domenico...@gmail.com on April 21, 2012 06:06:26

i have the same problem, interface freezes at 48% , files are well transcoded ( mp3 ).

Clementine v0.7 / 1 / lest dev , running on mint linux 12, 32-bit

@Clementine-Issue-Importer
Copy link
Author

From cclonch on April 21, 2012 06:16:09

I can also confirm this happens on my home PC:

$ uname -a
Linux darth 3.3.2-1-ARCH #1 SMP PREEMPT Sat Apr 14 10:08:43 UTC 2012 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD GNU/Linux

At home I have a similar setup with the FLAC files located on a NAS shared by CIFS which is locally mounted. When I get some time, I'll test NAS vs locally stored and CIFS vs NFS.

@Clementine-Issue-Importer
Copy link
Author

From vassie on July 05, 2012 01:06:19

Same happens to me too using Kubuntu 12.04 (x64) and Clemetine 1.0.1 and also Clementine 1.0.1-523-gc57f588

@Clementine-Issue-Importer
Copy link
Author

From ishmay...@pptwars.net on July 09, 2012 21:58:50

I have the same problem on Kubuntu 12.4 with Clementine 1.0.1 transcoding FLAC to MP3 onto an SD card. At first I thought it was a defective medium, but I've gotten the same result with several different cards.
Mine also seems to freeze at 48%. Files seems to be transcoded fully.

@Clementine-Issue-Importer
Copy link
Author

From cclonch on July 15, 2012 11:35:45

This doesn't seem to affect Windows. Using Clementine 1.0.1 on Windows XP SP3, I was able to successfully transcode single albums and multiple albums several times without the GUI freezing. This was using the same NAS share as my home Linux desktop is connected to.

@Clementine-Issue-Importer
Copy link
Author

From domenico...@gmail.com on July 21, 2012 06:52:20

this bug not affect windows, only linux

only when option : "convert all music" is active in device/properties/file format ( with mp3 or ogg )

it appeared when i use standard USB mp3 player or sd card, i haven't ipod.

@Clementine-Issue-Importer
Copy link
Author

From xsd...@gmail.com on July 23, 2012 21:10:24

This affects me too, running Clementine 1.0.1 on Ubuntu 12.04. When converting from Ogg to MP3 as part of the process of transferring files to a first(?) generation iPod Nano, Clementine freezes at 49% and requires the computer to be restarted before it starts responding again. The songs appear in the iPod's list, but can't be played. However, when attached to the computer, the songs can be played through Clementine.

As per #7, when the "convert all music" option is unchecked, it transfers music without problems. However, it doesn't warn if the files being transferred are incompatible, so beware!

Work around:

  1. Uncheck the "convert all music" option (thanks Notification area pop-up does not disappear in Win 7 #7!).
  2. Transcode the files into the appropriate format
  3. Transfer them across to the device.

@Clementine-Issue-Importer
Copy link
Author

From makov...@gmail.com on October 14, 2012 17:03:08

Looks like calling

g_source_remove(finished_event->state_->bus_callback_id_);

in other thread than main will mess up the GUI event loop. The attached patch works around this by moving the Organise::ProcessSomeFiles event loop between the threads when transcoding is about to be started.

Attachment: organize-move-thread.diff

@Clementine-Issue-Importer
Copy link
Author

From makov...@gmail.com on October 15, 2012 00:51:26

The above patch still doesn't work for multiple files for some reason. I ended up disabling the separate thread in Organise altogether.

Attachment: organise-remove-thread.diff

@Clementine-Issue-Importer
Copy link
Author

From makov...@gmail.com on October 15, 2012 14:52:19

This patch launches file copying in separate threads, avoiding GUI stalls, and should perform the same as the current code, while fixing the freeze after copying.

Attachment: 0001-organise-launch-transcoding-pipelines-from-the-main-.patch

@Clementine-Issue-Importer
Copy link
Author

From stephane...@gmail.com on November 09, 2012 03:42:28

This patch does not work for me in clementine 1.1.0.

@Clementine-Issue-Importer
Copy link
Author

From cclonch on November 09, 2012 11:09:31

This still bites me running Clementine 1.1.0 on Fedora 17 32bit. Haven't tried the patch yet, but given #13, I suspect it will not apply cleanly anymore.

@Clementine-Issue-Importer
Copy link
Author

From makov...@gmail.com on November 09, 2012 11:13:18

In git, the patch rebased to current master without any problems, so I suppose it still applies cleanly.

Regarding #13, knowing what exactly doesn't work would be nice (eg. same GUI lockup as before, or conversion doesn't work at all etc.)

@Clementine-Issue-Importer
Copy link
Author

From stephane...@gmail.com on November 10, 2012 18:16:21

The patch apply on version 1.1.0, but I still get a GUI lockup when I copy an album (mp3 files) on my ipod touch.

@Clementine-Issue-Importer
Copy link
Author

From noise.no...@gmail.com on December 25, 2012 00:15:55

I have the same problem transcoding song to ogg, I'm using clementine 1.1.1 under archlinux 32bits

@Clementine-Issue-Importer
Copy link
Author

From cclonch on January 30, 2013 06:21:17

Finally getting around to trying the patch.. This is on a Fedora 17 32bit (3.7.3-101.fc17.i686) box:

Still have problems transcoding using unpatched current git master (1.1.1-336-g90803fa); running from commandline and you can note the freeze occurring when the first transcode job finishes and the next is started up. This accounts for the varying percentage outputted to the GUI.

Applying makovick's patch from #11 against 1.1.1-336-g90803fa and the problem is resolved! I do note an error message output to the commandline:

09:13:02.588 DEBUG Organise:133 This file has already been transcoded
09:13:02.589 ERROR Organise:183 Copy "/tmp/qt_temp.X18895-14"
09:13:02.880 DEBUG Organise:85 Waiting for transcoding jobs

However, this is not affecting the transcode nor the coping of the new file to the target device.

+davidsansome, +john.maguire please apply this patch!

@Clementine-Issue-Importer
Copy link
Author

From scott.th...@gmail.com on February 09, 2013 04:29:55

I've applied the patch (comment #11) to build 1.1.1.349 on Ubuntu 12.10 and at least it transcodes/copies now without the software "freezing".

Minor problem remains with the percentage progress indicator being out of whack - goes to 200% if all files need transcoding before copying.

Suspect the software counts the transcode and the copy - copy will always contribute 100%, and transcode will contribute as much as the proportion of files that need transcoding. That's a bug but not as bad as not transcoding during copy.

Also, issue 803 sounds like a duplicate of this problem.

@Clementine-Issue-Importer
Copy link
Author

From john.maguire on February 09, 2013 04:50:42

Issue 2811 has been merged into this issue.

@Clementine-Issue-Importer
Copy link
Author

From davidsansome on February 16, 2013 20:17:19

Issue 3495 has been merged into this issue.

@Clementine-Issue-Importer
Copy link
Author

From davidsansome on February 16, 2013 20:42:30

The patch in #11 doesn't look very robust:

  • You're starting and stopping a thread for each file to be copied, this is expensive.
  • It looks like there could be a race between start() and isRunning() of the next loop iteration.
  • I don't member variables being accessed by multiple threads, you should pass data to CopyFile() with a closure instead.
  • The copy_thread_ is never deleted, so it will leak when the Organise is destroyed.

Anyway it looks like this is just working around the actual problem which is that the g_source_remove is probably removing the source from the wrong event loop. I'd rather you investigate how the default GMainContext is being set in the transcoder thread (see http://developer.gnome.org/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default ), and make sure sources are being added to and running in the correct threads..

@Clementine-Issue-Importer
Copy link
Author

From r.nikh...@gmail.com on June 15, 2013 08:41:36

I am experiencing this issue as well. I am running Clementine version 1.1.1~precise on an Ubuntu 12.04.2 laptop install (64 bit, Linux kernel 3.5.0-34-generic). The device is an 8GB 4th generation Apple iPod Nano. I get a GUI lock up when I select a FLAC file and copy to device. I've set the output file to be transcoded to an MP4 AAC.

The transcoded file eventually shows up on my iPod, but it does not play (file is skipped and the next queued track is played). I have copied MP3 files with no copy/play issues.

Attachment: TerminalOutput.txt

@fohrums
Copy link

fohrums commented Oct 18, 2014

confirmed.

Clementine v.1.2.3

Experiencing this problem only when choosing to transcode files to mp3 otherwise it works if I don't transcode - upon sending to device.

I only tested formats respectively being FLAC > MP3. I did not try transcoding from other format sources.

@wildersan72
Copy link

Same issue here. Clementine 1.2.

Sending to device and transcoding will lock the GUI however the files get transfered but you have to restart the app.

Transferring without transcoding works as it's supposed to with no abnormalities.

@rbrito
Copy link

rbrito commented Mar 17, 2015

Just for the record, I had this problem when transferring Vorbis files to my iPod 5.5G under Debian sid (read: clemetine version 1.2.3, debian version 1.2.3+dfsg-2+b1).

I noticed that the files generated all had names matching libgpodXXXX.jXXXX (where the XXX were varying numbers). The files themselves were already MP3 files.

As in the previous comment by @wildersan72, transfers without transcoding occur normally.

It would be helpful to know what may be happening here, as these freezes make the feature of transcoding useless.

@thebigkhan
Copy link

thebigkhan commented Oct 21, 2017

Apologies for bumping an old conversation but I could not find neither solution nor other issue tracking log related. And the issue is still open by the way. I have exactly the same problem (Clementine freezes during transcode operation in the context of "copy to device" (an SD card in my case). I have tried to download the patch attached to makov emails but failed (the link points to the issue page itself).
Does anyone as another workaround ou can supply the patch again ?
[EDIT]
Clementine was outdated in my Ubuntu distro (1.2.1), and after update to the current version, the issue is solved.
I suggest to close the issue #2806

@JulianVolodia
Copy link
Contributor

Hey @rbrito , @wildersan72 , @fohrums

could you check against newest one? :-) Do you know who was affected in prehistoric period, when Google Code was working? :)
Your issue afaik is with moving & transcoding, both operations at one time? Do you send it to any device or this special windows media device thingy?

@wildersan72 @rbrito it was convert to mp3? Any change of parameters?

Hey @thebigkhan there is 2-in-1 (who don't love this kind of issues? ;) ),

your copying part is OK I believe. If you could check again against newest, clean install without caches and .config, please do it. :-)

@thebigkhan
Copy link

Hello @JulianVolodia
As I said previously, "Clementine was outdated in my Ubuntu distro (1.2.1), and after update to the current version, the issue is solved." I never reproduced this bug since.
Now, I have no computer under Linux with Clementine combo to test again.
I hope my answer is useful for you.
Have a good time

@rbrito
Copy link

rbrito commented Sep 17, 2019 via email

@JulianVolodia
Copy link
Contributor

JulianVolodia commented Sep 26, 2019

Dear @rbrito no need to hurry.

If you have some time then will be OK. Maybe problem disappear earlier. ;)

I saw that you use amd64 version which is patched in Debian repository, and based on repo state on January.

If it wouldn't be a problem, could you try test against:
clementine_1.3.1-611-gda04471~jessie_amd64.deb 09-Jul-2019 00:31 6189700
from here https://builds.clementine-player.org/debian-jessie/ ?
If not, completely understood and not a problem at all.

PS Cheers to São Paulo! I was there 2y ago, near Maria Cardi communidade! :-) Love your Açaí and other fruits i.e. real bananas, they taste completely different. :-)

@JulianVolodia
Copy link
Contributor

Hello @JulianVolodia
As I said previously, "Clementine was outdated in my Ubuntu distro (1.2.1), and after update to the current version, the issue is solved." I never reproduced this bug since.
Now, I have no computer under Linux with Clementine combo to test again.
I hope my answer is useful for you.
Have a good time

Dear @thebigkhan thanks! It's helpful. :) Do you have some time for contribution in project? With testing Clementine and report some errors here, or check for existance of others, especially on non-Linux platforms?

Best!

@JulianVolodia
Copy link
Contributor

@thebigkhan there is another issue for this, so I will return here when both issues will be fixed.

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

No branches or pull requests

6 participants