dvdhrm / kmscon

Linux KMS/DRM based virtual Console Emulator
http://www.freedesktop.org/wiki/Software/kmscon
Other
432 stars 79 forks source link

wlterm: craches when trying to resize window #52

Closed giselher closed 11 years ago

giselher commented 11 years ago

Sometimes when I try to resize the terminal window it freezes and I can't enter anything except for closing the window.

dvdhrm commented 11 years ago

Huh, your title scared me, because I was hunting down crashes in the TSM resize layer for like 2 weeks and thought they are finally fixed. But it's only a freeze, that's ok. I guess it's because of a missed frame-callback.

Could you describe the problem a bit more detailed? I'm especially interested in the "./wlterm --debug" log. Also, what do you mean by "closing"? Do you kill the binary or does the "exit" button still work? Does the whole app freeze or does only the keyboard input freeze? Does resize still work? Can you still move the window? What Wayland version are you using? Are you running it under weston? Please note that I am currently working on getting kmscon-6 out, so I haven't spent too much time on wlterm. In fact, I didn't update it correctly to the Wayland-1.0 API. I hope I can rewrite that layer at the coming weekend, but no guarantees, sorry. Any patches are welcome.

To debug this, can you run wlterm with --debug and then send a signal to wlterm when it freezes? (something like SIGUSR which doesn't kill wlterm). And if you are comfortable with GDB, can you attach GDB to the freezed process, send SIGTRAP to it and print a stacktrace?

Thanks for the report! Maybe this will get fixed with my rewrite automatically. David

giselher commented 11 years ago

Sorry for the very moderate bug description.

After trying to resize the window I just can't enter any text or resize the window any more. But I can still move the window and closing the window through the exit button on the title bar also still works.

Here is the backtrace after sending SIGTRAP when wlterm freezing. Just let me know if you need more output. Sending SIGUSER just quits wlterm without producing a different output.

Currently logging to "wlterm.log".
Logs will be appended to the log file.
Output is being logged and displayed.
#0 0x00007ffff60b68e3 in __epoll_wait_nocancel () from /usr/lib/libc.so.6
#1 0x00007ffff75abe20 in ev_eloop_dispatch (loop=loop@entry=0x624690, timeout=timeout@entry=-1) at src/eloop.c:809
#2 0x00007ffff75ac410 in ev_eloop_run (loop=0x624690, timeout=timeout@entry=-1) at src/eloop.c:896
#3 0x00000000004047e3 in main (argc=<optimized out>, argv=0x7fffffffe218) at src/wlt_main.c:443
[0000.000000] NOTICE: wlterm Build #1 Oct 30 2012 21:56:36
[0000.000071] DEBUG: text_font: register font backend 8x16 (kmscon_font_register() in src/text_font.c:174)
[0000.000159] DEBUG: text_font: register font backend pango (kmscon_font_register() in src/text_font.c:174)
[0000.000180] DEBUG: text_font: register font backend freetype2 (kmscon_font_register() in src/text_font.c:174)
[0000.000219] DEBUG: eloop: new eloop object 0x2135690 (ev_eloop_new() in src/eloop.c:649)
[0000.000255] DEBUG: wlt_toolkit: creating new wlt-display (wlt_display_new() in src/wlt_toolkit.c:1093)
[0000.000436] DEBUG: wlt_toolkit: wlt-display waiting for globals... (wlt_display_new() in src/wlt_toolkit.c:1182)
[0000.000475] DEBUG: eloop: run for -1 msecs (ev_eloop_run() in src/eloop.c:892)
[0000.000574] DEBUG: wlt_toolkit: new wl_display global (dp_global() in src/wlt_toolkit.c:1000)
[0000.000602] DEBUG: wlt_toolkit: new global wl_compositor (dp_global() in src/wlt_toolkit.c:1074)
[0000.000624] DEBUG: wlt_toolkit: ignoring new unknown global screenshooter (dp_global() in src/wlt_toolkit.c:1070)
[0000.000639] DEBUG: wlt_toolkit: ignoring new unknown global text_cursor_position (dp_global() in src/wlt_toolkit.c:1070)
[0000.000654] DEBUG: wlt_toolkit: ignoring new unknown global text_model_factory (dp_global() in src/wlt_toolkit.c:1070)
[0000.000671] DEBUG: wlt_toolkit: new global wl_data_device_manager (dp_global() in src/wlt_toolkit.c:1074)
[0000.000689] DEBUG: wlt_toolkit: new global wl_shm (dp_global() in src/wlt_toolkit.c:1074)
[0000.000705] DEBUG: wlt_toolkit: new global wl_seat (dp_global() in src/wlt_toolkit.c:1074)
[0000.000720] DEBUG: wlt_toolkit: ignoring new unknown global input_method (dp_global() in src/wlt_toolkit.c:1070)
[0000.000734] DEBUG: wlt_toolkit: ignoring new unknown global wl_output (dp_global() in src/wlt_toolkit.c:1070)
[0000.000753] DEBUG: wlt_toolkit: ignoring new unknown global wl_drm (dp_global() in src/wlt_toolkit.c:1070)
[0000.000769] DEBUG: wlt_toolkit: new global wl_shell (dp_global() in src/wlt_toolkit.c:1074)
[0000.000784] DEBUG: wlt_toolkit: ignoring new unknown global desktop_shell (dp_global() in src/wlt_toolkit.c:1070)
[0000.000799] DEBUG: wlt_toolkit: ignoring new unknown global screensaver (dp_global() in src/wlt_toolkit.c:1070)
[0000.000813] DEBUG: wlt_toolkit: ignoring new unknown global input_panel (dp_global() in src/wlt_toolkit.c:1070)
[0000.000832] DEBUG: wlt_toolkit: ignoring new unknown global workspace_manager (dp_global() in src/wlt_toolkit.c:1070)
[0000.000884] DEBUG: wlt_toolkit: wayland display initialized (check_ready() in src/wlt_toolkit.c:956)
[0000.017769] INFO: wlt: wayland display initialized
[0000.018580] DEBUG: wlt_theme: create new theme (wlt_theme_new() in src/wlt_theme.c:569)
[0000.018633] DEBUG: text_font: searching for: be: pango nm: monospace ppi: 96 pt: 12 b: 0 i: 0 he: 0 wt: 0 (kmscon_font_find() in src/text_font.c:337)
[0000.018653] DEBUG: text_font_pango: loading pango font monospace (kmscon_font_pango_init() in src/text_font_pango.c:372)
[0000.044981] DEBUG: text_font: using: be: pango nm: monospace ppi: 96 pt: 13 b: 0 i: 0 he: 18 wt: 10 (kmscon_font_find() in src/text_font.c:404)
[0000.045109] DEBUG: tsm_screen: new screen (tsm_screen_new() in src/tsm_screen.c:455)
[0000.045147] DEBUG: tsm_vte: new vte object (tsm_vte_new() in src/tsm_vte.c:395)
[0000.045204] DEBUG: eloop: new eloop object 0x21e2b20 (ev_eloop_new() in src/eloop.c:649)
[0000.045220] DEBUG: pty: new pty object (kmscon_pty_new() in src/pty.c:94)
[0000.045307] DEBUG: pty: forking child (pty_spawn() in src/pty.c:345)
Error:    Key "<LFSH>" added to modifier map for multiple modifiers; Using Lock, ignoring Shift
[0007.961722] INFO: wlt: closing window
[0007.961770] DEBUG: eloop: exiting 0x2135690 (ev_eloop_exit() in src/eloop.c:931)
[0007.961789] DEBUG: wlt_theme: destroy theme (widget_destroy() in src/wlt_theme.c:556)
[0007.961808] DEBUG: tsm_vte: destroying vte object (tsm_vte_unref() in src/tsm_vte.c:421)
[0007.961831] DEBUG: tsm_screen: destroying screen (tsm_screen_unref() in src/tsm_screen.c:489)
[0007.962262] DEBUG: text_font: unregister font backend freetype2 (kmscon_font_unregister() in src/text_font.c:221)
[0007.962285] DEBUG: text_font: unregister font backend pango (kmscon_font_unregister() in src/text_font.c:221)
[0007.962300] DEBUG: text_font: unregister font backend 8x16 (kmscon_font_unregister() in src/text_font.c:221)
[0007.962318] INFO: wlt: exiting
[22:13:18.665] libwayland: disconnect from client 0x1a37580
dvdhrm commented 11 years ago

Yeah, that sounds like some missing frame-event. Sorry for the delay, but I am currently swamped with other work. The WLT rewrite is still on my todo-list and I will try investigating more tomorrow.

Thanks a lot for the report! David

dvdhrm commented 11 years ago

I got a fix for that: e0f798071c786e4b2e622d18d1cd1ab0dba585ae Can you test whether this fixes the problems?

Sorry for the delay, but I was working hard to get kmscon ready for FOSDEM13. I will try to rework the WLT toolkit in February. David

giselher commented 11 years ago

Yes this fixes my problems. Thank you.