arakiken / mlterm

Other
154 stars 13 forks source link

Lockup using daemon mode #85

Open ortango opened 9 months ago

ortango commented 9 months ago

Occasionally, sometimes frequently mlterm will lock up when I spawn a terminal with mlclient (using xft type engine).

xft_font_open, ui_font_ft.c:357 returns xerror and mlterm gets stuck in error_handler. The following backtrace is missing symbols, but has a value for request_code that is not 0. Most of the traces were getting a 0 value, I'm not sure why. I can add a backtrace with full symbols.

#0  error_handler (display=0x5fa3a4ba4040, event=0x7ffcf0bda8d0) at ../uitoolkit/xlib/ui_display.c:54
#1   in _XError () from /usr/lib/libX11.so.6
#2   in ?? () from /usr/lib/libX11.so.6
#3   in ?? () from /usr/lib/libX11.so.6
#4   in _XReply () from /usr/lib/libX11.so.6
#5   in XRenderQueryFormats () from /usr/lib/libXrender.so.1
#6   in XRenderFindVisualFormat () from /usr/lib/libXrender.so.1
#7   in ?? () from /usr/lib/libXft.so.2
#8   in XftDefaultHasRender () from /usr/lib/libXft.so.2
#9   in XftDefaultSubstitute () from /usr/lib/libXft.so.2
#10  in XftFontMatch () from /usr/lib/libXft.so.2
#11  in xft_font_open (font=font@entry=0x5fa3a4b85ba0, family=family@entry=0x7ffcf0bdad80 "GohuFont Powerline", size=size@entry=14, weight=weight@entry=-1, slant=slant@entry=-1,
    ch_width=0, aa_opt=aa_opt@entry=0, encoding=0x0) at /usr/src/debug/mlterm-git/mlterm-git/uitoolkit/libtype/ui_font_ft.c:357
#12  in ft_font_open (use_xft=1, aa_opt=0, ch_width=0, slant=-1, weight=-1, encoding=0x0, size=14, family=0x7ffcf0bdad80 "GohuFont Powerline", font=0x5fa3a4b85ba0)
    at /usr/src/debug/mlterm-git/mlterm-git/uitoolkit/libtype/ui_font_ft.c:880
#13 fc_set_font (font=<optimized out>, fontname=<optimized out>, fontsize=<optimized out>, col_width=<optimized out>, letter_space=<optimized out>, aa_opt=<optimized out>, use_xft=1)
    at /usr/src/debug/mlterm-git/mlterm-git/uitoolkit/libtype/ui_font_ft.c:1019
#14  in xft_set_font (dpi=0, use_point_size=0, aa_opt=0, letter_space=0, col_width=0, fontsize=14, fontname=0x5fa3a4bd48c0 "GohuFont Powerline", font=0x5fa3a4b85ba0)
    at ../uitoolkit/xlib/ui_font.c:629
#15 ui_font_new (display=<optimized out>, id=id@entry=(unknown: 0xd1), size_attr=size_attr@entry=0, type_engine=<optimized out>, font_present=font_present@entry=0,
    fontname=fontname@entry=0x5fa3a4bd48c0 "GohuFont Powerline", fontsize=14, col_width=0, use_medium_for_bold=0, letter_space=0) at ../uitoolkit/xlib/ui_font.c:830
#16  in ui_font_cache_get_font (font_cache=font_cache@entry=0x5fa3a4b5dee0, font=(unknown: 0xd1)) at ui_font_cache.c:366
#17  in init_usascii_font (font_cache=0x5fa3a4b5dee0) at ui_font_cache.c:39
#18 ui_acquire_font_cache (display=display@entry=0x5fa3a4ba4040, font_size=font_size@entry=14, usascii_font_cs=usascii_font_cs@entry=ISO10646_UCS4_1, font_config=0x5fa3a4b73a70,
    letter_space=letter_space@entry=0) at ui_font_cache.c:183
#19  in ui_font_manager_new (display=0x5fa3a4ba4040, type_engine=TYPE_XFT, font_present=0, font_size=14, usascii_font_cs=usascii_font_cs@entry=ISO10646_UCS4_1,
    step_in_changing_font_size=1, letter_space=0, use_bold_font=1, use_italic_font=1) at ui_font_manager.c:161
#20  in open_screen_intern (disp_name=<optimized out>, term=<optimized out>, term@entry=0x0, layout=layout@entry=0x0, sep=0x0, horizontal=0, show_dialog=0) at ui_screen_manager.c:570
#21  in mlclient (self=self@entry=0x0, screen=screen@entry=0x0, args=args@entry=0x7ffcf0bdb340 "mlclient", fp=fp@entry=0x5fa3a4a94350) at ui_screen_manager.c:1262
#22  in ui_mlclient (args=args@entry=0x7ffcf0bdb340 "mlclient", fp=fp@entry=0x5fa3a4a94350) at ui_screen_manager.c:1504
#23  in client_connected () at daemon.c:149
#24  in receive_next_event () at ui_event_source.c:280
#25 ui_event_source_process () at ui_event_source.c:326
#26  in main_loop_start () at main_loop.c:546
#27  in main (argc=5, argv=0x7ffcf0bdb6b8) at main.c:199
(gdb) p event
$4 = (XErrorEvent *) 0x7ffcf0bda8d0
(gdb) p *event
$5 = {type = 0, display = 0x5fa3a4ba4040, resourceid = 1423, serial = 9, error_code = 1 '\001', request_code = 196 '\304', minor_code = 0 '\000'}
arakiken commented 8 months ago

Thanks. I'm sorry but I can't reproduce it in my environment. 1) Will you show me your ~/.mlterm/main and ~/.mlterm/aafont ? 2) Does this problem happen if you remove files in ~/.mlterm ?

ortango commented 8 months ago

Hey there, thanks for taking the time to check this out.

The same issue happens without a user mlterm configuration. I've included the main and aafont configs below anyway.

main

inner_border = 12
termtype = rxvt
fontsize = 14
type_engine = cairo
use_scrollbar = false
fg_color = #c0b18b
bg_color = #1f1f1f
cursor_fg_color = #1f1f1f
cursor_bg_color = #c0b18b

aafont

DEFAULT=GohuFont Powerline
ISCII_ASSAMESE  = AS-TTDurga 26
ISCII_BENGALI   = BN-TTDurga 26
ISCII_GUJARATI  = GJ-TTAvantika 21
ISCII_HINDI = DV-TTYogesh 23
ISCII_KANNADA   = KN-TTUma 25
ISCII_MALAYALAM = ML-TTKarthika 23
ISCII_ORIYA = OR-TTSarala 26
ISCII_PUNJABI   = PN-TTAmar 30
ISCII_TELUGU    = TL-TTHemalatha 25

note: