You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected error: EMFILE: too many open files, open 'C:\Users\Administrator\AppData\Roaming\marktext\preferences.json' #2906
🐹 platform/windowsPull request or issue on Windows🐛 bugSomething isn't working🐞 pri/criticalBugs which cause the Mark Text crash or unable to continue normal use
Error: EMFILE: too many open files, open 'C:\Users\Administrator\AppData\Roaming\marktext\preferences.json'
at Object.openSync (fs.js:466:3)
at Object.func [as openSync] (electron/js2c/asar_bundle.js:5:1812)
at Object.readFileSync (fs.js:368:35)
at Object.e.readFileSync (electron/js2c/asar_bundle.js:5:8583)
at ElectronStore.get store [as store] (D:\Program Files\Mark Text\resources\app.asar\node_modules\conf\dist\source\index.js:262:29)
at ElectronStore._get (D:\Program Files\Mark Text\resources\app.asar\node_modules\conf\dist\source\index.js:451:33)
at ElectronStore.get (D:\Program Files\Mark Text\resources\app.asar\node_modules\conf\dist\source\index.js:149:25)
at tn.getItem (D:\Program Files\Mark Text\resources\app.asar\dist\electron\main.js:2:303467)
at tn.getPreferedEol (D:\Program Files\Mark Text\resources\app.asar\dist\electron\main.js:2:303650)
at Wt.openTabs (D:\Program Files\Mark Text\resources\app.asar\dist\electron\main.js:2:281474)
Version
Mark Text: v0.16.3
Operating system: Windows_NT x64 10.0.17763 (win32)
Thank you for taking the time to report this issue. This seems to be an issue with your OS that to many file handles are opened. Did you opened a deep folder in MarkText, like C:\?
Closing — EMFILE: too many open files is an OS-level file-descriptor exhaustion error, not a MarkText bug per se. The trace shows fs.openSync failing on preferences.json, which means the process (or the whole system) had hit its open-file limit before this call.
This typically happens when something else on the machine leaks file handles (Windows Search indexers, certain antivirus products, or a runaway script) and MarkText just happens to be the first process to fail when the limit is exhausted.
If you can reproduce this on a fresh boot with only MarkText running, please reopen with the version and steps — that would indicate an actual fd leak inside MarkText. Otherwise this is environmental.
🐹 platform/windowsPull request or issue on Windows🐛 bugSomething isn't working🐞 pri/criticalBugs which cause the Mark Text crash or unable to continue normal use
Activity
fxha commentedon Jan 21, 2022
Thank you for taking the time to report this issue. This seems to be an issue with your OS that to many file handles are opened. Did you opened a deep folder in MarkText, like
C:\?Jocs commentedon May 23, 2026
Closing —
EMFILE: too many open filesis an OS-level file-descriptor exhaustion error, not a MarkText bug per se. The trace showsfs.openSyncfailing onpreferences.json, which means the process (or the whole system) had hit its open-file limit before this call.This typically happens when something else on the machine leaks file handles (Windows Search indexers, certain antivirus products, or a runaway script) and MarkText just happens to be the first process to fail when the limit is exhausted.
If you can reproduce this on a fresh boot with only MarkText running, please reopen with the version and steps — that would indicate an actual fd leak inside MarkText. Otherwise this is environmental.