Crash receiving notifications icons

Albert Vaca albertvaka at gmail.com
Mon Mar 12 21:37:28 UTC 2018


Ok, looks like the update() method of the notification is called several
times, and each time it does:

The icon file exists?
Nope -> Then create a download job for it

The downloadjob will create the file, but it is async. Hence, the second
time update is called, the icon still doesn't exist and a new downloadjob
is created.

We need to make sure that the second time update is called, we don't try to
download again something that is already in the process of being download.

Not sure how to do it, though :D

Also, would be nice if update doesn't get called several times in a row.

Albert


On Mon, Mar 12, 2018 at 10:21 PM, Albert Vaca <albertvaka at gmail.com> wrote:

> It seems that the download is triggered several times.
>
> The first one succeeds, the second one fails, the third one fails and
> crashes KDE Connect.
>
> Any idea why this happens?
>
> kdeconnect.core: FileTransferJob Downloading payload to
> QUrl("file:///tmp/kdeconnect_vaka/d991fcc0a831069ef692586af8efbd84")
> size: 22175
> kdeconnect.core: FileTransferJob Downloading payload to
> QUrl("file:///tmp/kdeconnect_vaka/d991fcc0a831069ef692586af8efbd84")
> size: 22175
> kdeconnect.core: FileTransferJob Downloading payload to
> QUrl("file:///tmp/kdeconnect_vaka/d991fcc0a831069ef692586af8efbd84")
> size: 22175
> kdeconnect.core: FileTransferJob Downloading payload to
> QUrl("file:///tmp/kdeconnect_vaka/d991fcc0a831069ef692586af8efbd84")
> size: 22175
> kdeconnect.core: Finished transfer QUrl("file:///tmp/kdeconnect_vaka/
> d991fcc0a831069ef692586af8efbd84")
> kdeconnect.core: Couldn't transfer the file successfully
> QNetworkReply::NetworkError(UnknownNetworkError) "/tmp/kdeconnect_vaka/
> d991fcc0a831069ef692586af8efbd84"
> kdeconnect.plugin.notification: Error in FileTransferJob:  "Received
> incomplete file: /tmp/kdeconnect_vaka/d991fcc0a831069ef692586af8efbd84"
> kdeconnect.core: Finished transfer QUrl("file:///tmp/kdeconnect_vaka/
> d991fcc0a831069ef692586af8efbd84")
> kdeconnect.plugin.notification: Error in FileTransferJob:  "Received
> incomplete file: /tmp/kdeconnect_vaka/d991fcc0a831069ef692586af8efbd84"
> Segmentation fault (core dumped)
>
>
> Albert
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20180312/a14912a8/attachment.html>


More information about the KDEConnect mailing list