[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2020-08-17 Thread David Jarvie
https://bugs.kde.org/show_bug.cgi?id=370627

David Jarvie  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
You are receiving this mail because:
You are watching all bug changes.

[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-31 Thread David Jarvie
https://bugs.kde.org/show_bug.cgi?id=370627

David Jarvie  changed:

   What|Removed |Added

   Version Fixed In||16.08.3
 Resolution|--- |FIXED
  Latest Commit||4cd6df12ffc7cc7455f986e87c0
   ||d79d00d3123fa
 Status|UNCONFIRMED |RESOLVED

--- Comment #11 from David Jarvie  ---
Thank you for your assistance in testing the fix. This is now fixed for KAlarm
version 2.11.10-5, which will be in KDE Applications 16.08.3.

Commit 4cd6df12ffc7cc7455f986e87c0d79d00d3123fa (16.08 branch).

-- 
You are receiving this mail because:
You are watching all bug changes.

[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-30 Thread Andrey Bondarenko
https://bugs.kde.org/show_bug.cgi?id=370627

--- Comment #10 from Andrey Bondarenko  ---
I don't see load errors after applying revised patch. The issue is resolved.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-30 Thread David Jarvie
https://bugs.kde.org/show_bug.cgi?id=370627

David Jarvie  changed:

   What|Removed |Added

 Attachment #101857|0   |1
is obsolete||

--- Comment #9 from David Jarvie  ---
Created attachment 101901
  --> https://bugs.kde.org/attachment.cgi?id=101901=edit
Revised patch

Thanks for that. Your patch assumes that the current working directory is the
calendar directory, which I'm not sure is a safe assumption. Can you please try
out a revised version of your patch, which hopefully can be committed to fix
the issue.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-30 Thread Andrey Bondarenko
https://bugs.kde.org/show_bug.cgi?id=370627

--- Comment #8 from Andrey Bondarenko  ---
Created attachment 101896
  --> https://bugs.kde.org/attachment.cgi?id=101896=edit
Patch with QFile::exists call moved to isFileValid function

I still see errors in my ~/.xsession-errors file after updated patch.

Looks like moving QFile(file).exists() to isFileValid function solves the
problem (see attached patch).

-- 
You are receiving this mail because:
You are watching all bug changes.

[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-28 Thread David Jarvie
https://bugs.kde.org/show_bug.cgi?id=370627

David Jarvie  changed:

   What|Removed |Added

 Attachment #101844|0   |1
is obsolete||

--- Comment #7 from David Jarvie  ---
Created attachment 101857
  --> https://bugs.kde.org/attachment.cgi?id=101857=edit
Updated patch for testing

Can you please test the attached patch which now checks for the file's
existence before calling ICalFormat::load(). Thank you.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-28 Thread Andrey Bondarenko
https://bugs.kde.org/show_bug.cgi?id=370627

--- Comment #6 from Andrey Bondarenko  ---
Method fileStorage->load() from kcalcore called from KAEvent
KAlarmDirResource::loadFile still reports error if file does not exists. I
think you should check file presence before calling load.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-28 Thread Andrey Bondarenko
https://bugs.kde.org/show_bug.cgi?id=370627

--- Comment #5 from Andrey Bondarenko  ---
I've recompiled kdepim-runtime with the patch but still have error messages

Qt-D [2016-10-28 13:03:31.366 +05]
(akonadi_kalarm_dir_resource_3:17381:log_kalarmdirresource)
.../kdepim-runtime/resources/kalarm/kalarmdir/kalarmdirresource.cpp:857:KAlarmDirResource::fileChanged
- "~/.local/share/kalarm/active/KAlarm-1360478297.791.U17381"
Qt-D [2016-10-28 13:03:31.366 +05]
(akonadi_kalarm_dir_resource_3:17381:log_kalarmdirresource)
.../kdepim-runtime/resources/kalarm/kalarmdir/kalarmdirresource.cpp:442:KAlarmDirResource::loadFile
- "~/.local/share/kalarm/active/KAlarm-1360478297.791.U17381"
Qt-D [2016-10-28 13:03:31.366 +05]
(akonadi_kalarm_dir_resource_3:17381:log_kcalcore)
.../kcalcore/src/icalformat.cpp:83:KCalCore::ICalFormat::load - load
"~/.local/share/kalarm/active/KAlarm-1360478297.791.U17381"
Qt-C [2016-10-28 13:03:31.366 +05]
(akonadi_kalarm_dir_resource_3:17381:log_kcalcore)
.../kcalcore/src/icalformat.cpp:89:KCalCore::ICalFormat::load - load error:
cannot open "~/.local/share/kalarm/active/KAlarm-1360478297.791.U17381" error
"No such file or directory" 
Qt-D [2016-10-28 13:03:31.366 +05]
(akonadi_kalarm_dir_resource_3:17381:log_kcalcore)
.../kcalcore/src/icalformat.cpp:83:KCalCore::ICalFormat::load - load
"~/.local/share/kalarm/active/KAlarm-1360478297.791.U17381"
Qt-C [2016-10-28 13:03:31.366 +05]
(akonadi_kalarm_dir_resource_3:17381:log_kcalcore)
.../kcalcore/src/icalformat.cpp:89:KCalCore::ICalFormat::load - load error:
cannot open "~/.local/share/kalarm/active/KAlarm-1360478297.791.U17381" error
"No such file or directory"

-- 
You are receiving this mail because:
You are watching all bug changes.

[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-27 Thread David Jarvie
https://bugs.kde.org/show_bug.cgi?id=370627

--- Comment #4 from David Jarvie  ---
Created attachment 101844
  --> https://bugs.kde.org/attachment.cgi?id=101844=edit
Patch for testing

I've committed a fix in Applications/16.08 branch (commit
36009232d38e517b34816a014958a58fabd886a0).

I also attach a patch (which should apply to 15.12 branch) which I'd appreciate
if you could test and let me know if it successfully fixes the bug.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-24 Thread Andrey Bondarenko via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370627

--- Comment #3 from Andrey Bondarenko  ---
Probably a source of temporary files is QSaveFile instances used in function
ICalFormat::save from kcalcore file src/icalformat.cpp.

According to Qt docs (http://doc.qt.io/qt-5/qsavefile.html) QSaveFile creates
temporary file, writes to it, then rename temporary file on commit.

Looks like Implicit temp files are created under kalarm_dir_resource by
QSaveFile in kcalcore and KDirWatch fire fileChanged on them. Because temporary
filenames do not start with dot and not end with ~ they pass isFileValid.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-23 Thread Andrey Bondarenko via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370627

--- Comment #2 from Andrey Bondarenko  ---
Here is a example of more detailed log from kalarm:

Qt-W [2016-10-23 11:53:10.027 +05] (kalarm:3906:default) unknown:0:unknown -
QLayout: Attempting to add QLayout "" to YearlyRule "", which already has a
layout
Qt-C [2016-10-23 11:53:14.502 +05] (akonadi_kalarm_dir_resource_3:3650:default)
kcalcore/src/icalformat.cpp:89:KCalCore::ICalFormat::load - load error
Qt-C [2016-10-23 11:53:14.502 +05] (akonadi_kalarm_dir_resource_3:3650:default)
kcalcore/src/icalformat.cpp:89:KCalCore::ICalFormat::load - load error
Qt-W [2016-10-23 11:53:14.502 +05]
(akonadi_kalarm_dir_resource_3:3650:log_kalarmdirresource)
kdepim-runtime/resources/kalarm/kalarmdir/kalarmdirresource.cpp:446:KAlarmDirResource::loadFile
- Error loading "~/.local/share/kalarm/active/KAlarm-1136218218.463.Hv3650"
Qt-W [2016-10-23 11:53:14.504 +05]
(akonadi_kalarm_dir_resource_3:3650:log_kalarmdirresource)
kdepim-runtime/resources/kalarm/kalarmdir/kalarmdirresource.cpp:462:KAlarmDirResource::loadFile
- File "~/.local/share/kalarm/active/KAlarm-1136218218.463" : event id differs
from file name
Qt-C [2016-10-23 11:53:14.977 +05] (akonadi_kalarm_dir_resource_3:3650:default)
kcalcore/src/icalformat.cpp:89:KCalCore::ICalFormat::load - load error
Qt-C [2016-10-23 11:53:14.978 +05] (akonadi_kalarm_dir_resource_3:3650:default)
kcalcore/src/icalformat.cpp:89:KCalCore::ICalFormat::load - load error
Qt-W [2016-10-23 11:53:14.978 +05]
(akonadi_kalarm_dir_resource_3:3650:log_kalarmdirresource)
kdepim-runtime/resources/kalarm/kalarmdir/kalarmdirresource.cpp:446:KAlarmDirResource::loadFile
- Error loading "~/.local/share/kalarm/active/KAlarm-1136218218.463.Hv3650"
Qt-W [2016-10-23 11:53:14.978 +05]
(akonadi_kalarm_dir_resource_3:3650:log_kalarmdirresource)
kdepim-runtime/resources/kalarm/kalarmdir/kalarmdirresource.cpp:986:KAlarmDirResource::modifyItem
- Invalid mime type for collection

I don't understand what code creates temporary file. It is possible that temp
file created implicitly by library code. Strace shows that temp file created by
akonadi_kalarm_dir_resource_n process, but I cannot find code responsible for
this.

I'm able to rebuild and test patch for version 15.12.3 available in Ubuntu
16.04, but I don't know how to properly upgrade entire stack to more recent
versions like 16.04 or 16.08. It is possible to provide patch for old version?

-- 
You are receiving this mail because:
You are watching all bug changes.


[kalarm] [Bug 370627] akonadi_kalarm_dir_resource watch triggered by temp files

2016-10-21 Thread David Jarvie via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370627

--- Comment #1 from David Jarvie  ---
I don't see the error message in ~/.xsession-errors on my system, and therefore
I can't test whether a fix will work. Can you confirm which line in
kalarmdirresource.cpp produces the error - is it the call to loadFile(path,
file) in fileChanged() ?

It also isn't obvious where any temporary files are created with a name pattern
like the one you report. The only place I can see that creates a temporary file
is in fileStorage->save() in writeToFile(), which creates a file with '~'
suffix.

If I supply a patch, would you be able to rebuild and test it?

-- 
You are receiving this mail because:
You are watching all bug changes.