insta-crash on windows with no logs
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
20220905-102802-7d4b8249
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
Just installed wezterm on a new windows machine, launched wezterm and got the following message: 09:58:59.582 ERROR mux::connui > Configuration Error: Unable to load a font specified by your font=wezterm.font('DroidSansMono NF', {weight="DemiBold", stretch='Normal', style=Normal}) configuration. Fallback(s) are being used instead, and the terminal may not render as intended. An alternative variant of the font was requested; TrueType and OpenType fonts don't have an automatic way to produce these font variants, so a separate font file containing the bold or italic variant must be installed. See https://wezfurlong.org/wezterm/config/fonts.html for more information
Then I went and installed the NF font my config was using. Now every time I launch wezterm, it would insta-crash with no additional logs written. Even if I change my config to use other fonts, or after I deleted the NF font from my system, it still doesn't help. Any idea what's wrong here?
To Reproduce
No response
Configuration
local wezterm = require 'wezterm'
return {
font = wezterm.font(
'DroidSansMono NF',
{
weight = 'DemiBold'
}
),
font_size = 12.0,
color_scheme = 'Rosé Pine Moon (base16)',
tab_bar_at_bottom = true,
tab_max_width = 64,
use_fancy_tab_bar = false,
window_decorations = "RESIZE",
window_frame = {
font_size = 12.0,
},
leader = { key = '`', mods = '' },
keys = {
{
key = 'c',
mods = 'ALT',
action = wezterm.action.SendString('\x03')
},
{
key = 'c',
mods = 'CTRL',
action = wezterm.action.CopyTo('Clipboard')
},
{
key = 'v',
mods = 'CTRL',
action = wezterm.action.PasteFrom('Clipboard')
},
{
key = '`',
mods = 'LEADER',
action = wezterm.action.SendString '`'
},
{
key = 'c',
mods = 'LEADER',
action = wezterm.action.SpawnTab 'CurrentPaneDomain'
},
{
key = 'x',
mods = 'LEADER',
action = wezterm.action.CloseCurrentTab { confirm = false }
},
{
key = '1',
mods = 'LEADER',
action = wezterm.action.ActivateTab(0)
},
{
key = '2',
mods = 'LEADER',
action = wezterm.action.ActivateTab(1)
},
{
key = '3',
mods = 'LEADER',
action = wezterm.action.ActivateTab(2)
},
{
key = '4',
mods = 'LEADER',
action = wezterm.action.ActivateTab(3)
},
{
key = '5',
mods = 'LEADER',
action = wezterm.action.ActivateTab(4)
},
{
key = '6',
mods = 'LEADER',
action = wezterm.action.ActivateTab(5)
},
},
default_prog = {
'C:\\Windows\\System32\\wsl.exe',
'-d',
'Ubuntu-22.04',
'--cd',
'~'
},
launch_menu = {
{
label = 'Ubuntu',
args = {
'C:\\Windows\\System32\\wsl.exe',
'-d',
'Ubuntu-22.04'
}
},
{
label = 'Powershell',
args = {
'C:\\Program Files\\PowerShell\\7\\pwsh.exe'
}
}
}
}
Expected Behavior
wezterm should either launch correctly or crash but with useful error logs.
Logs
No response
Anything else?
No response
If you run wezterm.exe from another terminal, do you see anything logged?
@wez just tried that - still crashing with no logs.
worth noting that with wezterm.exe it was the same thing - first time I ran it, wezterm did start and gave me the font not found message. second time it starts to insta-crash.
Mine is crashing after PowerShell 7.3.0 update. If I use some other shell, it's fine.
Try setting this:
return {
exit_behavior = "CloseOnCleanExit"
}
https://wezfurlong.org/wezterm/config/lua/config/exit_behavior.html
I'm getting:
Process "pwsh" in domain "local" didn't exit cleanly Exited with code 3221226505.
It seems like a special exit code for stack overflow. It's interesting because if I run PowerShell trough Windows terminal it works.
Using this fixed it for me:
default_prog = { "c:/Program Files/PowerShell/7/pwsh" },
Previously I had:
default_prog = { "pwsh" },
I noticed it was somehow using wrong binary after PowerShell version update. If I started Windows terminal, I would get the last version, but in wezterm I would get the previous version and a crash. Typing pwsh in any other terminal would start the last version, so the PATH setup seemed to be correct. And this was after restart so it was fully in effect.
I still have no idea why it seems rather strange.
Treating as a duplicate of:
- #3928 which now has much clearer messaging in the latest release
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.