Yes, without your patch, every time I agree to upload the modified file then I have to agree to overwrite the remote file.
- Queries
- All Stories
- Search
- Advanced Search
Advanced Search
Sep 7 2018
Sep 6 2018
It does automatically upload the modified file, but wouldn't it be nicer to not get the dialog to overwrite the modified file, that of course is not there in the case of local files.
It is just a third parameter to copy and tell it to Overwrite.
Sep 5 2018
Use QDateTime::currentDateTimeUtc() instead of QDateTime::currentDateTime().
May I commit or should I wait for @elvisangelaccio to accept the changes? This time I have read the arc message, that is usually something about non tracked files:
Revision 'D15180: kioexecd: watch for creations or modifications of the temporary files' has not been accepted. Continue anyway? [y/N]
Tested, dirty is not signaled when created (at least I didn't saw the dialog for uploading the modified file).
Removed the header.
Why the mutex? I interpreted that QTimer work as an interrumpt (wrong) instead of generating events in the event queue (right).
So I've gone through all the possible mistakes one can do here:
- Design mistakes
- Security mistakes
- Misunderstanding the API.
Definitely, I need more vacation.
Do not delete recursively.
Do not delete the file after 30s (we know it is already deleted).
Sep 4 2018
I missed that part, sorry.
It is safer that way, the start(time) method was added in Qt 5.8.
Done.
Implemented Anthony comments/suggestions.
Sep 3 2018
As I'm never sure if a timed execution can happen in the middle of other execution, I've added a mutex for m_deleted.
In D15180#319314, @anthonyfieroni wrote:I'm unhappy with that stop watching is on exit == 0, so when it's not, somehow, containers will continue to grow, it'll result in higher memory usage and slower performance. So stop watching should not depend on process return code, also same command should not stop container to shrink, that's my opinion, but i can miss something.
Updated with the code that handles m_openedBy right.
Sep 2 2018
Aug 31 2018
I'm not sure if I have to keep compatibility in the dbus calls, therefore the old one is still there.
Aug 19 2018
I'm never sure at how many lines the comments affects, but the last one should be:
QTRY_COMPARE(m_dirLister.spyClear.count(), 1); QCOMPARE(m_dirLister.spyClearQUrl.count(), 0);
Otherwise the test fails for me.
Fixed the inline comments.
Aug 17 2018
Aug 16 2018
In D13813#310047, @cfeck wrote:Authored by a Bot?
Restored all the signalSpy wait wrongly deleted.
Removed the use of qmimedatabase.
Aug 15 2018
Removed the use of enterLoop and exitLoop in favor of QTRY_COMPARE and QTRY_VERIFY.
Removed some waits
Changed all the connections to the new syntax.
Have run it several times and it hasn't failed here.
Done requested changes.
In D13813#309371, @elvisangelaccio wrote:@jtamate Any updates on this? Can you use the new fastInsert() calls here?
Not until dolphin depends on KIO 5.47, currently its minimum required kio version is 5.43.
Jul 27 2018
Jul 26 2018
+2 from my part.
I was about to increment KFileItem to return that information also as long long.
Qt 5.11.0 and frameworks 5.46.0 over xcb.
I'm sorry, I'll have to wait until the next lock, I didn't find the lock file neither the blocked kdeinit5.
Is the complete name of the lock file be logged with qCDebug() ?.
Just after killing dolphin yesterday afternoon (I've read your comments this morning), clementine appeared suddenly playing a song.
Jul 25 2018
Don't wait forever, if the lock is blocked for more than 30 seconds, write a warning and don't try to start kdeinit5 again.
I said from the start that it wasn't tryLock() that was blocking but lock(), good to see that this is now confirmed.
I trusted blindly in gdb stacktrace, and also I didn't understood, again, the code.
It is my first time of a backtrace that doesn't reflect the true state of a program. But I've learned the lesson, in case of counter intuitive backtrace, take a look at the dissasembler.
Thanks everybody, specially to @thiago.
Jul 24 2018
(gdb) disass Dump of assembler code for function _ZN9QLockFile7tryLockEi: 0x00007f54be8bc750 <+0>: push %r15 0x00007f54be8bc752 <+2>: mov $0xffffffff,%eax 0x00007f54be8bc757 <+7>: mov $0x1,%edx 0x00007f54be8bc75c <+12>: push %r14 0x00007f54be8bc75e <+14>: push %r13 0x00007f54be8bc760 <+16>: push %r12 0x00007f54be8bc762 <+18>: push %rbp 0x00007f54be8bc763 <+19>: push %rbx 0x00007f54be8bc764 <+20>: mov $0x64,%ebx 0x00007f54be8bc769 <+25>: sub $0x58,%rsp 0x00007f54be8bc76d <+29>: test %esi,%esi 0x00007f54be8bc76f <+31>: mov (%rdi),%rbp 0x00007f54be8bc772 <+34>: cmovs %eax,%esi 0x00007f54be8bc775 <+37>: lea 0x20(%rsp),%r12 0x00007f54be8bc77a <+42>: lea 0x30(%rsp),%r14 0x00007f54be8bc77f <+47>: lea 0x10(%rsp),%r15 0x00007f54be8bc784 <+52>: lea 0x18(%rsp),%r13 0x00007f54be8bc789 <+57>: mov %r12,%rdi 0x00007f54be8bc78c <+60>: movslq %esi,%rsi 0x00007f54be8bc78f <+63>: callq 0x7f54be962150 <QDeadlineTimer::QDeadlineTimer(long long, Qt::TimerType)> 0x00007f54be8bc794 <+68>: mov %rbp,%rdi 0x00007f54be8bc797 <+71>: callq 0x7f54be910d00 <_ZN16QLockFilePrivate11tryLock_sysEv> 0x00007f54be8bc79c <+76>: mov %eax,0x10(%rbp) 0x00007f54be8bc79f <+79>: cmp $0x1,%eax 0x00007f54be8bc7a2 <+82>: je 0x7f54be8bc7d0 <_ZN9QLockFile7tryLockEi+128> 0x00007f54be8bc7a4 <+84>: test %eax,%eax 0x00007f54be8bc7a6 <+86>: je 0x7f54be8bc9a0 <_ZN9QLockFile7tryLockEi+592> 0x00007f54be8bc7ac <+92>: cmp $0x3,%eax 0x00007f54be8bc7af <+95>: ja 0x7f54be8bc968 <_ZN9QLockFile7tryLockEi+536> 0x00007f54be8bc7b5 <+101>: add $0x58,%rsp 0x00007f54be8bc7b9 <+105>: xor %eax,%eax 0x00007f54be8bc7bb <+107>: pop %rbx 0x00007f54be8bc7bc <+108>: pop %rbp 0x00007f54be8bc7bd <+109>: pop %r12 0x00007f54be8bc7bf <+111>: pop %r13 0x00007f54be8bc7c1 <+113>: pop %r14 0x00007f54be8bc7c3 <+115>: pop %r15 0x00007f54be8bc7c5 <+117>: retq 0x00007f54be8bc7c6 <+118>: nopw %cs:0x0(%rax,%rax,1) 0x00007f54be8bc7d0 <+128>: cmpb $0x0,0x14(%rbp) 0x00007f54be8bc7d4 <+132>: jne 0x7f54be8bc968 <_ZN9QLockFile7tryLockEi+536> 0x00007f54be8bc7da <+138>: mov %rbp,%rdi 0x00007f54be8bc7dd <+141>: callq 0x7f54be8bc3a0 <_ZNK16QLockFilePrivate17isApparentlyStaleEv> 0x00007f54be8bc7e2 <+146>: test %al,%al 0x00007f54be8bc7e4 <+148>: je 0x7f54be8bc968 <_ZN9QLockFile7tryLockEi+536> 0x00007f54be8bc7ea <+154>: mov %r14,%rdi 0x00007f54be8bc7ed <+157>: callq 0x7f54be807360 <QDateTime::currentDateTime()> 0x00007f54be8bc7f2 <+162>: mov %rbp,%rsi 0x00007f54be8bc7f5 <+165>: mov %r15,%rdi 0x00007f54be8bc7f8 <+168>: callq 0x7f54be8b2640 <_ZN9QFileInfoC2ERK7QString> 0x00007f54be8bc7fd <+173>: mov %r15,%rsi 0x00007f54be8bc800 <+176>: mov %r13,%rdi 0x00007f54be8bc803 <+179>: callq 0x7f54be8b4160 <QFileInfo::lastModified() const> 0x00007f54be8bc808 <+184>: mov %r13,%rsi 0x00007f54be8bc80b <+187>: mov %r14,%rdi 0x00007f54be8bc80e <+190>: callq 0x7f54be806e90 <QDateTime::operator<(QDateTime const&) const> 0x00007f54be8bc813 <+195>: mov %r13,%rdi 0x00007f54be8bc816 <+198>: mov %al,0x8(%rsp) 0x00007f54be8bc81a <+202>: callq 0x7f54be804a00 <QDateTime::~QDateTime()> 0x00007f54be8bc81f <+207>: mov %r15,%rdi 0x00007f54be8bc822 <+210>: callq 0x7f54be8b43a0 <QFileInfo::~QFileInfo()> 0x00007f54be8bc827 <+215>: mov %r14,%rdi 0x00007f54be8bc82a <+218>: callq 0x7f54be804a00 <QDateTime::~QDateTime()> 0x00007f54be8bc82f <+223>: movzbl 0x8(%rsp),%eax 0x00007f54be8bc834 <+228>: test %al,%al 0x00007f54be8bc836 <+230>: je 0x7f54be8bc8c0 <_ZN9QLockFile7tryLockEi+368> 0x00007f54be8bc83c <+236>: lea 0x1564dd(%rip),%rax # 0x7f54bea12d20 0x00007f54be8bc843 <+243>: pxor %xmm0,%xmm0 0x00007f54be8bc847 <+247>: movq $0x2,0x30(%rsp) 0x00007f54be8bc850 <+256>: mov %rax,0x48(%rsp) 0x00007f54be8bc855 <+261>: mov 0x0(%rbp),%rax 0x00007f54be8bc859 <+265>: movups %xmm0,0x38(%rsp) 0x00007f54be8bc85e <+270>: mov %rax,0x18(%rsp) 0x00007f54be8bc863 <+275>: mov (%rax),%edx 0x00007f54be8bc865 <+277>: add $0x1,%edx 0x00007f54be8bc868 <+280>: cmp $0x1,%edx 0x00007f54be8bc86b <+283>: ja 0x7f54be8bc9f1 <_ZN9QLockFile7tryLockEi+673> 0x00007f54be8bc871 <+289>: mov %r13,%rdi 0x00007f54be8bc874 <+292>: callq 0x7f54be83d530 <QString::utf16() const> 0x00007f54be8bc879 <+297>: mov %rax,%rdx 0x00007f54be8bc87c <+300>: lea 0x20a715(%rip),%rsi # 0x7f54beac6f98 0x00007f54be8bc883 <+307>: mov %r14,%rdi 0x00007f54be8bc886 <+310>: xor %eax,%eax 0x00007f54be8bc888 <+312>: callq 0x7f54be7b7d00 <QMessageLogger::info(char const*, ...) const> 0x00007f54be8bc88d <+317>: mov 0x18(%rsp),%rdi 0x00007f54be8bc892 <+322>: mov (%rdi),%eax 0x00007f54be8bc894 <+324>: test %eax,%eax 0x00007f54be8bc896 <+326>: je 0x7f54be8bc8a8 <_ZN9QLockFile7tryLockEi+344> 0x00007f54be8bc898 <+328>: cmp $0xffffffff,%eax 0x00007f54be8bc89b <+331>: je 0x7f54be8bc8c0 <_ZN9QLockFile7tryLockEi+368> 0x00007f54be8bc89d <+333>: lock subl $0x1,(%rdi) 0x00007f54be8bc8a1 <+337>: mov 0x18(%rsp),%rdi 0x00007f54be8bc8a6 <+342>: jne 0x7f54be8bc8c0 <_ZN9QLockFile7tryLockEi+368> 0x00007f54be8bc8a8 <+344>: mov $0x8,%edx 0x00007f54be8bc8ad <+349>: mov $0x2,%esi 0x00007f54be8bc8b2 <+354>: callq 0x7f54be7cb3d0 <QArrayData::deallocate(QArrayData*, unsigned long, unsigned long)> 0x00007f54be8bc8b7 <+359>: nopw 0x0(%rax,%rax,1) 0x00007f54be8bc8c0 <+368>: mov 0x0(%rbp),%rax 0x00007f54be8bc8c4 <+372>: xor %edx,%edx 0x00007f54be8bc8c6 <+374>: mov %r14,%rdi 0x00007f54be8bc8c9 <+377>: mov 0x4(%rax),%esi 0x00007f54be8bc8cc <+380>: add $0x7,%esi 0x00007f54be8bc8cf <+383>: callq 0x7f54be838470 <_ZN7QStringC2EiN2Qt14InitializationE> 0x00007f54be8bc8d4 <+388>: mov 0x0(%rbp),%rsi 0x00007f54be8bc8d8 <+392>: mov 0x30(%rsp),%rcx 0x00007f54be8bc8dd <+397>: movslq 0x4(%rsi),%rdx 0x00007f54be8bc8e1 <+401>: add 0x10(%rcx),%rcx 0x00007f54be8bc8e5 <+405>: mov %rcx,%rdi 0x00007f54be8bc8e8 <+408>: add 0x10(%rsi),%rsi 0x00007f54be8bc8ec <+412>: lea (%rdx,%rdx,1),%r8 0x00007f54be8bc8f0 <+416>: mov %r8,%rdx 0x00007f54be8bc8f3 <+419>: mov %r8,0x8(%rsp) 0x00007f54be8bc8f8 <+424>: callq 0x7f54be788af0 <memcpy@plt> 0x00007f54be8bc8fd <+429>: mov 0x8(%rsp),%r8 0x00007f54be8bc902 <+434>: mov $0x7,%esi 0x00007f54be8bc907 <+439>: lea 0x20a635(%rip),%rdi # 0x7f54beac6f43 0x00007f54be8bc90e <+446>: lea (%rax,%r8,1),%rdx 0x00007f54be8bc912 <+450>: callq 0x7f54be843b30 <QAbstractConcatenable::appendLatin1To(char const*, int, QChar*)> 0x00007f54be8bc917 <+455>: mov %r14,%rsi 0x00007f54be8bc91a <+458>: mov %r13,%rdi 0x00007f54be8bc91d <+461>: callq 0x7f54be8bb100 <QLockFile::QLockFile(QString const&)> 0x00007f54be8bc922 <+466>: mov 0x30(%rsp),%rdi 0x00007f54be8bc927 <+471>: mov (%rdi),%eax 0x00007f54be8bc929 <+473>: test %eax,%eax 0x00007f54be8bc92b <+475>: je 0x7f54be8bc9c0 <_ZN9QLockFile7tryLockEi+624> 0x00007f54be8bc931 <+481>: cmp $0xffffffff,%eax 0x00007f54be8bc934 <+484>: je 0x7f54be8bc941 <_ZN9QLockFile7tryLockEi+497> 0x00007f54be8bc936 <+486>: lock subl $0x1,(%rdi) 0x00007f54be8bc93a <+490>: mov 0x30(%rsp),%rdi 0x00007f54be8bc93f <+495>: je 0x7f54be8bc9c0 <_ZN9QLockFile7tryLockEi+624> 0x00007f54be8bc941 <+497>: xor %esi,%esi 0x00007f54be8bc943 <+499>: mov %r13,%rdi 0x00007f54be8bc946 <+502>: callq 0x7f54be8bc750 <_ZN9QLockFile7tryLockEi> 0x00007f54be8bc94b <+507>: test %al,%al 0x00007f54be8bc94d <+509>: je 0x7f54be8bc95b <_ZN9QLockFile7tryLockEi+523> 0x00007f54be8bc94f <+511>: mov %rbp,%rdi 0x00007f54be8bc952 <+514>: callq 0x7f54be8bc3a0 <_ZNK16QLockFilePrivate17isApparentlyStaleEv> 0x00007f54be8bc957 <+519>: test %al,%al 0x00007f54be8bc959 <+521>: jne 0x7f54be8bc9d4 <_ZN9QLockFile7tryLockEi+644> 0x00007f54be8bc95b <+523>: mov %r13,%rdi 0x00007f54be8bc95e <+526>: callq 0x7f54be8bb160 <QLockFile::~QLockFile()> 0x00007f54be8bc963 <+531>: nopl 0x0(%rax,%rax,1) 0x00007f54be8bc968 <+536>: mov %r12,%rdi 0x00007f54be8bc96b <+539>: callq 0x7f54be962240 <QDeadlineTimer::remainingTime() const> 0x00007f54be8bc970 <+544>: test %eax,%eax 0x00007f54be8bc972 <+546>: je 0x7f54be8bc7b5 <_ZN9QLockFile7tryLockEi+101> 0x00007f54be8bc978 <+552>: cmp %eax,%ebx 0x00007f54be8bc97a <+554>: cmova %eax,%ebx 0x00007f54be8bc97d <+557>: movslq %ebx,%rdi 0x00007f54be8bc980 <+560>: callq 0x7f54be7ca170 <QThread::msleep(unsigned long)> => 0x00007f54be8bc985 <+565>: lea (%rbx,%rbx,1),%eax 0x00007f54be8bc988 <+568>: cmp $0x1388,%ebx 0x00007f54be8bc98e <+574>: cmovl %eax,%ebx 0x00007f54be8bc991 <+577>: jmpq 0x7f54be8bc794 <_ZN9QLockFile7tryLockEi+68> 0x00007f54be8bc996 <+582>: nopw %cs:0x0(%rax,%rax,1) 0x00007f54be8bc9a0 <+592>: movb $0x1,0x14(%rbp) 0x00007f54be8bc9a4 <+596>: add $0x58,%rsp 0x00007f54be8bc9a8 <+600>: mov $0x1,%eax 0x00007f54be8bc9ad <+605>: pop %rbx 0x00007f54be8bc9ae <+606>: pop %rbp 0x00007f54be8bc9af <+607>: pop %r12 0x00007f54be8bc9b1 <+609>: pop %r13 0x00007f54be8bc9b3 <+611>: pop %r14 0x00007f54be8bc9b5 <+613>: pop %r15 0x00007f54be8bc9b7 <+615>: retq 0x00007f54be8bc9b8 <+616>: nopl 0x0(%rax,%rax,1) 0x00007f54be8bc9c0 <+624>: mov $0x8,%edx 0x00007f54be8bc9c5 <+629>: mov $0x2,%esi 0x00007f54be8bc9ca <+634>: callq 0x7f54be7cb3d0 <QArrayData::deallocate(QArrayData*, unsigned long, unsigned long)> 0x00007f54be8bc9cf <+639>: jmpq 0x7f54be8bc941 <_ZN9QLockFile7tryLockEi+497> 0x00007f54be8bc9d4 <+644>: mov %rbp,%rdi 0x00007f54be8bc9d7 <+647>: callq 0x7f54be911030 <_ZN16QLockFilePrivate15removeStaleLockEv> 0x00007f54be8bc9dc <+652>: test %al,%al 0x00007f54be8bc9de <+654>: je 0x7f54be8bc95b <_ZN9QLockFile7tryLockEi+523> 0x00007f54be8bc9e4 <+660>: mov %r13,%rdi 0x00007f54be8bc9e7 <+663>: callq 0x7f54be8bb160 <QLockFile::~QLockFile()> 0x00007f54be8bc9ec <+668>: jmpq 0x7f54be8bc794 <_ZN9QLockFile7tryLockEi+68> 0x00007f54be8bc9f1 <+673>: lock addl $0x1,(%rax) 0x00007f54be8bc9f5 <+677>: jmpq 0x7f54be8bc871 <_ZN9QLockFile7tryLockEi+289> 0x00007f54be8bc9fa <+682>: mov %rax,%rbx 0x00007f54be8bc9fd <+685>: jmpq 0x7f54be7945fe <QLockFile::tryLock(int)> 0x00007f54be8bca02 <+690>: mov %rax,%rbx 0x00007f54be8bca05 <+693>: jmpq 0x7f54be79460e <QLockFile::tryLock(int)+16> 0x00007f54be8bca0a <+698>: mov %rax,%rbx 0x00007f54be8bca0d <+701>: jmpq 0x7f54be79461e <QLockFile::tryLock(int)+32> 0x00007f54be8bca12 <+706>: mov %rax,%rbx 0x00007f54be8bca15 <+709>: jmpq 0x7f54be79462e <QLockFile::tryLock(int)+48> 0x00007f54be8bca1a <+714>: mov %rax,%rbx 0x00007f54be8bca1d <+717>: jmpq 0x7f54be794636 <QLockFile::tryLock(int)+56> 0x00007f54be8bca22 <+722>: mov %rax,%rbx 0x00007f54be8bca25 <+725>: jmpq 0x7f54be79463e <QLockFile::tryLock(int)+64> End of assembler dump.
In D14302#297120, @thiago wrote:Can you print the contents of the timer object inside tryLock()?
Another hypothesis:
Jul 23 2018
In D14302#296469, @jtamate wrote:I guess this is a Qt bug.
qint64 QDeadlineTimer::remainingTime() const Q_DECL_NOTHROW { qint64 ns = remainingTimeNSecs(); return ns <= 0 ? ns : (ns + 999999) / (1000 * 1000); }Shouldn't it be:
return ns <= 0 ? **0** : (ns + 999999) / (1000 * 1000);
I guess this is a Qt bug.
I kept dolphin blocked, just in case.
Jul 21 2018
As I do not know how to discard new incorrect updates... The previous incorrect one creates a crash.
Return to the good one and land.
Using --num-callers=50, the leak shows as:
I still don't know how to avoid this leak, but I guess this will be fixed with new syntax for QMetaObject::invokeMethod and similar.
Jul 20 2018
Hopefully done all the requested changes.
Passed uncristify-kf5.
Removed the classes for simulating the filtering.
Added benchmarks for 10, 100, 1000 and 10000 items.
The items are inserted in the same random order for all the implementations.
Jul 19 2018
Jul 17 2018
It fixes the memory leak.
Jul 16 2018
Jul 14 2018
Also amended the commit message.
In D13814#291644, @bruns wrote:Any reason why you have pushed this with an obviously wrong commit message?
Jul 13 2018
Jul 12 2018
Jul 11 2018
Apply the workaround in loadSortingSettings.
It is applied in the constructor and when the type of sorting is changed by the user.
Jul 10 2018
The url in the lineedit is get from KUriFilterData, and it didn't normalize the paths, allowing trailing slashes.
Include 4 new tests and fix 2 (the ones with // in the middle of the urls).
Jul 9 2018
Sorry, I should have updated this revision earlier.
There are two methods than can not be removed from the Q_PRIVATE_SLOT definitions, otherwise the invokeMethod will fail.
__st_birthtime
but not both.
Fixed targetPath of links.
Created the bug report referenced in the summary and code.
Changed the strings to compare, they can be anything.
Jul 8 2018
Reading the source of QCollator*, I guess the hack works because I get a collator where d->dirty is true,
and in compare there is this code
In D13814#288615, @elvisangelaccio wrote:@jtamate Can you show a complete gdb backtrace + valgrind log of this crash?
My crashes are gone just doing a single comparison using the collator at the constructor.
In D13674#288162, @dfaure wrote:somehow stub out any actual kioslave usage, and *just* test URLs.
Please, check https://phabricator.kde.org/D13939
Perhaps it's a local issue on your side? Have you tried cleaning your dolphin build (and perhaps KIO as well) and re-run it to see if it still happens?
I've done a kdesrc-build from empty sources directory and empty build directory, but not empty install directory and it still happens. I will try later after I get enough free space with an empty install directory.
Jul 7 2018
I just cloned dolphin with your changes.
It compiled just fine.
Starting it with and without arguments also worked just fine.Perhaps it's a local issue on your side? Have you tried cleaning your dolphin build (and perhaps KIO as well) and re-run it to see if it still happens?
I've done a kdesrc-build from empty sources directory and empty build directory, but not empty install directory and it still happens. I will try later after I get enough free space with an empty install directory.