Error writing to file
From: Mateus
Country: {{{Country}}}
Sent: {{{Sent}}}
Subject: {{{Subject}}}
Question:
The following error happens when trying to do certain operations like extracting a portion of a topic.
Error writing to file: C:\SUPERMEMO\SYSTEMS\(omitted)\temp\Element#3619-Component#1.htm I/O error 32
Answer:
This is very dangerous. Most likely, some other applications or services are locking the files that are in use by SuperMemo.
Please review most likely culprits here: Some applications lock SuperMemo files and cause errors
followup
My PC has Windows defender (and *Avast, since the link talks about "some anti-virus programs").
Should I uninstall Defender? This error happens randomly; I don't understand why it would block only at certain occasions. I have basically science, philosophy, law and history texts, so I don't think it matched some string of text to a malware.
anti-virus software
- Do not uninstall anti-virus software! That is always dangerous. For each application, see how to exclude SuperMemo folders from background scans. You can scan those folders manually when not working with SuperMemo
- Randomness comes from the coincidence of the two: (1) you need to work on the file A of your set, (2) anti-virus need to lock the same file A while you try to update it. If this occurs on your HTML texts, you might get an old text (i.e. lose your edits). If it happens in system files in the collection, you may lose the collection
- Malware string match leads to the worst case scenario, i.e. wiping whole files by anti-virus software. However, a random lock ill occur on ANY file
Follow-up
Another frightening error: "Access denied!
Deleting files: C:\SUPERMEMO\SYSTEMS\(omitted)\elements\11\4\3343.* Cannot delete this file: C:\SUPERMEMO\(omitted)\elements\11\4\3343.HTM"
This happened after a extract operation. SuperMemo is off from my antivirus autoscan for some time already.
comments
- if this happens on extract, the only file that needs to be deleted is the "old version" of the article (replaced with the version that is marked with the extracted fragment)
- this does not need to be dangerous, if you keep a recent backup, and run Repair collection with Rebuild registries and Verify filespace, the file should be deleted, however, you may need to restart the PC just to be sure the lock on the file is released (otherwise repair will fail for the same reasons and would need to be repeated)
- see the HTML code of C:\SUPERMEMO\(omitted)\elements\11\4\3343.HTM .. perhaps it uses some suspect code that might lock the file in place (if so, please publish snippets, perhaps they should be part of filtering done on import)
- NB: copy and paste is much less safe that usual imports (no filtering at Paste) ... this may slightly increase the chance for similar mishaps