sedwards2009 / extraterm

The swiss army chainsaw of terminal emulators
https://extraterm.org
MIT License
2.52k stars 116 forks source link

Fails to start up with many fonts #304

Closed matt-e closed 3 years ago

matt-e commented 3 years ago
2020-11-12 22:52:59.512 INFO [MainConfig #0] Looking for application_paths.json at '/opt/extraterm/application_paths.json'
2020-11-12 22:52:59.514 INFO [main #0] Recording logs to  /home/meddey/.config/extraterm/extraterm.log
A JavaScript error occurred in the main process
Uncaught Exception:
Error: spawnSync /opt/extraterm/resources/app/extraterm/resources/list-fonts-json-binary/linux-x64/list-fonts-json ENOBUFS
    at Object.spawnSync (internal/child_process.js:1041:20)
    at spawnSync (child_process.js:616:24)
    at Object.execFileSync (child_process.js:643:15)
    at Object.func [as execFileSync] (electron/js2c/asar.js:140:31)
    at Object.getAvailableFontsSync (/opt/extraterm/resources/app/extraterm/dist/main_process/FontList.js:20:40)
    at getFonts (/opt/extraterm/resources/app/extraterm/dist/main_process/Main.js:631:42)
    at main (/opt/extraterm/resources/app/extraterm/dist/main_process/Main.js:100:28)
    at Object.<anonymous> (/opt/extraterm/resources/app/extraterm/dist/main_process/Main.js:1100:1)
    at Module._compile (internal/modules/cjs/loader.js:967:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1004:10)

Lots of font bytes:

# /opt/extraterm/resources/app/extraterm/resources/list-fonts-json-binary/linux-x64/list-fonts-json | wc -c
1239436

I think there just needs to be a bigger buffer (docs)

sedwards2009 commented 3 years ago

holy moly! It looks like you've cracked the puzzle here! I've spent a heap of time barking up the wrong tree trying to fix this problem lately. The process being terminated looked like a crash to me, and put me on the wrong path.

Thank you so much!

sedwards2009 commented 3 years ago

Fixed in v0.55.1.