RealRaven2000 / FiltaQuilla

Adds many new mail filter actions to Thunderbird
http://quickfilters.quickfolders.org/filtaquilla.html
GNU General Public License v3.0
88 stars 17 forks source link

Detach files option - out of memory error with many attachments #307

Open Dirk123456789 opened 1 month ago

Dirk123456789 commented 1 month ago

Hi, So, I've just started using FiltaQuilla, and I've been trying to automate the saving of attachments to a particular folder. However, it's not always successful, and it seems I've found why.

Manually running a simple filter (only action is 'detach attachments to') on a sample message, nothing appears to happen. This is a message with a large number (50) of small attachments (total 5.8MB, around 100k each). Looking at the console log, I see (I've filtered out my username, but the rest is correct) A collection of messages saying FiltaQuilla is detaching attachments, counting from [0] to [21], and then an uncaught 'out of memory' exception, at which point execution stops, and none of the attachments are saved.

Log excerpt: ..... FiltaQuilla 8:12:42.109 [0 ms]
Detach attachment [21] to I:\Files... msgURI=imap-message://XXXX%40gmail.com@imap.gmail.com/INBOX#53510 att.url=imap://XXXX%40gmail%2Ecom@imap.gmail.com:993/fetch%3EUID%3E/INBOX%3E53510?part=1.23&filename=162340750.jpg att.ncontentType=image/jpeg filtaquilla-util.js:222:13 uncaught exception: out of memory

Running the same filter on a message with only a few attachments works correctly

Dirk123456789 commented 1 month ago

As a follow-up - for whatever reason, it looks like 21 is the magic number. I've now tried to run the filter on messages with varying numbers of attachments, and it always fails at 21. It doesn't seem to matter the size of the attachments - one example had 26, but a total size of only 638k, and it still failed with the same out of memory error after RealRaven2000/quickFilters#21.

RealRaven2000 commented 1 month ago

transferred issue to the FiltaQuilla github, as it is a separate Add-on with its own repository...

Dirk123456789 commented 1 month ago

Ah - my apologies, my trail of looking through documentation took me through a few hoops and ended up here. Thanks for the correction!