GNOME Bugzilla – Bug 370736
Playlist becomes unresponsive to drag'n'drop
Last modified: 2006-11-15 14:23:00 UTC
This bug was reported to the Debian BTS. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=396804 "Sometimes I find that Totem stops processing drop requests on the playlist. The "+" button still works, and dropping on the movie area causes the dropped movie to be played, while dropping the same file on the playlist produces no response. I've seen this bug on Totem 2.14.x, and previous versions used to crash when you tried to add files to the playlist. Unfortunately, I don't know how to reproduce it, but I see it often and it never takes to long to start happening. I've found no work around short of restarting Totem."
I'm afraid that unless I get a bit more details, I won't be able to fix this.
I've found an easy way to reproduce the bug. 1) Start playing a video. 2) Add a .tar.bz2 file to the play list and ask Totem to "play" it. It tells me it doesn't have a handler for that kind of file. Drag'n'drop on the playlist area stops working at this point. It's important that you drop the .tar.bz2 file on the play list area in step #2. Dropping it on the video view won't trigger this bug.
Still not able to reproduce this. Which version of Totem are you using? Which errors do you see? Could you be more precise in your steps, and mention which buttons, and actions you take (ie. rather than "ask Totem to play it", say "double-click on the entry for the .tar.bz2 file in the playlist").
OK, let me try again. I'm using totem-xine version 2.16.2, as distributed in Debian/sid. However, I've seen this problem in the 2.14 seriesfor as long as I can recall. GTK+ 2.0 is at version 2.8.20 in Debian/sid, so that's what I'm using. 1) I start totem from the console: totem --debug. The playlist is empty. 2) I open my Downloads folder on Nautilus. 3) I drag the movie Steambot_Bill.jr.mpeg which I downloaded from archive.org. This is the 2.8 Gib version. It seems that the selection of movie doesn't affect the bug. The movie starts playing automatically. Buster Keaton is in it; he is very funny, but he doesn't smile (this is not a bug, but a feature). 4) I drag timertop-20051216.tar.bz2 onto the playlist. So far so good, the movie keeps playing. 5) I double-click on the playlist entry for the second file (timertop...). Totem says (translating from Spanish): Totem could not reproduce «"file:///home/.../Desktop/Downloads/timertop-20051216.tar.bz2". No plug-ins could handle this movie.» On the console I read: «xine: couldn't find demux for >file:///home/.../Desktop/Downloads/timertop-20051216.tar.bz2<» 6) I dismiss the dialog clicking on "OK." 7) I drag the same files from Nautilus to Totem's playlist. It rejects them. Other files are rejected as well. This is the bug.
(In reply to comment #4) > 7) I drag the same files from Nautilus to Totem's playlist. It rejects them. > Other files are rejected as well. This is the bug. Which "same files" are you talking about? The .tar.bz2, or the mpeg file? When you say "it rejects them" do you mean the icon floats back to its original place, or that they don't get added to the list, or something else?
Well, "files" refers to both of them, doesn't it? In any case, I meant both files: the mpeg and the tar.bz2. But not exclusively, all kind of files seem to be affected: other mpeg's and avi's as well. The result is, as you say, that it floats back to its original place. The mouse icon when hovering the file over the playlist is the top-left corner angle that Nautilus shows when it can't drop the file at the current position. Furthermore, it's possible to see a different (still buggy) behavior if you do the following after step #7: 8) Click on the "+" button. Pick the mpeg file and dismiss the dialog, so the file gets added at the bottom of the playlist. Now it has three entries: mpeg, tar.bz2, mpeg. 9) Start playing the third entry by double-clicking on it. That is, the second instance of the mpeg file. Now you'll see that when you hover a file on the playlist, the expected mouse icon is used (top-left corner angle with a + sign inside); moreover, you can drop files on the playlist and they don't bounce back to their original place, although they still don't get added to it. This second case seems to be reproducible at least 80% of the time. In 6 or 7 attempts, the playlist remained usable once. Still, I was able to trigger the bug by following the steps 5 to 7 again.
Confirmed: If the "Totem could not play 'URL://'. There is no plugin to handle this movie." dialog is shown after double clicking on an item in the playlist the drop_cb signal handler is not unblocked because button_release_cb (totem-playlist.c:625) is not called (and with it one unblock call is missing).
Created attachment 76240 [details] [review] totem-playlist-restore-dnd-after-error.patch Probable patch
(In reply to comment #7) > Confirmed: > > If the "Totem could not play 'URL://'. There is no plugin to handle this > movie." dialog is shown after double clicking on an item in the playlist the > drop_cb signal handler is not unblocked because button_release_cb > (totem-playlist.c:625) is not called (and with it one unblock call is missing). But drop_cb is supposed to be reactivated in treeview_row_changed(). Does the patch in comment #8 fix it?
The events created by a double-click are button_press (block 0->1) button_release (block 1->0) button_press (block 0->1) button_press, GDK_2BUTTON_PRESS (block 1->2) row-activated (block 2->1) button_release (block 1->0) <- this is not called (see comment #7) and the signal handler is still blocked. The patch in comment #8 doesn't fix this problem.
I didn't know "blocks" were refcounted, so indeed the patch wouldn't work. I just double-checked the sequence of double/triple click button events, and the patch in comment #12 should fix it.
Created attachment 76244 [details] [review] totem-playlist-restore-dnd-after-error2.patch
Created attachment 76256 [details] [review] Proposed fix The patch in comment #12 unblocks a unblocked signal handler (if the button_release_cb function is called) and doesn't call gtk_drag_dest_set (if the button_release_cb function is not called).
2006-11-15 Bastien Nocera <hadess@hadess.net> * src/totem-playlist.c: (button_press_cb), (button_release_cb), (drag_end_cb), (treeview_row_changed): Patch from Jan Arne Petersen <jpetersen@jpetersen.org> to avoid the playlist not accepting new drops after a drop caused an error dialogue to appear (Closes: #370736)