* bug#38038: 27.0.50; Emacs freezes opening tabs. [not found] <20191102214135.lehpefr5o4cji6ca.ref@Ergus> @ 2019-11-02 21:41 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-02 22:20 ` Juri Linkov 0 siblings, 1 reply; 19+ messages in thread From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-02 21:41 UTC (permalink / raw) To: 38038 Hi when using emacs in gui I can't open a new tab if I add these lines to my config: (set-face-attribute 'tab-bar nil :background "#000000" :foreground "#e5e5e5" :inverse-video nil) (set-face-attribute 'tab-bar-tab nil :weight 'ultra-bold :underline t) (set-face-attribute 'tab-bar-tab-inactive nil :background "#000000" :foreground "#ffffff" :weight 'normal :underline nil) In tui there is no problem and in gdb I get this backtrace: ================================== In gdb the bt shows: #0 0x000055addb2b837f in mark_object (arg=<optimized out>) at ../../src/alloc.c:6583 #1 0x000055addb2b8f0e in mark_vectorlike (header=0x7f98b16ae700) at ../../src/alloc.c:6157 #2 0x000055addb2b8373 in mark_object (arg=<optimized out>) at ../../src/alloc.c:6581 #3 0x000055addb2b8f0e in mark_vectorlike (header=0x7f98b16ae660) at ../../src/alloc.c:6157 #4 0x000055addb2b8373 in mark_object (arg=<optimized out>) at ../../src/alloc.c:6581 #5 0x000055addb2b8f0e in mark_vectorlike (header=0x7f98b16ab3f8) at ../../src/alloc.c:6157 (repeats this until) #1968 0x000055addb2b8f0e in mark_vectorlike (header=0x7f98b167e4e0) at ../../src/alloc.c:6157 #1969 0x000055addb2b8373 in mark_object (arg=<optimized out>) at ../../src/alloc.c:6581 #1970 0x000055addb2b8f0e in mark_vectorlike (header=0x7f98b1bc0f28) at ../../src/alloc.c:6157 #1971 0x000055addb2b8373 in mark_object (arg=<optimized out>) at ../../src/alloc.c:6581 #1972 0x000055addb2b8169 in visit_vectorlike_root (type=GC_ROOT_BUFFER_LOCAL_DEFAULT, ptr=<optimized out>, visitor=...) at ../../src/alloc.c:5693 #1973 0x000055addb2b8169 in visit_buffer_root (type=GC_ROOT_BUFFER_LOCAL_DEFAULT, buffer=<optimized out>, visitor=...) at ../../src/alloc.c:5708 #1974 0x000055addb2b8169 in visit_static_gc_roots (visitor=...) at ../../src/alloc.c:5720 #1975 0x000055addb2b9761 in garbage_collect () at ../../src/alloc.c:5941 #1976 0x000055addb2ba121 in maybe_garbage_collect () at ../../src/alloc.c:5853 #1977 0x000055addb2d6475 in maybe_gc () at ../../src/lisp.h:5061 #1978 0x000055addb2d6475 in Ffuncall (nargs=4, args=0x7ffc4de5fca0) at ../../src/eval.c:2778 #1979 0x000055addb2d9164 in call3 (fn=<optimized out>, arg1=arg1@entry=0x55addd037973, arg2=<optimized out>, arg3=arg3@entry=0x0) at ../../src/eval.c:2668 #1980 0x000055addb265012 in cmd_error_internal (data=data@entry=0x55addd037973, context=context@entry=0x7ffc4de5fd00 "") at ../../src/lisp.h:3935 #1981 0x000055addb26514d in cmd_error (data=0x55addd037973) at ../../src/keyboard.c:953 #1982 0x000055addb2d5719 in internal_condition_case (bfun=bfun@entry=0x55addb26e140 <command_loop_1>, handlers=handlers@entry=0x90, hfun=hfun@entry=0x55addb265040 <cmd_error>) at ../../src/eval.c:1351 #1983 0x000055addb25fc24 in command_loop_2 (ignore=ignore@entry=0x0) at ../../src/lisp.h:1032 #1984 0x000055addb2d5681 in internal_catch (tag=tag@entry=0xd4d0, func=func@entry=0x55addb25fc00 <command_loop_2>, arg=arg@entry=0x0) at ../../src/eval.c:1116 #1985 0x000055addb25fbcb in command_loop () at ../../src/lisp.h:1032 #1986 0x000055addb264c56 in recursive_edit_1 () at ../../src/keyboard.c:714 #1987 0x000055addb264f82 in Frecursive_edit () at ../../src/keyboard.c:786 #1988 0x000055addb186910 in main (argc=1, argv=<optimized out>) at ../../src/emacs.c:2055 =================================== In GNU Emacs 27.0.50 (build 8, x86_64-pc-linux-gnu, GTK+ Version 3.24.12) of 2019-11-02 built on Ergus Repository revision: 9b1c00b3ca1a1f841cdcfd880536b0dc7669738a Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12005000 System Description: Arch Linux Recent messages: Loading /home/ergo/.emacs.d/custom.el (source)...done Starting new Ispell process /usr/bin/aspell with default dictionary...done For information about GNU Emacs and the GNU system, type C-h C-a. Load time 0.819347 Making completion list... user-error: End of history; no default available [3 times] Configured using: 'configure --prefix=/mnt/casa/install_arch/emacs --with-x-toolkit=gtk3 --with-xft --with-modules --with-mailutils' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-02 21:41 ` bug#38038: 27.0.50; Emacs freezes opening tabs Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-02 22:20 ` Juri Linkov 2019-11-02 22:55 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-07 14:01 ` Eli Zaretskii 0 siblings, 2 replies; 19+ messages in thread From: Juri Linkov @ 2019-11-02 22:20 UTC (permalink / raw) To: 38038; +Cc: spacibba > Hi when using emacs in gui I can't open a new tab if I add these lines > to my config: > > (set-face-attribute 'tab-bar-tab nil > :weight 'ultra-bold :underline t) Does Emacs freeze when you set the 'default' face to ultra-bold underline? (set-face-attribute 'default nil :weight 'ultra-bold :underline t) When I tried, it signals '(wrong-type-argument bufferp nil)' in "command-error-default-function" and goes into infinite loop. I have no idea what is wrong. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-02 22:20 ` Juri Linkov @ 2019-11-02 22:55 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-03 20:22 ` Juri Linkov 2019-11-07 14:01 ` Eli Zaretskii 1 sibling, 1 reply; 19+ messages in thread From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-02 22:55 UTC (permalink / raw) To: Juri Linkov; +Cc: 38038 On Sun, Nov 03, 2019 at 12:20:30AM +0200, Juri Linkov wrote: >> Hi when using emacs in gui I can't open a new tab if I add these lines >> to my config: >> >> (set-face-attribute 'tab-bar-tab nil >> :weight 'ultra-bold :underline t) > >Does Emacs freeze when you set the 'default' face to ultra-bold underline? > >(set-face-attribute 'default nil > :weight 'ultra-bold :underline t) > >When I tried, it signals '(wrong-type-argument bufferp nil)' >in "command-error-default-function" and goes into infinite loop. >I have no idea what is wrong. Hi I commented all my `set-face-attribute` lines and it works fine. Then I added only: (set-face-attribute 'default nil :weight 'ultra-bold :underline t) and it also freezes when opening a tab. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-02 22:55 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-03 20:22 ` Juri Linkov 0 siblings, 0 replies; 19+ messages in thread From: Juri Linkov @ 2019-11-03 20:22 UTC (permalink / raw) To: Ergus; +Cc: 38038 >> Does Emacs freeze when you set the 'default' face to ultra-bold underline? >> >> (set-face-attribute 'default nil :weight 'ultra-bold :underline t) >> >> When I tried, it signals '(wrong-type-argument bufferp nil)' >> in "command-error-default-function" and goes into infinite loop. >> I have no idea what is wrong. > > I commented all my `set-face-attribute` lines and it works fine. > > Then I added only: > > (set-face-attribute 'default nil :weight 'ultra-bold :underline t) > > and it also freezes when opening a tab. Ah, I see why you don't see the same freeze without using tab-bar. This is because you use the Gtk menu-bar and Gtk tool-bar. But when you configure to use non-toolkit menu-bar/tool-bar, it freezes immediately after evaluating the above line in 'emacs -Q'. I tried to debug, but it freezes while displaying the menu-bar in code that I don't understand. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-02 22:20 ` Juri Linkov 2019-11-02 22:55 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-07 14:01 ` Eli Zaretskii 2019-11-07 14:50 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-07 22:36 ` Juri Linkov 1 sibling, 2 replies; 19+ messages in thread From: Eli Zaretskii @ 2019-11-07 14:01 UTC (permalink / raw) To: Juri Linkov; +Cc: 38038, spacibba > From: Juri Linkov <juri@linkov.net> > Date: Sun, 03 Nov 2019 00:20:30 +0200 > Cc: spacibba@aol.com > > > Hi when using emacs in gui I can't open a new tab if I add these lines > > to my config: > > > > (set-face-attribute 'tab-bar-tab nil > > :weight 'ultra-bold :underline t) > > Does Emacs freeze when you set the 'default' face to ultra-bold underline? > > (set-face-attribute 'default nil > :weight 'ultra-bold :underline t) > > When I tried, it signals '(wrong-type-argument bufferp nil)' > in "command-error-default-function" and goes into infinite loop. > I have no idea what is wrong. Is this still an issue, or were these hangs solved? If this is still an issue, do you need help in debugging it? What else remains to be done with tabs before we can starte pretesting Emacs 27? Thanks. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-07 14:01 ` Eli Zaretskii @ 2019-11-07 14:50 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-07 22:36 ` Juri Linkov 1 sibling, 0 replies; 19+ messages in thread From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-07 14:50 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 38038, Juri Linkov AFAIK this issue is still there. On Thu, Nov 07, 2019 at 04:01:02PM +0200, Eli Zaretskii wrote: >> From: Juri Linkov <juri@linkov.net> >> Date: Sun, 03 Nov 2019 00:20:30 +0200 >> Cc: spacibba@aol.com >> >> > Hi when using emacs in gui I can't open a new tab if I add these lines >> > to my config: >> > >> > (set-face-attribute 'tab-bar-tab nil >> > :weight 'ultra-bold :underline t) >> >> Does Emacs freeze when you set the 'default' face to ultra-bold underline? >> >> (set-face-attribute 'default nil >> :weight 'ultra-bold :underline t) >> >> When I tried, it signals '(wrong-type-argument bufferp nil)' >> in "command-error-default-function" and goes into infinite loop. >> I have no idea what is wrong. > >Is this still an issue, or were these hangs solved? If this is still >an issue, do you need help in debugging it? > >What else remains to be done with tabs before we can starte pretesting >Emacs 27? > >Thanks. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-07 14:01 ` Eli Zaretskii 2019-11-07 14:50 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-07 22:36 ` Juri Linkov 2019-11-08 9:21 ` martin rudalics 1 sibling, 1 reply; 19+ messages in thread From: Juri Linkov @ 2019-11-07 22:36 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 38038, spacibba >> Does Emacs freeze when you set the 'default' face to ultra-bold underline? >> >> (set-face-attribute 'default nil >> :weight 'ultra-bold :underline t) >> >> When I tried, it signals '(wrong-type-argument bufferp nil)' >> in "command-error-default-function" and goes into infinite loop. >> I have no idea what is wrong. > > Is this still an issue, or were these hangs solved? If this is still > an issue, do you need help in debugging it? These hangs occur not only with tab-bar, but also with menu-bar when tab-bar is not enabled. These hangs can be reproduced by configuring --with-x-toolkit=no and running emacs -Q. Then evaluating this causes hangs: (set-face-attribute 'menu nil :weight 'ultra-bold :underline t) Unfortunately I don't understand what is wrong with code that implements non-native menu-bar/tool-bar/tab-bar. > What else remains to be done with tabs before we can starte pretesting > Emacs 27? I almost finished implementing auto-scrolling for bug#37667, but this needs more testing. I'll post the patch next week. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-07 22:36 ` Juri Linkov @ 2019-11-08 9:21 ` martin rudalics 2019-11-08 21:39 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-08 23:08 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 0 siblings, 2 replies; 19+ messages in thread From: martin rudalics @ 2019-11-08 9:21 UTC (permalink / raw) To: Juri Linkov, Eli Zaretskii; +Cc: 38038, spacibba > These hangs occur not only with tab-bar, but also with menu-bar > when tab-bar is not enabled. These hangs can be reproduced by > configuring --with-x-toolkit=no and running emacs -Q. > Then evaluating this causes hangs: > > (set-face-attribute 'menu nil :weight 'ultra-bold :underline t) On Windows (set-face-attribute 'default nil :underline t) suffices to make it hang in the tool bar redisplay code. I have the guts feeling that it's related to the new :extend mechanism because it works in Emacs 26. martin ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-08 9:21 ` martin rudalics @ 2019-11-08 21:39 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-08 23:08 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 1 sibling, 0 replies; 19+ messages in thread From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-08 21:39 UTC (permalink / raw) To: martin rudalics; +Cc: 38038, Eli Zaretskii, Juri Linkov On Fri, Nov 08, 2019 at 10:21:14AM +0100, martin rudalics wrote: >> These hangs occur not only with tab-bar, but also with menu-bar >> when tab-bar is not enabled. These hangs can be reproduced by >> configuring --with-x-toolkit=no and running emacs -Q. >> Then evaluating this causes hangs: >> >> (set-face-attribute 'menu nil :weight 'ultra-bold :underline t) > >On Windows > >(set-face-attribute 'default nil :underline t) > >suffices to make it hang in the tool bar redisplay code. I have the >guts feeling that it's related to the new :extend mechanism because it >works in Emacs 26. > >martin Hi Martin: I will try a simple check to test if it is relates commenting the call to merge in extend_face_to_end_of_line. But I don't see it related at all; the loop seems to be in some gc functions. Remember that the gc has been changes too since emacs 26. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-08 9:21 ` martin rudalics 2019-11-08 21:39 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-08 23:08 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-09 8:09 ` martin rudalics 1 sibling, 1 reply; 19+ messages in thread From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-08 23:08 UTC (permalink / raw) To: martin rudalics; +Cc: 38038, Eli Zaretskii, Juri Linkov On Fri, Nov 08, 2019 at 10:21:14AM +0100, martin rudalics wrote: >> These hangs occur not only with tab-bar, but also with menu-bar >> when tab-bar is not enabled. These hangs can be reproduced by >> configuring --with-x-toolkit=no and running emacs -Q. >> Then evaluating this causes hangs: >> >> (set-face-attribute 'menu nil :weight 'ultra-bold :underline t) > >On Windows > >(set-face-attribute 'default nil :underline t) > >suffices to make it hang in the tool bar redisplay code. I have the >guts feeling that it's related to the new :extend mechanism because it >works in Emacs 26. > >martin Hi Martin: I removed the actual call in extend_face_to_end_of_line to merge_face and the issue is still there. And it is actually the only place where the :extend attribute is used now; the rest of the code does pretty much the same than before. Just in case: I also made a rebase locally and removed all the commits related with the extend attribute and the issue is still there. So it seems not be related at all with the extend attribute... Any help here?. I am out of ideas. (and I don't have a clue about gc). Ergus ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-08 23:08 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-09 8:09 ` martin rudalics 2019-11-09 8:28 ` Eli Zaretskii 0 siblings, 1 reply; 19+ messages in thread From: martin rudalics @ 2019-11-09 8:09 UTC (permalink / raw) To: Ergus; +Cc: 38038, Juri Linkov > I removed the actual call in extend_face_to_end_of_line to merge_face > and the issue is still there. And it is actually the only place where > the :extend attribute is used now; the rest of the code does pretty much > the same than before. > > Just in case: > > I also made a rebase locally and removed all the commits related with > the extend attribute and the issue is still there. So it seems not be > related at all with the extend attribute... > > Any help here?. I am out of ideas. (and I don't have a clue about gc). Thank you for all the work. The most interesting aspect is that here it neither hangs with (set-face-attribute 'default nil :box t) (set-face-attribute 'default nil :strike-through t) (set-face-attribute 'default nil :overline t) but definitely hangs with (set-face-attribute 'tool-bar nil :underline t) So what's so special about underline and the tool bar (or tab bar)? Here on Windows the latter form hangs on line 2516 of w32term.c Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, s->w->contents); which continuously tries to signal an error with the backtrace #0 xsignal2 (error_symbol=XIL(0xfd80), arg1=XIL(0x32d0), arg2=XIL(0)) at ../../src/eval.c:1713 #1 0x00000004002dcaa5 in wrong_type_argument (predicate=XIL(0x32d0), value=XIL(0)) at ../../src/data.c:155 #2 0x00000004001f82cb in CHECK_BUFFER (x=XIL(0)) at ../../src/buffer.h:707 #3 0x00000004001fed5c in buffer_local_value (variable=XIL(0xe670), buffer=XIL(0)) at ../../src/buffer.c:1205 #4 0x000000040049c84f in w32_draw_glyph_string (s=0xbfd2c0) at ../../src/w32term.c:2516 #5 0x00000004000adaba in draw_glyphs (w=0x5eba170, x=372, row=0x76248d0, area=TEXT_AREA, start=0, end=13, hl=DRAW_NORMAL_TEXT, overlaps=0) at ../../src/xdisp.c:28447 #6 0x00000004000b55a0 in gui_write_glyphs (w=0x5eba170, updated_row=0x76248d0, start=0x76f2ad0, updated_area=TEXT_AREA, len=13) at ../../src/xdisp.c:30474 #7 0x0000000400012021 in update_text_area (w=0x5eba170, updated_row=0x76248d0, vpos=0) at ../../src/dispnew.c:3832 #8 0x0000000400012b20 in update_window_line (w=0x5eba170, vpos=0, mouse_face_overwritten_p=0xbfd857) at ../../src/dispnew.c:4075 #9 0x00000004000115ab in update_window (w=0x5eba170, force_p=true) at ../../src/dispnew.c:3604 #10 0x0000000400010644 in update_frame (f=0x766c710, force_p=true, inhibit_hairy_id_p=false) at ../../src/dispnew.c:3206 #11 0x000000040007b0de in redisplay_internal () at ../../src/xdisp.c:15669 #12 0x0000000400078750 in redisplay () at ../../src/xdisp.c:14816 #13 0x00000004001b5665 in read_char (commandflag=1, map=XIL(0x770e293), prev_event=XIL(0), used_mouse_menu=0xbff25f, end_time=0x0) at ../../src/keyboard.c:2488 #14 0x00000004001c8842 in read_key_sequence (keybuf=0xbff490, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at ../../src/keyboard.c:9536 #15 0x00000004001b1dff in command_loop_1 () at ../../src/keyboard.c:1345 #16 0x00000004003194ef in internal_condition_case (bfun=0x4001b18e8 <command_loop_1>, handlers=XIL(0x90), hfun=0x4001b0d29 <cmd_error>) at ../../src/eval.c:1355 #17 0x00000004001b145e in command_loop_2 (ignore=XIL(0)) at ../../src/keyboard.c:1091 #18 0x0000000400318944 in internal_catch (tag=XIL(0xdfe0), func=0x4001b142c <command_loop_2>, arg=XIL(0)) at ../../src/eval.c:1116 #19 0x00000004001b13b4 in command_loop () at ../../src/keyboard.c:1070 #20 0x0000000000000000 in ?? () where frame #3 indicates that we probably should avoid asking for a buffer local value in a pseudo window. Right? martin ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-09 8:09 ` martin rudalics @ 2019-11-09 8:28 ` Eli Zaretskii 2019-11-09 9:02 ` martin rudalics 0 siblings, 1 reply; 19+ messages in thread From: Eli Zaretskii @ 2019-11-09 8:28 UTC (permalink / raw) To: martin rudalics; +Cc: 38038, spacibba, juri > Cc: Juri Linkov <juri@linkov.net>, Eli Zaretskii <eliz@gnu.org>, > 38038@debbugs.gnu.org > From: martin rudalics <rudalics@gmx.at> > Date: Sat, 9 Nov 2019 09:09:13 +0100 > > Here on Windows the latter form hangs on line 2516 of w32term.c > > Lisp_Object val > = buffer_local_value (Qunderline_minimum_offset, > s->w->contents); > > which continuously tries to signal an error with the backtrace > > #0 xsignal2 (error_symbol=XIL(0xfd80), arg1=XIL(0x32d0), arg2=XIL(0)) at ../../src/eval.c:1713 > #1 0x00000004002dcaa5 in wrong_type_argument (predicate=XIL(0x32d0), value=XIL(0)) at ../../src/data.c:155 And the error says that the window has no buffer, is that right? > where frame #3 indicates that we probably should avoid asking for a buffer > local value in a pseudo window. Right? Yes. Does adding that fix the problem, including the original one with the tab bar? ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-09 8:28 ` Eli Zaretskii @ 2019-11-09 9:02 ` martin rudalics 2019-11-09 9:25 ` Eli Zaretskii 0 siblings, 1 reply; 19+ messages in thread From: martin rudalics @ 2019-11-09 9:02 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 38038, spacibba, juri > And the error says that the window has no buffer, is that right? I think so but didn't look. Is it a good idea to signal that error here in the first place? >> where frame #3 indicates that we probably should avoid asking for a buffer >> local value in a pseudo window. Right? > > Yes. Does adding that fix the problem, including the original one > with the tab bar? The below makes the bug go away for the tool bar, I didn't try for the tab bar. diff --git a/src/w32term.c b/src/w32term.c index 9da0845836..68ae9be8e7 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2512,20 +2512,23 @@ w32_draw_glyph_string (struct glyph_string *s) unsigned long minimum_offset; BOOL underline_at_descent_line; BOOL use_underline_position_properties; - Lisp_Object val - = buffer_local_value (Qunderline_minimum_offset, - s->w->contents); + Lisp_Object val; + + if (BUFFERP (s->w->contents)) + val = buffer_local_value (Qunderline_minimum_offset, + s->w->contents); if (FIXNUMP (val)) minimum_offset = max (0, XFIXNUM (val)); else minimum_offset = 1; - val = buffer_local_value (Qx_underline_at_descent_line, - s->w->contents); + if (BUFFERP (s->w->contents)) + val = buffer_local_value (Qx_underline_at_descent_line, + s->w->contents); underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); - val - = buffer_local_value (Qx_use_underline_position_properties, - s->w->contents); + if (BUFFERP (s->w->contents)) + val = buffer_local_value (Qx_use_underline_position_properties, + s->w->contents); use_underline_position_properties = !(NILP (val) || EQ (val, Qunbound)); The bug was apparently introduced by commit bbf53d99b57bd3d7fc0427d378df2efc6fa10e00 Author: Aaron Jensen <aaronjensen@gmail.com> Date: Sat Mar 10 13:14:28 2018 +0200 Allow underline position variables be buffer-local * src/nsterm.m (ns_draw_text_decoration): * src/w32term.c (x_draw_glyph_string): * src/xterm.c (x_draw_glyph_string): Allow underline-minimum-offset, underline-at-descent-line, and x-use-underline-position-properties be buffer local variables. (Bug#30553) * src/xdisp.c (syms_of_xdisp) <underline-minimum-offset>: Add DEFSYM. and probably manifests itself, as noted earlier, in all pseudo windows that try to draw an underlined glyph string. I can continue working on this after we decided whether to ask for pseudo-windowness or just use the BUFFERP predicate as I did. martin ^ permalink raw reply related [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-09 9:02 ` martin rudalics @ 2019-11-09 9:25 ` Eli Zaretskii 2019-11-10 9:45 ` martin rudalics 0 siblings, 1 reply; 19+ messages in thread From: Eli Zaretskii @ 2019-11-09 9:25 UTC (permalink / raw) To: martin rudalics; +Cc: 38038, spacibba, juri > Cc: spacibba@aol.com, juri@linkov.net, 38038@debbugs.gnu.org > From: martin rudalics <rudalics@gmx.at> > Date: Sat, 9 Nov 2019 10:02:36 +0100 > > The below makes the bug go away for the tool bar, I didn't try for the > tab bar. Thanks. > I can continue working on this after we decided whether to ask for > pseudo-windowness or just use the BUFFERP predicate as I did. It doesn't really matter, AFAIK, but BUFFERP is clearer, I think. ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-09 9:25 ` Eli Zaretskii @ 2019-11-10 9:45 ` martin rudalics 2019-11-12 0:39 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 0 siblings, 1 reply; 19+ messages in thread From: martin rudalics @ 2019-11-10 9:45 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 38038, spacibba, juri [-- Attachment #1: Type: text/plain, Size: 110 bytes --] > It doesn't really matter, AFAIK, but BUFFERP is clearer, I think. I can offer the attached patch. martin [-- Attachment #2: buffer-local-underline.diffs --] [-- Type: text/plain, Size: 5097 bytes --] --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3435,19 +3435,22 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. unsigned long descent = s->y + s->height - s->ybase; unsigned long minimum_offset; BOOL underline_at_descent_line, use_underline_position_properties; - Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, - s->w->contents); - if (FIXNUMP (val)) - minimum_offset = XFIXNAT (val); - else - minimum_offset = 1; - val = buffer_local_value (Qx_underline_at_descent_line, - s->w->contents); - underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); - val = buffer_local_value (Qx_use_underline_position_properties, - s->w->contents); - use_underline_position_properties = - !(NILP (val) || EQ (val, Qunbound)); + Lisp_Object val = (WINDOW_BUFFER_LOCAL_VALUE + (Qunderline_minimum_offset, s->w)); + + if (FIXNUMP (val)) + minimum_offset = XFIXNAT (val); + else + minimum_offset = 1; + + val = (WINDOW_BUFFER_LOCAL_VALUE + (Qx_underline_at_descent_line, s->w)); + underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); + + val = (WINDOW_BUFFER_LOCAL_VALUE + (Qx_use_underline_position_properties, s->w)); + use_underline_position_properties + = !(NILP (val) || EQ (val, Qunbound)); /* Use underline thickness of font, defaulting to 1. */ thickness = (font && font->underline_thickness > 0) diff --git a/src/w32term.c b/src/w32term.c index 9da0845836..d0537c67e9 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2512,20 +2512,21 @@ w32_draw_glyph_string (struct glyph_string *s) unsigned long minimum_offset; BOOL underline_at_descent_line; BOOL use_underline_position_properties; - Lisp_Object val - = buffer_local_value (Qunderline_minimum_offset, - s->w->contents); + Lisp_Object val = (WINDOW_BUFFER_LOCAL_VALUE + (Qunderline_minimum_offset, s->w)); + if (FIXNUMP (val)) minimum_offset = max (0, XFIXNUM (val)); else minimum_offset = 1; - val = buffer_local_value (Qx_underline_at_descent_line, - s->w->contents); + + val = (WINDOW_BUFFER_LOCAL_VALUE + (Qx_underline_at_descent_line, s->w)); underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); - val - = buffer_local_value (Qx_use_underline_position_properties, - s->w->contents); + + val = (WINDOW_BUFFER_LOCAL_VALUE + (Qx_use_underline_position_properties, s->w)); use_underline_position_properties = !(NILP (val) || EQ (val, Qunbound)); diff --git a/src/window.h b/src/window.h index 71946a5695..8ea1b9dcf7 100644 --- a/src/window.h +++ b/src/window.h @@ -608,6 +608,13 @@ wset_next_buffers (struct window *w, Lisp_Object val) ? (W)->contents \ : Qnil) +/* Local value of variable V in window W's buffer. Nil if W has no + buffer. */ +#define WINDOW_BUFFER_LOCAL_VALUE(V, W) \ + (BUFFERP ((W)->contents) \ + ? buffer_local_value(V, (W)->contents) \ + : Qnil) + /* Return the canonical column width of the frame of window W. */ #define WINDOW_FRAME_COLUMN_WIDTH(W) \ (FRAME_COLUMN_WIDTH (WINDOW_XFRAME ((W)))) @@ -1175,6 +1182,8 @@ extern Lisp_Object Vwindow_list; extern Lisp_Object window_list (void); extern Lisp_Object window_parameter (struct window *, Lisp_Object parameter); +extern Lisp_Object window_buffer_local_value (struct window *, + Lisp_Object variable); extern struct window *decode_live_window (Lisp_Object); extern struct window *decode_any_window (Lisp_Object); extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool); diff --git a/src/xterm.c b/src/xterm.c index 44fbd27b11..f7005804f0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3847,20 +3847,21 @@ x_draw_glyph_string (struct glyph_string *s) unsigned long minimum_offset; bool underline_at_descent_line; bool use_underline_position_properties; - Lisp_Object val - = buffer_local_value (Qunderline_minimum_offset, - s->w->contents); + Lisp_Object val = (WINDOW_BUFFER_LOCAL_VALUE + (Qunderline_minimum_offset, s->w)); + if (FIXNUMP (val)) minimum_offset = max (0, XFIXNUM (val)); else minimum_offset = 1; - val = buffer_local_value (Qx_underline_at_descent_line, - s->w->contents); + + val = (WINDOW_BUFFER_LOCAL_VALUE + (Qx_underline_at_descent_line, s->w)); underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); - val - = buffer_local_value (Qx_use_underline_position_properties, - s->w->contents); + + val = (WINDOW_BUFFER_LOCAL_VALUE + (Qx_use_underline_position_properties, s->w)); use_underline_position_properties = !(NILP (val) || EQ (val, Qunbound)); ^ permalink raw reply related [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-10 9:45 ` martin rudalics @ 2019-11-12 0:39 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-12 8:10 ` martin rudalics 0 siblings, 1 reply; 19+ messages in thread From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-12 0:39 UTC (permalink / raw) To: martin rudalics; +Cc: 38038, Eli Zaretskii, juri Hi Martin: Did you pushed this change already? On Sun, Nov 10, 2019 at 10:45:33AM +0100, martin rudalics wrote: >> It doesn't really matter, AFAIK, but BUFFERP is clearer, I think. > >I can offer the attached patch. > >martin >--- a/src/nsterm.m >+++ b/src/nsterm.m >@@ -3435,19 +3435,22 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. > unsigned long descent = s->y + s->height - s->ybase; > unsigned long minimum_offset; > BOOL underline_at_descent_line, use_underline_position_properties; >- Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, >- s->w->contents); >- if (FIXNUMP (val)) >- minimum_offset = XFIXNAT (val); >- else >- minimum_offset = 1; >- val = buffer_local_value (Qx_underline_at_descent_line, >- s->w->contents); >- underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); >- val = buffer_local_value (Qx_use_underline_position_properties, >- s->w->contents); >- use_underline_position_properties = >- !(NILP (val) || EQ (val, Qunbound)); >+ Lisp_Object val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qunderline_minimum_offset, s->w)); >+ >+ if (FIXNUMP (val)) >+ minimum_offset = XFIXNAT (val); >+ else >+ minimum_offset = 1; >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_underline_at_descent_line, s->w)); >+ underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_use_underline_position_properties, s->w)); >+ use_underline_position_properties >+ = !(NILP (val) || EQ (val, Qunbound)); > > /* Use underline thickness of font, defaulting to 1. */ > thickness = (font && font->underline_thickness > 0) >diff --git a/src/w32term.c b/src/w32term.c >index 9da0845836..d0537c67e9 100644 >--- a/src/w32term.c >+++ b/src/w32term.c >@@ -2512,20 +2512,21 @@ w32_draw_glyph_string (struct glyph_string *s) > unsigned long minimum_offset; > BOOL underline_at_descent_line; > BOOL use_underline_position_properties; >- Lisp_Object val >- = buffer_local_value (Qunderline_minimum_offset, >- s->w->contents); >+ Lisp_Object val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qunderline_minimum_offset, s->w)); >+ > if (FIXNUMP (val)) > minimum_offset = max (0, XFIXNUM (val)); > else > minimum_offset = 1; >- val = buffer_local_value (Qx_underline_at_descent_line, >- s->w->contents); >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_underline_at_descent_line, s->w)); > underline_at_descent_line > = !(NILP (val) || EQ (val, Qunbound)); >- val >- = buffer_local_value (Qx_use_underline_position_properties, >- s->w->contents); >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_use_underline_position_properties, s->w)); > use_underline_position_properties > = !(NILP (val) || EQ (val, Qunbound)); > >diff --git a/src/window.h b/src/window.h >index 71946a5695..8ea1b9dcf7 100644 >--- a/src/window.h >+++ b/src/window.h >@@ -608,6 +608,13 @@ wset_next_buffers (struct window *w, Lisp_Object val) > ? (W)->contents \ > : Qnil) > >+/* Local value of variable V in window W's buffer. Nil if W has no >+ buffer. */ >+#define WINDOW_BUFFER_LOCAL_VALUE(V, W) \ >+ (BUFFERP ((W)->contents) \ >+ ? buffer_local_value(V, (W)->contents) \ >+ : Qnil) >+ > /* Return the canonical column width of the frame of window W. */ > #define WINDOW_FRAME_COLUMN_WIDTH(W) \ > (FRAME_COLUMN_WIDTH (WINDOW_XFRAME ((W)))) >@@ -1175,6 +1182,8 @@ extern Lisp_Object Vwindow_list; > > extern Lisp_Object window_list (void); > extern Lisp_Object window_parameter (struct window *, Lisp_Object parameter); >+extern Lisp_Object window_buffer_local_value (struct window *, >+ Lisp_Object variable); > extern struct window *decode_live_window (Lisp_Object); > extern struct window *decode_any_window (Lisp_Object); > extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool); >diff --git a/src/xterm.c b/src/xterm.c >index 44fbd27b11..f7005804f0 100644 >--- a/src/xterm.c >+++ b/src/xterm.c >@@ -3847,20 +3847,21 @@ x_draw_glyph_string (struct glyph_string *s) > unsigned long minimum_offset; > bool underline_at_descent_line; > bool use_underline_position_properties; >- Lisp_Object val >- = buffer_local_value (Qunderline_minimum_offset, >- s->w->contents); >+ Lisp_Object val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qunderline_minimum_offset, s->w)); >+ > if (FIXNUMP (val)) > minimum_offset = max (0, XFIXNUM (val)); > else > minimum_offset = 1; >- val = buffer_local_value (Qx_underline_at_descent_line, >- s->w->contents); >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_underline_at_descent_line, s->w)); > underline_at_descent_line > = !(NILP (val) || EQ (val, Qunbound)); >- val >- = buffer_local_value (Qx_use_underline_position_properties, >- s->w->contents); >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_use_underline_position_properties, s->w)); > use_underline_position_properties > = !(NILP (val) || EQ (val, Qunbound)); > > ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-12 0:39 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-12 8:10 ` martin rudalics 2019-11-12 12:20 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 0 siblings, 1 reply; 19+ messages in thread From: martin rudalics @ 2019-11-12 8:10 UTC (permalink / raw) To: Ergus; +Cc: 38038, juri > Did you pushed this change already? No. I expected you to test it first. martin ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-12 8:10 ` martin rudalics @ 2019-11-12 12:20 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-12 15:48 ` martin rudalics 0 siblings, 1 reply; 19+ messages in thread From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-12 12:20 UTC (permalink / raw) To: martin rudalics; +Cc: 38038, Eli Zaretskii, juri Ohh sorry for not commenting before then. I tried it and it worked for me. (I mean it solved also the problem with the tabs in gui). So I thing you can push it and close the issue form my side (if no one else have complains). Very thanks Ergus On Tue, Nov 12, 2019 at 09:10:16AM +0100, martin rudalics wrote: >> Did you pushed this change already? > >No. I expected you to test it first. > >martin ^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#38038: 27.0.50; Emacs freezes opening tabs. 2019-11-12 12:20 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-11-12 15:48 ` martin rudalics 0 siblings, 0 replies; 19+ messages in thread From: martin rudalics @ 2019-11-12 15:48 UTC (permalink / raw) To: Ergus; +Cc: 38038-done, juri > I tried it and it worked for me. (I mean it solved also the problem with > the tabs in gui). So I thing you can push it and close the issue form my > side (if no one else have complains). Changes pushed, bug closed. martin ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2019-11-12 15:48 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20191102214135.lehpefr5o4cji6ca.ref@Ergus> 2019-11-02 21:41 ` bug#38038: 27.0.50; Emacs freezes opening tabs Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-02 22:20 ` Juri Linkov 2019-11-02 22:55 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-03 20:22 ` Juri Linkov 2019-11-07 14:01 ` Eli Zaretskii 2019-11-07 14:50 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-07 22:36 ` Juri Linkov 2019-11-08 9:21 ` martin rudalics 2019-11-08 21:39 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-08 23:08 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-09 8:09 ` martin rudalics 2019-11-09 8:28 ` Eli Zaretskii 2019-11-09 9:02 ` martin rudalics 2019-11-09 9:25 ` Eli Zaretskii 2019-11-10 9:45 ` martin rudalics 2019-11-12 0:39 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-12 8:10 ` martin rudalics 2019-11-12 12:20 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors 2019-11-12 15:48 ` martin rudalics
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.