signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.53k stars 2.63k forks source link

Signal for Windows creates *.tmp.ico files in the Temp folder and doesn't delete them on exit #6927

Open Phillipus opened 2 months ago

Phillipus commented 2 months ago

Using a supported version?

Overall summary

Signal for Windows creates a new *.tmp.ico file in the Temp folder and doesn't delete it on exit. As these files are 414kb after a while the Temp folder is full of many MBs of files that clog up the disk.

Steps to reproduce

  1. Launch Signal
  2. Quit Signal
  3. Observe a multitude of files named <guid>.tmp.ico in the Windows Temp folder

Expected result

Signal should delete these temp files on exit.

Actual result

Signal doesn't delete these temp files on exit.

Screenshots

No response

Signal version

7.14.0

Operating system

Windows 11

Version of Signal on your phone

No response

Link to debug log

No response

indutny-signal commented 1 month ago

@Phillipus sorry for a long delay. Now that I look into it I don't see a place in our codebase that might create those. If you'll get a chance could you see what kind of images those are? Are they avatars of your contacts/groups, or something else?

Phillipus commented 1 month ago

It's an app icon. Example attached, although it's easy to reproduce on Windows - just look in your C:\Users\username\AppData\Local\Temp folder.

icon.zip

indutny-signal commented 1 month ago

Thank you! I can definitely see the files. I suspect that they are created at install/update time, and not as a part of running the app. However, looking through our installer's code it isn't immediately clear how it can create those either...

We'll have to investigate it further!

Phillipus commented 1 month ago

I suspect that they are created at install/update time, and not as a part of running the app

No, that's wrong. They are created when the app starts.

  1. Launch Signal
  2. Quit Signal
  3. Repeat 1 and 2 several times
  4. A file named .tmp.ico is created in the Windows Temp folder for each launch of the app
Phillipus commented 1 month ago

We'll have to investigate it further!

Perhaps take a look here - https://github.com/electron/electron/issues/10139

Phillipus commented 1 month ago

And also here - https://github.com/signalapp/Signal-Desktop/issues/6216

indutny-signal commented 1 month ago

We have a fix coming. Thank you for the report!

FWIW, upon looking at Electron's code I realized that these should be deleted upon restart.