Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alacritty stops responding shortly after first few keyboard strokes on Mac OS #1803

Open
pault-t-canva opened this issue Nov 15, 2018 · 7 comments

Comments

@pault-t-canva
Copy link

Which operating system does the issue occur on?

MacOS Sierra 10.13.6

When running from d68ecb0, I find that the running Alacritty only appears to work for the first few seconds. Weirdly enough, it only starts to fail if I type more than around 5 characters within approximately 5 seconds. Anything slower than that it appears to stay healthy. When it fails, the debug output stops completely, and it starts to not respond to anything at all. It does not recover.

The following is a log from running alacritty with -vvv and --print-events.

The alacritty.yml file is the default osx copy from the repository with no changes.

Welcome to Alacritty.
Configuration loaded from /Users/pault/.config/alacritty/alacritty.yml
device_pixel_ratio: 2
width: 2048, height: 1536
Initializing glyph cache
Finished initializing glyph cache in 0.089509427
width: 1128, height: 680
Cell Size: (14 x 28)
Padding: (4 x 4)
PTY Dimensions: Line(24) x Column(80)
Scaling RGB by 0.66 from Rgb { r: 234, g: 234, b: 234 } to Rgb { r: 154, g: 154, b: 154 }
Using config-provided dim colors
Scaling RGB by 0.66 from Rgb { r: 234, g: 234, b: 234 } to Rgb { r: 154, g: 154, b: 154 }
Using config-provided dim colors
Initialisation complete
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: HiDpiFactorChanged(2.0) }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: Resized(LogicalSize { width: 1024.0, height: 768.0 }) }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: Resized(LogicalSize { width: 564.0, height: 340.0 }) }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: Moved(LogicalPosition { x: 328.0, y: 499.0 }) }
Font size changed: Size(24) [DPR: 2]
Term::resize
Term::resize dimensions unchanged
width: 1128, height: 680
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: Focused(true) }
Set Attribute: Bold
Set Attribute: Reverse
Set Attribute: CancelReverse
Set Attribute: Bold
Set Attribute: Reset
carriage_return
carriage_return
glutin event: Awakened
carriage_return
Set Attribute: Reset
Set Attribute: CancelReverse
Set Attribute: CancelUnderline
clear_screen: Below
Set Attribute: Bold
Set Attribute: Foreground(Named(Green))
Set Attribute: Foreground(Named(Cyan))
Set Attribute: Reset
clear_line: Right
set_mode: CursorKeys
set mode::TermMode::APP_KEYPAD
set_mode: BracketedPaste
glutin event: Awakened
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 0, state: Pressed, virtual_keycode: Some(A), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: ReceivedCharacter('a') }
glutin event: Awakened
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 0, state: Released, virtual_keycode: Some(A), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 11, state: Pressed, virtual_keycode: Some(B), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: ReceivedCharacter('b') }
backspace
glutin event: Awakened
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 11, state: Released, virtual_keycode: Some(B), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 8, state: Pressed, virtual_keycode: Some(C), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: ReceivedCharacter('c') }
glutin event: Awakened
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 8, state: Released, virtual_keycode: Some(C), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 2, state: Pressed, virtual_keycode: Some(D), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: ReceivedCharacter('d') }
glutin event: Awakened
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 2, state: Released, virtual_keycode: Some(D), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 14, state: Pressed, virtual_keycode: Some(E), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: ReceivedCharacter('e') }
glutin event: Awakened
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 14, state: Released, virtual_keycode: Some(E), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 3, state: Pressed, virtual_keycode: Some(F), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: ReceivedCharacter('f') }
glutin event: Awakened
glutin event: WindowEvent { window_id: WindowId(Id(140423708365312)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 3, state: Released, virtual_keycode: Some(F), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }

I'm happy to do any debugging that may help

@chrisduerr
Copy link
Member

Some keyboard combinations halt the I/O of a terminal emulator. Just to make sure: Executing Ctrl+C does not give back control, right? And Ctrl+D does not close Alacritty?

@pault-t-canva
Copy link
Author

Neither of those combinations give back control, or even show up as a received glutin event in the background log.

@jwilm
Copy link
Contributor

jwilm commented Nov 15, 2018

@pault-t-canva does CPU consumption jump to 100%? Are you able to repro in the window example in winit?

@pault-t-canva
Copy link
Author

Yeah, it appears to get a single core straight to 100%
image

Trying the window example in winit gets me a gray window. The debug log in the background continues, but CPU spikes, and the mac os beachball (app not responding) starts within around the same time that it does in alactritty.

@pault-t-canva
Copy link
Author

Ah, looks like the issue definitely lies in winit.

What's happening when i run the window example is the log shows the correct events coming through. Then if i type a few keys in relatively quick succession, it keeps replaying these events even though I have stopped typing keys. Basically those keys never appear to get off the event queue for some reason

@pault-t-canva
Copy link
Author

Should I close this and open an issue on winit?

@chrisduerr
Copy link
Member

If you'd open an issue with winit, that would help a lot. But you can keep this one open to track the problem for others. Just share a link to the winit issue here so everyone can follow the progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants