Bug 375016

Summary: k3b 17.04: cannot add files to data project
Product: [Applications] k3b Reporter: Daniel Eklöf <daniel>
Component: Data ProjectAssignee: k3b developers <k3b>
Status: VERIFIED FIXED    
Severity: major CC: bison.paolo, bugseforuns, demm, michalm, rikmills, simonandric5, trueg, zhaixiang
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Daniel Eklöf 2017-01-13 18:53:13 UTC
I've been using the git version of k3b (2.10?/17.04) for a couple of months now. It's been working great, up until 1-2 months ago, when for some reason adding files to data project simply does not work.

That is, I cannot drag-and-drop or double-click files to add them. Using Project -> Add Files also does not work.

With "does not work" I mean the added files to not show up in the project and the projects file count and size remains 0.

No error messages as far as I can tell. journalct -e only shows:

jan 13 19:48:33 tiny k3b[12347]: url list drop
jan 13 19:48:33 tiny k3b[12347]: (K3b::DataUrlAddingDialog) using locale codec:  UTF-8
jan 13 19:48:56 tiny k3b[12347]: (K3b::DataUrlAddingDialog) using locale codec:  UTF-8

Note that e.g. burning ISOs work, but that I haven't tested any other kind of projects (audio, video).

Current version is 17.04.00.r6074.fd4ab1c19 (https://github.com/KDE/k3b/commit/fd4ab1c19a6e51766bb2dd66e826230bd53b020d)

I'm afraid I don't know exactly when this started happening as I don't update my build that often.

I assume this is not expected...? Even though it's not a real release.

If this is caused by some kind of misconfiguration on my end, I'd welcome all suggestions as to what may be wrong...
Comment 1 demm 2017-01-14 03:03:22 UTC
Issue confirmed in KaOS, see the discussion:
https://forum.kaosx.us/d/1785-k3b-unable-to-add-files

Last known good commit that did not show this issue was September 28:
https://github.com/KDE/k3b/tree/8102d390e763abc1e4db2954798930e5f04d6370
Comment 2 Pable 2017-01-15 12:40:41 UTC
Same problem here. I opened the thread on KaOS forum.

If more info are required, please let me know.

Thanks
Comment 3 Patrick Silva 2017-01-16 15:32:59 UTC
I can confirm this problem on Arch.
I'm running 17.04 installed from aur repository.
Comment 4 Rik Mills 2017-02-11 12:05:23 UTC
I see the same issue when testing my git snapshot build for kubuntu testing.
Comment 5 Kai Uwe Broulik 2017-02-11 16:05:01 UTC
Git commit d21096fa6e10fe03e524a1b0beeb0b16a0c22681 by Kai Uwe Broulik.
Committed on 11/02/2017 at 16:03.
Pushed by broulik into branch 'master'.

Fix adding files to data project

In cf01ff3159dbddb97e0e67246dee16441a64984a this broke by randomly using QSharedPointer in the wrong way.
There was only this one item being referenced, once it fell out of scope it got deleted, and then by the
time the event loop returned and the queued invocation was processed, the object was already gone.

Just use WA_DeleteOnClose which will clean up nicely once we're done.

Differential Revision: https://phabricator.kde.org/D4571

M  +9    -7    src/projects/k3bdataurladdingdialog.cpp

https://commits.kde.org/k3b/d21096fa6e10fe03e524a1b0beeb0b16a0c22681
Comment 6 Leslie Zhai 2017-02-13 01:45:07 UTC
Sorry for my misunderstanding of QSharedPointer http://www.leetcode.cn/2016/08/k3b.html#bug
Comment 7 Daniel Eklöf 2017-02-13 20:31:32 UTC
Thanks, works just fine! Nice catch!