unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39865: 28.0.50; Emacs crash
@ 2020-03-02  1:39 Vinicius José Latorre
  2020-03-02  8:11 ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Vinicius José Latorre @ 2020-03-02  1:39 UTC (permalink / raw)
  To: 39865


[-- Attachment #1.1: Type: text/plain, Size: 361 bytes --]

I've just updated Emacs sources in my local git clone and installed it in
my laptop.

The attached file has all detail about steps that I use and also the
backtrace.

I noticed that when Emacs is called via:

$ ~opt/emacs-repo/bin/emacs

Emacs crashes.

And when called via:

$ ~opt/emacs-repo/bin/emacs -Q
M-x load-file RET
~/.emacs RET

Emacs does not crash.

[-- Attachment #1.2: Type: text/html, Size: 562 bytes --]

[-- Attachment #2: .ERROR-DDD --]
[-- Type: application/octet-stream, Size: 31301 bytes --]

### 01/mar/2020


### SYSTEM
$ uname -a
Linux debian-hfit 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux


### EMACS GENERATION
$ cd ~/work/project/emacs
$ git pull
$ make distclean &> /dev/null
$ ./configure --prefix=/home/opt/emacs-repo &> .CONFIG
$ make bootstrap &> .OUTPUT
$ pushd /home/opt/emacs-repo ; rm -rf * ; popd
$ make install &> .INSTALL


### EMACS DEBUGGING
$ ddd ~/opt/emacs-repo/bin/emacs

GNU DDD 3.3.12 (x86_64-pc-linux-gnu), by Dorothea LReading symbols from /home/opt/emacs-repo/bin/emacs...done.
(gdb) run
Starting program: /home/opt/emacs-repo/bin/emacs 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe6c6e700 (LWP 16618)]
[New Thread 0x7fffe5dfb700 (LWP 16619)]
[New Thread 0x7fffe53ed700 (LWP 16620)]
*** Error in `/home/opt/emacs-repo/bin/emacs': malloc(): smallbin double linked list corrupted: 0x0000555555e19000 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7fffefdb1bfb]
/lib/x86_64-linux-gnu/libc.so.6(+0x76fc6)[0x7fffefdb7fc6]
/lib/x86_64-linux-gnu/libc.so.6(+0x79491)[0x7fffefdba491]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7fffefdbbf64]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_malloc+0x19)[0x7ffff503eed9]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_strdup+0x1f)[0x7ffff5058f7f]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x213c28)[0x7ffff6bb6c28]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_type_create_instance+0x1cf)[0x7ffff533632f]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x151fb)[0x7ffff53181fb]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_object_new_valist+0x44e)[0x7ffff531a10e]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_object_new+0xf1)[0x7ffff531a3b1]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x247cdf)[0x7ffff6beacdf]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x247d7f)[0x7ffff6bead7f]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x155ed)[0x7ffff53185ed]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_object_new_valist+0x44e)[0x7ffff531a10e]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_object_new+0xf1)[0x7ffff531a3b1]
/home/opt/emacs-repo/bin/emacs(+0x10f784)[0x555555663784]
/home/opt/emacs-repo/bin/emacs(+0x10f87e)[0x55555566387e]
/home/opt/emacs-repo/bin/emacs(+0x110ccb)[0x555555664ccb]
/home/opt/emacs-repo/bin/emacs(+0x11324d)[0x55555566724d]
/home/opt/emacs-repo/bin/emacs(+0x9a761)[0x5555555ee761]
/home/opt/emacs-repo/bin/emacs(+0x5ebdc)[0x5555555b2bdc]
/home/opt/emacs-repo/bin/emacs(+0x82950)[0x5555555d6950]
/home/opt/emacs-repo/bin/emacs(+0x12b043)[0x55555567f043]
/home/opt/emacs-repo/bin/emacs(+0x191b7e)[0x5555556e5b7e]
/home/opt/emacs-repo/bin/emacs(+0x11c104)[0x555555670104]
/home/opt/emacs-repo/bin/emacs(+0x191b1c)[0x5555556e5b1c]
/home/opt/emacs-repo/bin/emacs(+0x11c0c0)[0x5555556700c0]
/home/opt/emacs-repo/bin/emacs(+0x1211a6)[0x5555556751a6]
/home/opt/emacs-repo/bin/emacs(+0x1214e6)[0x5555556754e6]
/home/opt/emacs-repo/bin/emacs(+0x43829)[0x555555597829]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7fffefd612e1]
/home/opt/emacs-repo/bin/emacs(+0x4470a)[0x55555559870a]
======= Memory map: ========
555555554000-5555557d4000 r-xp 00000000 08:03 1984667                    /home/opt/emacs-repo/bin/emacs-28.0.50
5555559d4000-5555559de000 r--p 00280000 08:03 1984667                    /home/opt/emacs-repo/bin/emacs-28.0.50
5555559de000-555555d25000 rw-p 0028a000 08:03 1984667                    /home/opt/emacs-repo/bin/emacs-28.0.50
555555d25000-555556e62000 rw-p 00000000 00:00 0                          [heap]
7fffd8000000-7fffd8022000 rw-p 00000000 00:00 0 
7fffd8022000-7fffdc000000 ---p 00000000 00:00 0 
7fffdc000000-7fffdc022000 rw-p 00000000 00:00 0 
7fffdc022000-7fffe0000000 ---p 00000000 00:00 0 
7fffe0000000-7fffe0021000 rw-p 00000000 00:00 0 
7fffe0021000-7fffe4000000 ---p 00000000 00:00 0 
7fffe4580000-7fffe4581000 rw-p 00000000 00:00 0 
7fffe4581000-7fffe45d3000 r--p 00000000 08:01 1973441                    /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf
7fffe45d3000-7fffe4611000 r--p 00000000 08:01 1973746                    /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Oblique.ttf
7fffe4611000-7fffe46ca000 r--p 00000000 08:01 1972867                    /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
7fffe46ca000-7fffe474a000 rw-s 00000000 00:05 15335429                   /SYSV00000000 (deleted)
7fffe474a000-7fffe474c000 r-xp 00000000 08:01 1705295                    /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
7fffe474c000-7fffe494b000 ---p 00002000 08:01 1705295                    /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
7fffe494b000-7fffe494c000 r--p 00001000 08:01 1705295                    /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
7fffe494c000-7fffe494d000 rw-p 00002000 08:01 1705295                    /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
7fffe494d000-7fffe4974000 r--s 00000000 08:01 2228465                    /usr/share/mime/mime.cache
7fffe4974000-7fffe4975000 r--s 00000000 08:03 7343915                    /home/vinicius/.local/share/mime/mime.cache
7fffe4975000-7fffe49c9000 r--p 00000000 08:01 1973443                    /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
7fffe49c9000-7fffe49d0000 r--s 00000000 08:01 3539833                    /var/cache/fontconfig/4be9850f182b35c1350b6bbf2e42601c-le64.cache-4
7fffe49d0000-7fffe49d4000 r--s 00000000 08:01 3541720                    /var/cache/fontconfig/3ac02d89163b9a81f80c883d34f0680d-le64.cache-4
7fffe49d4000-7fffe49d8000 r--s 00000000 08:01 3541719                    /var/cache/fontconfig/83a00c9d34cea917a384e8bedceddcca-le64.cache-4
7fffe49d8000-7fffe49dc000 r--s 00000000 08:01 3541718                    /var/cache/fontconfig/ab69db7e6d0e1cb2ad84a6c1850fe776-le64.cache-4
7fffe49dc000-7fffe49e0000 r--s 00000000 08:01 3541243                    /var/cache/fontconfig/6aa41aa22e18b8fa06a12da28ea9c28b-le64.cache-4
7fffe49e0000-7fffe49e1000 r--s 00000000 08:01 3541178                    /var/cache/fontconfig/c05880de57d1f5e948fdfacc138775d9-le64.cache-4
7fffe49e1000-7fffe49ec000 r--s 00000000 08:01 3540839                    /var/cache/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-4
7fffe49ec000-7fffe49ee000 r--s 00000000 08:01 3540595                    /var/cache/fontconfig/99e8ed0e538f840c565b6ed5dad60d56-le64.cache-4
7fffe49ee000-7fffe49f1000 r--s 00000000 08:01 3540591                    /var/cache/fontconfig/f24b2111ab8703b4e963115a8cf14259-le64.cache-4
7fffe49f1000-7fffe49f5000 r--s 00000000 08:01 3540585                    /var/cache/fontconfig/de156ccd2eddbdc19d37a45b8b2aac9c-le64.cache-4
7fffe49f5000-7fffe49f6000 r--s 00000000 08:01 3539836                    /var/cache/fontconfig/9451a55048e8dbe8633e64d34165fdf2-le64.cache-4
7fffe49f6000-7fffe49f7000 r--s 00000000 08:01 3539834                    /var/cache/fontconfig/dc05db6664285cc2f12bf69c139ae4c3-le64.cache-4
7fffe49f7000-7fffe49f8000 r--s 00000000 08:01 3540698                    /var/cache/fontconfig/4794a0821666d79190d59a36cb4f44b5-le64.cache-4
7fffe49f8000-7fffe4a3a000 r--s 00000000 08:01 3539827                    /var/cache/fontconfig/0bd3dc0958fa2205aaaa8ebb13e2872b-le64.cache-4
7fffe4a3a000-7fffe4a3e000 r--s 00000000 08:01 3539824                    /var/cache/fontconfig/c57959a16110560c8d0fcea73374aeeb-le64.cache-4
7fffe4a3e000-7fffe4a44000 r--s 00000000 08:01 3539822                    /var/cache/fontconfig/3047814df9a2f067bd2d96a2b9c36e5a-le64.cache-4
7fffe4a44000-7fffe4a4c000 r--s 00000000 08:01 3539820                    /var/cache/fontconfig/bf3b770c553c462765856025a94f1ce6-le64.cache-4
7fffe4a4c000-7fffe4a4e000 r--s 00000000 08:01 3539818                    /var/cache/fontconfig/a0107c79d978dfcc5e42cb1335b71036-le64.cache-4
7fffe4a4e000-7fffe4a51000 r--s 00000000 08:01 3539816                    /var/cache/fontconfig/e49e89034d371f0f9de17aab02136486-le64.cache-4
7fffe4a51000-7fffe4a53000 r--s 00000000 08:01 3539814                    /var/cache/fontconfig/4b14b093aebc79c320de5e86ae1d3314-le64.cache-4
7fffe4a53000-7fffe4a66000 r--s 00000000 08:01 3539812                    /var/cache/fontconfig/d52a8644073d54c13679302ca1180695-le64.cache-4
7fffe4a66000-7fffe4a6e000 r--s 00000000 08:01 3539811                    /var/cache/fontconfig/105b9c7e6f0a4f82d8c9b6e39c52c6f9-le64.cache-4
7fffe4a6e000-7fffe4a78000 r--s 00000000 08:01 3539808                    /var/cache/fontconfig/3f7329c5293ffd510edef78f73874cfd-le64.cache-4
7fffe4a78000-7fffe4a84000 r--s 00000000 08:01 3539806                    /var/cache/fontconfig/d589a48862398ed80a3d6066f4f56f4c-le64.cache-4
7fffe4a84000-7fffe4a88000 r--s 00000000 08:01 3539805                    /var/cache/fontconfig/246184dc75a16901ca37d96895904249-le64.cache-4
7fffe4a88000-7fffe4a8d000 r--s 00000000 08:01 3539802                    /var/cache/fontconfig/b25010134a2e462c779c1c1d5ccbff7b-le64.cache-4
7fffe4a8d000-7fffe4a8f000 r--s 00000000 08:01 3539800                    /var/cache/fontconfig/423767150eb258c59035de29db6fca84-le64.cache-4
7fffe4a8f000-7fffe4a91000 r--s 00000000 08:01 3539798                    /var/cache/fontconfig/dd771fde377abc692f68c927ef165a53-le64.cache-4
7fffe4a91000-7fffe4a92000 r--s 00000000 08:01 3539750                    /var/cache/fontconfig/49f0de54bdd920fe4f0dfd4cbac43e6b-le64.cache-4
7fffe4a92000-7fffe4a95000 r--s 00000000 08:01 3539795                    /var/cache/fontconfig/75114ca45c98e8a441da0ff356701271-le64.cache-4
7fffe4a95000-7fffe4aa0000 r--s 00000000 08:01 3539792                    /var/cache/fontconfig/83bf95040141907cd45bb53cf7c1c148-le64.cache-4
7fffe4aa0000-7fffe4ab2000 r--s 00000000 08:01 3539790                    /var/cache/fontconfig/9b89f8e3dae116d678bbf48e5f21f69b-le64.cache-4
7fffe4ab2000-7fffe4ab5000 r--s 00000000 08:01 3539788                    /var/cache/fontconfig/c19b55eb3b4c5b40ea175e31682068a5-le64.cache-4
7fffe4ab5000-7fffe4ab7000 r--s 00000000 08:01 3539787                    /var/cache/fontconfig/62f91419b9ebdb6975e7e41ab6412357-le64.cache-4
7fffe4ab7000-7fffe4ad0000 r--s 00000000 08:01 3539766                    /var/cache/fontconfig/cabbd14511b9e8a55e92af97fb3a0461-le64.cache-4
7fffe4ad0000-7fffe4af1000 r--s 00000000 08:01 3539760                    /var/cache/fontconfig/e13b20fdb08344e0e664864cc2ede53d-le64.cache-4
7fffe4af1000-7fffe4b59000 r--s 00000000 08:01 3539758                    /var/cache/fontconfig/eeebfc908bd29a90773fd860017aada4-le64.cache-4
7fffe4b59000-7fffe4bc1000 r--s 00000000 08:01 3539756                    /var/cache/fontconfig/21a99156bb11811cef641abeda519a45-le64.cache-4
7fffe4bc1000-7fffe4bc2000 r--s 00000000 08:01 3541736                    /var/cache/fontconfig/3fc3f2a9aa261fb2322144855b1b5ed4-le64.cache-4
7fffe4bc2000-7fffe4bc3000 r--s 00000000 08:01 3541735                    /var/cache/fontconfig/85d6c546d1c30d835e21b5e30608dace-le64.cache-4
7fffe4bc3000-7fffe4bc4000 r--s 00000000 08:01 3541734                    /var/cache/fontconfig/30b45f7973e5724b9b272e063dd2deb2-le64.cache-4
7fffe4bc4000-7fffe4bc7000 r--s 00000000 08:01 3541733                    /var/cache/fontconfig/4cc78da80ac1de0e44a78080a871386a-le64.cache-4
7fffe4bc7000-7fffe4bca000 r--s 00000000 08:01 3541732                    /var/cache/fontconfig/04f347dabfde2731b408b3fc677450d2-le64.cache-4
7fffe4bca000-7fffe4bcb000 r--s 00000000 08:01 3541731                    /var/cache/fontconfig/315978544b575bc46b33eb4252fe9cce-le64.cache-4
7fffe4bcb000-7fffe4bcc000 r--s 00000000 08:01 3541730                    /var/cache/fontconfig/6897332a098acabecd96ad698c3f2a26-le64.cache-4
7fffe4bcc000-7fffe4bce000 r--s 00000000 08:01 3541729                    /var/cache/fontconfig/a27c98c6460a278bdc16a75d1d8dd87f-le64.cache-4
7fffe4bce000-7fffe4bcf000 r--s 00000000 08:01 3541728                    /var/cache/fontconfig/8f26b1d46bb366c1061eee02faaaea13-le64.cache-4
7fffe4bcf000-7fffe4bd6000 r--s 00000000 08:01 3541727                    /var/cache/fontconfig/2c6f0e71238d80bf77878d965b4e069d-le64.cache-4
7fffe4bd6000-7fffe4bd7000 r--s 00000000 08:01 3541726                    /var/cache/fontconfig/aa67eb983a011c68d2fce462db046135-le64.cache-4
7fffe4bd7000-7fffe4bd8000 r--s 00000000 08:01 3541725                    /var/cache/fontconfig/1c7c63ee4ff6d8581acc46ffb68a9c63-le64.cache-4
7fffe4bd8000-7fffe4bda000 r--s 00000000 08:01 3541724                    /var/cache/fontconfig/46b1151374e5437370d06f8dcbc31297-le64.cache-4
7fffe4bda000-7fffe4bdb000 r--s 00000000 08:01 3541723                    /var/cache/fontconfig/5fc3b0634b54871b4bc8964cbbe3806a-le64.cache-4
7fffe4bdb000-7fffe4bdc000 r--s 00000000 08:01 3541722                    /var/cache/fontconfig/eac018c90ae250d340a4bb738a42d925-le64.cache-4
7fffe4bdc000-7fffe4bdd000 r--s 00000000 08:01 3541721                    /var/cache/fontconfig/befa52e5403a431ea282d4e6deca4c1e-le64.cache-4
7fffe4bdd000-7fffe4bdf000 r--s 00000000 08:01 3541716                    /var/cache/fontconfig/7d7accb08c745f13d67b9f4f895bef16-le64.cache-4
7fffe4bdf000-7fffe4be0000 r--s 00000000 08:01 3541715                    /var/cache/fontconfig/bc0e13c9faad0afd8cc2ce9abce2d745-le64.cache-4
7fffe4be0000-7fffe4be1000 r--s 00000000 08:01 3541714                    /var/cache/fontconfig/3bcff9fa2e1b0e4355198b15bc012246-le64.cache-4
7fffe4be1000-7fffe4be2000 r--s 00000000 08:01 3541713                    /var/cache/fontconfig/cdf9f7f5dc4a47ac467e30951d387a24-le64.cache-4
7fffe4be2000-7fffe4be3000 r--s 00000000 08:01 3541712                    /var/cache/fontconfig/34d9d91fec1e8dcf4f8a2bc6a0565efe-le64.cache-4
7fffe4be3000-7fffe4be4000 r--s 00000000 08:01 3541711                    /var/cache/fontconfig/a65b8df85ab182eb392d98bd239a78f7-le64.cache-4
7fffe4be4000-7fffe4be5000 r--s 00000000 08:01 3541710                    /var/cache/fontconfig/b4fb93dad00f3f60447b5428a48af4c2-le64.cache-4
7fffe4be5000-7fffe4be7000 r--s 00000000 08:01 3541709                    /var/cache/fontconfig/be3057d728e7c8ae561e599bae87db03-le64.cache-4
7fffe4be7000-7fffe4bea000 r--s 00000000 08:01 3541708                    /var/cache/fontconfig/5e15e8a71275164cab4ba70e5681e787-le64.cache-4
7fffe4bea000-7fffe4beb000 r--s 00000000 08:01 3541707                    /var/cache/fontconfig/598766463bc56c85f5a2a6be14d83b51-le64.cache-4
7fffe4beb000-7fffe4bec000 r--s 00000000 08:01 3541706                    /var/cache/fontconfig/4556190bf9cc689700d1d583db9913db-le64.cache-4
7fffe4bec000-7fffe4bed000 r--s 00000000 08:01 3541705                    /var/cache/fontconfig/7451006a1bd33bd4a095a8d3d8d6140b-le64.cache-4
7fffe4bed000-7fffe4bee000 ---p 00000000 00:00 0 
7fffe4bee000-7fffe53ee000 rw-p 00000000 00:00 0 
7fffe53ee000-7fffe53fa000 r-xp 00000000 08:01 1839462                    /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
7fffe53fa000-7fffe55f9000 ---p 0000c000 08:01 1839462                    /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
7fffe55f9000-7fffe55fa000 r--p 0000b000 08:01 1839462                    /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
7fffe55fa000-7fffe55fb000 rw-p 0000c000 08:01 1839462                    /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
7fffe55fb000-7fffe55fc000 ---p 00000000 00:00 0 
7fffe55fc000-7fffe5dfc000 rw-p 00000000 00:00 0 
7fffe5dfc000-7fffe5dfe000 r-xp 00000000 08:01 1972225                    /lib/x86_64-linux-gnu/libutil-2.24.so
7fffe5dfe000-7fffe5ffd000 ---p 00002000 08:01 1972225                    /lib/x86_64-linux-gnu/libutil-2.24.so
7fffe5ffd000-7fffe5ffe000 r--p 00001000 08:01 1972225                    /lib/x86_64-linux-gnu/libutil-2.24.so
7fffe5ffe000-7fffe5fff000 rw-p 00002000 08:01 1972225                    /lib/x86_64-linux-gnu/libutil-2.24.so
7fffe5fff000-7fffe6035000 r-xp 00000000 08:01 1835869                    /usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so
7fffe6035000-7fffe6235000 ---p 00036000 08:01 1835869                    /usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so
7fffe6235000-7fffe623b000 r--p 00036000 08:01 1835869                    /usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so
7fffe623b000-7fffe623c000 rw-p 0003c000 08:01 1835869                    /usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so
7fffe623c000-7fffe626b000 r-xp 00000000 08:01 1852387                    /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
7fffe626b000-7fffe646b000 ---p 0002f000 08:01 1852387                    /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
7fffe646b000-7fffe646d000 r--p 0002f000 08:01 1852387                    /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
7fffe646d000-7fffe646e000 rw-p 00031000 08:01 1852387                    /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
7fffe646e000-7fffe646f000 ---p 00000000 00:00 0 
7fffe646f000-7fffe6c6f000 rw-p 00000000 00:00 0 
7fffe6c6f000-7fffe6d9f000 r--p 00000000 08:01 524421                     /usr/lib/locale/aa_DJ.utf8/LC_COLLATE
7fffe6d9f000-7fffe747a000 rw-p 00000000 08:03 1984668                    /home/opt/emacs-repo/libexec/emacs/28.0.50/x86_64-pc-linux-gnu/emacs.pdmp
7fffe747a000-7fffe7499000 ---p 006db000 08:03 1984668                    /home/opt/emacs-repo/libexec/emacs/28.0.50/x86_64-pc-linux-gnu/emacs.pdmp
7fffe7499000-7fffe77b2000 rw-p 006fa000 08:03 1984668                    /home/opt/emacs-repo/libexec/emacs/28.0.50/x86_64-pc-linux-gnu/emacs.pdmp
7fffe77b2000-7fffe77c5000 r-xp 00000000 08:01 1969576                    /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
7fffe77c5000-7fffe79c4000 ---p 00013000 08:01 1969576                    /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
7fffe79c4000-7fffe79c5000 r--p 00012000 08:01 1969576                    /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
7fffe79c5000-7fffe79c6000 rw-p 00013000 08:01 1969576                    /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
7fffe79c6000-7fffe79dc000 r-xp 00000000 08:01 1969794                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fffe79dc000-7fffe7bdb000 ---p 00016000 08:01 1969794                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fffe7bdb000-7fffe7bdc000 r--p 00015000 08:01 1969794                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fffe7bdc000-7fffe7bdd000 rw-p 00016000 08:01 1969794                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fffe7bdd000-7fffe7d4f000 r-xp 00000000 08:01 1704894                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7fffe7d4f000-7fffe7f4f000 ---p 00172000 08:01 1704894                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7fffe7f4f000-7fffe7f59000 r--p 00172000 08:01 1704894                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7fffe7f59000-7fffe7f5b000 rw-p 0017c000 08:01 1704894                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7fffe7f5b000-7fffe7f5f000 rw-p 00000000 00:00 0 
7fffe7f5f000-7fffe7fa0000 r-xp 00000000 08:01 1966276                    /lib/x86_64-linux-gnu/libblkid.so.1.1.0
7fffe7fa0000-7fffe819f000 ---p 00041000 08:01 1966276                    /lib/x86_64-linux-gnu/libblkid.so.1.1.0
7fffe819f000-7fffe81a3000 r--p 00040000 08:01 1966276                    /lib/x86_64-linux-gnu/libblkid.so.1.1.0
7fffe81a3000-7fffe81a4000 rw-p 00044000 08:01 1966276                    /lib/x86_64-linux-gnu/libblkid.so.1.1.0
7fffe81a4000-7fffe81a5000 rw-p 00000000 00:00 0 
7fffe81a5000-7fffe81ac000 r-xp 00000000 08:01 1705896                    /usr/lib/x86_64-linux-gnu/libdatrie.so.1.3.3
7fffe81ac000-7fffe83ab000 ---p 00007000 08:01 1705896                    /usr/lib/x86_64-linux-gnu/libdatrie.so.1.3.3
7fffe83ab000-7fffe83ac000 r--p 00006000 08:01 1705896                    /usr/lib/x86_64-linux-gnu/libdatrie.so.1.3.3
7fffe83ac000-7fffe83ad000 rw-p 00007000 08:01 1705896                    /usr/lib/x86_64-linux-gnu/libdatrie.so.1.3.3
7fffe83ad000-7fffe83da000 r-xp 00000000 08:01 1708704                    /usr/lib/x86_64-linux-gnu/libatspi.so.0.0.1
7fffe83da000-7fffe85da000 ---p 0002d000 08:01 1708704                    /usr/lib/x86_64-linux-gnu/libatspi.so.0.0.1
7fffe85da000-7fffe85dd000 r--p 0002d000 08:01 1708704                    /usr/lib/x86_64-linux-gnu/libatspi.so.0.0.1
7fffe85dd000-7fffe85de000 rw-p 00030000 08:01 1708704                    /usr/lib/x86_64-linux-gnu/libatspi.so.0.0.1
7fffe85de000-7fffe86e5000 r-xp 00000000 08:01 1991701                    /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
7fffe86e5000-7fffe88e5000 ---p 00107000 08:01 1991701                    /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
7fffe88e5000-7fffe88e7000 r--p 00107000 08:01 1991701                    /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
7fffe88e7000-7fffe88ee000 rw-p 00109000 08:01 1991701                    /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
7fffe88ee000-7fffe88ff000 r-xp 00000000 08:01 1704280                    /usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
7fffe88ff000-7fffe8afe000 ---p 00011000 08:01 1704280                    /usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
7fffe8afe000-7fffe8aff000 r--p 00010000 08:01 1704280                    /usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
7fffe8aff000-7fffe8b00000 rw-p 00011000 08:01 1704280                    /usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
7fffe8b00000-7fffe8b33000 r-xp 00000000 08:01 1735582                    /usr/lib/x86_64-linux-gnu/libhogweed.so.4.3
7fffe8b33000-7fffe8d33000 ---p 00033000 08:01 1735582                    /usr/lib/x86_64-linux-gnu/libhogweed.so.4.3
7fffe8d33000-7fffe8d34000 r--p 00033000 08:01 1735582                    /usr/lib/x86_64
Thread 1 "emacs" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51



(gdb) \rfile: "../sysdeps/unix/sysv/linux/raise.c", line number: 1
(gdb) \rfile: "../sysdeps/unix/sysv/linux/raise.c", line number: 1



(gdb) info stack
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007fffefd7542a in __GI_abort () at abort.c:89
#2  0x00007fffefdb1c00 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7fffefea6fd0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007fffefdb7fc6 in malloc_printerr (action=3, str=0x7fffefea7400 "malloc(): smallbin double linked list corrupted", ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5049
#4  0x00007fffefdba491 in _int_malloc (av=av@entry=0x7ffff00dab00 <main_arena>, bytes=bytes@entry=1) at malloc.c:3424
#5  0x00007fffefdbbf64 in __GI___libc_malloc (bytes=1) at malloc.c:2928
#6  0x00007ffff503eed9 in g_malloc () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff5058f7f in g_strdup () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ffff6bb6c28 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#9  0x00007ffff533632f in g_type_create_instance () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff53181fb in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff531a10e in g_object_new_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff531a3b1 in g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff6beacdf in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#14 0x00007ffff6bead7f in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#15 0x00007ffff53185ed in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff531a10e in g_object_new_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff531a3b1 in g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x0000555555663784 in make_menu_item (group=0x7fffffff1818, item=0x555556dedf30, utf8_key=0x0, utf8_label=0x555555e15e70 "Misc") at gtkutil.c:2618
#19 xg_create_one_menuitem (item=item@entry=0x555556dedf30, select_cb=0x0, cl_data=cl_data@entry=0x5555561ef3b0, group=group@entry=0x7fffffff1818, highlight_cb=0x5555555ee330 <menu_highlight_callback>, f=0x5555561978c0) at gtkutil.c:2657
#20 0x000055555566387e in create_menus (data=data@entry=0x555556deddb0, f=f@entry=0x5555561978c0, select_cb=select_cb@entry=0x5555555ee3b0 <menubar_selection_callback>, deactivate_cb=deactivate_cb@entry=0x5555555ee100 <popup_deactivate_callback>, highlight_cb=highlight_cb@entry=0x5555555ee330 <menu_highlight_callback>, pop_up_p=pop_up_p@entry=false, menu_bar_p=false, topmenu=<optimized out>, cl_data=0x5555561ef3b0, name=0x0) at gtkutil.c:2793
#21 0x0000555555664ccb in xg_update_submenu (submenu=submenu@entry=0x555556423f60, f=f@entry=0x5555561978c0, val=<optimized out>, select_cb=select_cb@entry=0x5555555ee3b0 <menubar_selection_callback>, deactivate_cb=deactivate_cb@entry=0x5555555ee100 <popup_deactivate_callback>, highlight_cb=highlight_cb@entry=0x5555555ee330 <menu_highlight_callback>, cl_data=0x5555561ef3b0) at gtkutil.c:3372
#22 0x000055555566724d in xg_modify_menubar_widgets (menubar=menubar@entry=0x55555612e180, f=f@entry=0x5555561978c0, val=val@entry=0x555556dedcf0, deep_p=<optimized out>, select_cb=select_cb@entry=0x5555555ee3b0 <menubar_selection_callback>, deactivate_cb=deactivate_cb@entry=0x5555555ee100 <popup_deactivate_callback>, highlight_cb=0x5555555ee330 <menu_highlight_callback>) at gtkutil.c:3443
#23 0x00005555555ee761 in set_frame_menubar (f=f@entry=0x5555561978c0, first_time=first_time@entry=false, deep_p=<optimized out>, deep_p@entry=false) at xmenu.c:918
#24 0x00005555555b2bdc in update_menu_bar (f=f@entry=0x5555561978c0, save_match_data=save_match_data@entry=false, hooks_run=true, hooks_run@entry=false) at xdisp.c:12569
#25 0x00005555555d6950 in update_menu_bar (hooks_run=false, save_match_data=false, f=0x5555561978c0) at xdisp.c:12459
#26 prepare_menu_bars () at xdisp.c:12459
#27 redisplay_internal () at xdisp.c:15270
#28 0x00005555555d7f95 in resize_echo_area_exactly () at xdisp.c:11462
#29 0x000055555567f043 in command_loop_1 () at keyboard.c:1262
#30 0x00005555556e5b7e in internal_condition_case (bfun=bfun@entry=0x55555567e510 <command_loop_1>, handlers=handlers@entry=0x90, hfun=hfun@entry=0x5555556755b0 <cmd_error>) at eval.c:1355
#31 0x0000555555670104 in command_loop_2 (ignore=ignore@entry=0x0) at keyboard.c:1091
#32 0x00005555556e5b1c in internal_catch (tag=tag@entry=0xd500, func=func@entry=0x5555556700e0 <command_loop_2>, arg=arg@entry=0x0) at eval.c:1116
#33 0x00005555556700c0 in command_loop () at keyboard.c:1070
#34 0x00005555556751a6 in recursive_edit_1 () at keyboard.c:714
#35 0x00005555556754e6 in Frecursive_edit () at keyboard.c:786
#36 0x0000555555597829 in main (argc=1, argv=<optimized out>) at emacs.c:2037



(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007fffefd7542a in __GI_abort () at abort.c:89
#2  0x00007fffefdb1c00 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7fffefea6fd0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007fffefdb7fc6 in malloc_printerr (action=3, str=0x7fffefea7400 "malloc(): smallbin double linked list corrupted", ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5049
#4  0x00007fffefdba491 in _int_malloc (av=av@entry=0x7ffff00dab00 <main_arena>, bytes=bytes@entry=1) at malloc.c:3424
#5  0x00007fffefdbbf64 in __GI___libc_malloc (bytes=1) at malloc.c:2928
#6  0x00007ffff503eed9 in g_malloc () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff5058f7f in g_strdup () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ffff6bb6c28 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#9  0x00007ffff533632f in g_type_create_instance () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff53181fb in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff531a10e in g_object_new_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff531a3b1 in g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff6beacdf in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#14 0x00007ffff6bead7f in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#15 0x00007ffff53185ed in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff531a10e in g_object_new_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff531a3b1 in g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x0000555555663784 in make_menu_item (group=0x7fffffff1818, item=0x555556dedf30, utf8_key=0x0, utf8_label=0x555555e15e70 "Misc") at gtkutil.c:2618
#19 xg_create_one_menuitem (item=item@entry=0x555556dedf30, select_cb=0x0, cl_data=cl_data@entry=0x5555561ef3b0, group=group@entry=0x7fffffff1818, highlight_cb=0x5555555ee330 <menu_highlight_callback>, f=0x5555561978c0) at gtkutil.c:2657
#20 0x000055555566387e in create_menus (data=data@entry=0x555556deddb0, f=f@entry=0x5555561978c0, select_cb=select_cb@entry=0x5555555ee3b0 <menubar_selection_callback>, deactivate_cb=deactivate_cb@entry=0x5555555ee100 <popup_deactivate_callback>, highlight_cb=highlight_cb@entry=0x5555555ee330 <menu_highlight_callback>, pop_up_p=pop_up_p@entry=false, menu_bar_p=false, topmenu=<optimized out>, cl_data=0x5555561ef3b0, name=0x0) at gtkutil.c:2793
#21 0x0000555555664ccb in xg_update_submenu (submenu=submenu@entry=0x555556423f60, f=f@entry=0x5555561978c0, val=<optimized out>, select_cb=select_cb@entry=0x5555555ee3b0 <menubar_selection_callback>, deactivate_cb=deactivate_cb@entry=0x5555555ee100 <popup_deactivate_callback>, highlight_cb=highlight_cb@entry=0x5555555ee330 <menu_highlight_callback>, cl_data=0x5555561ef3b0) at gtkutil.c:3372
#22 0x000055555566724d in xg_modify_menubar_widgets (menubar=menubar@entry=0x55555612e180, f=f@entry=0x5555561978c0, val=val@entry=0x555556dedcf0, deep_p=<optimized out>, select_cb=select_cb@entry=0x5555555ee3b0 <menubar_selection_callback>, deactivate_cb=deactivate_cb@entry=0x5555555ee100 <popup_deactivate_callback>, highlight_cb=0x5555555ee330 <menu_highlight_callback>) at gtkutil.c:3443
#23 0x00005555555ee761 in set_frame_menubar (f=f@entry=0x5555561978c0, first_time=first_time@entry=false, deep_p=<optimized out>, deep_p@entry=false) at xmenu.c:918
#24 0x00005555555b2bdc in update_menu_bar (f=f@entry=0x5555561978c0, save_match_data=save_match_data@entry=false, hooks_run=true, hooks_run@entry=false) at xdisp.c:12569
#25 0x00005555555d6950 in update_menu_bar (hooks_run=false, save_match_data=false, f=0x5555561978c0) at xdisp.c:12459
#26 prepare_menu_bars () at xdisp.c:12459
#27 redisplay_internal () at xdisp.c:15270
#28 0x00005555555d7f95 in resize_echo_area_exactly () at xdisp.c:11462
#29 0x000055555567f043 in command_loop_1 () at keyboard.c:1262
#30 0x00005555556e5b7e in internal_condition_case (bfun=bfun@entry=0x55555567e510 <command_loop_1>, handlers=handlers@entry=0x90, hfun=hfun@entry=0x5555556755b0 <cmd_error>) at eval.c:1355
#31 0x0000555555670104 in command_loop_2 (ignore=ignore@entry=0x0) at keyboard.c:1091
#32 0x00005555556e5b1c in internal_catch (tag=tag@entry=0xd500, func=func@entry=0x5555556700e0 <command_loop_2>, arg=arg@entry=0x0) at eval.c:1116
#33 0x00005555556700c0 in command_loop () at keyboard.c:1070
#34 0x00005555556751a6 in recursive_edit_1 () at keyboard.c:714
#35 0x00005555556754e6 in Frecursive_edit () at keyboard.c:786
#36 0x0000555555597829 in main (argc=1, argv=<optimized out>) at emacs.c:2037
(gdb) 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-02  1:39 bug#39865: 28.0.50; Emacs crash Vinicius José Latorre
@ 2020-03-02  8:11 ` Eli Zaretskii
  2020-03-05  1:03   ` Vinicius José Latorre
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2020-03-02  8:11 UTC (permalink / raw)
  To: Vinicius José Latorre; +Cc: 39865

> From: Vinicius José Latorre <viniciusjl@gmail.com>
> Date: Sun, 1 Mar 2020 22:39:09 -0300
> 
> I've just updated Emacs sources in my local git clone and installed it in my laptop.

Is this the master branch or the emacs-27 branch?

> I noticed that when Emacs is called via:
> 
> $ ~opt/emacs-repo/bin/emacs
> 
> Emacs crashes.
> 
> And when called via:
> 
> $ ~opt/emacs-repo/bin/emacs -Q
> M-x load-file RET
> ~/.emacs RET
> 
> Emacs does not crash.

That would mean the trigger for the crash is in your .emacs file.
Would it be possible to find the smallest subset of your .emacs which
still causes the crash, and then post it?

Thanks.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-02  8:11 ` Eli Zaretskii
@ 2020-03-05  1:03   ` Vinicius José Latorre
  2020-03-05 22:21     ` Vinicius José Latorre
  0 siblings, 1 reply; 27+ messages in thread
From: Vinicius José Latorre @ 2020-03-05  1:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865

[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]

> Is this the master branch or the emacs-27 branch?

Yes, the master branch (origin/master).

> Would it be possible to find the smallest subset of your .emacs which
> still causes the crash, and then post it?

I'll try it.




On Mon, Mar 2, 2020 at 5:11 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Vinicius José Latorre <viniciusjl@gmail.com>
> > Date: Sun, 1 Mar 2020 22:39:09 -0300
> >
> > I've just updated Emacs sources in my local git clone and installed it
> in my laptop.
>
> Is this the master branch or the emacs-27 branch?
>
> > I noticed that when Emacs is called via:
> >
> > $ ~opt/emacs-repo/bin/emacs
> >
> > Emacs crashes.
> >
> > And when called via:
> >
> > $ ~opt/emacs-repo/bin/emacs -Q
> > M-x load-file RET
> > ~/.emacs RET
> >
> > Emacs does not crash.
>
> That would mean the trigger for the crash is in your .emacs file.
> Would it be possible to find the smallest subset of your .emacs which
> still causes the crash, and then post it?
>
> Thanks.
>

[-- Attachment #2: Type: text/html, Size: 1774 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-05  1:03   ` Vinicius José Latorre
@ 2020-03-05 22:21     ` Vinicius José Latorre
  2020-03-06  7:18       ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Vinicius José Latorre @ 2020-03-05 22:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

I found this line in my ~/.emacs that causes the crash:

(push '(font-backend xft x) default-frame-alist)





On Wed, Mar 4, 2020 at 10:03 PM Vinicius José Latorre <viniciusjl@gmail.com>
wrote:

> > Is this the master branch or the emacs-27 branch?
>
> Yes, the master branch (origin/master).
>
> > Would it be possible to find the smallest subset of your .emacs which
> > still causes the crash, and then post it?
>
> I'll try it.
>
>
>
>
> On Mon, Mar 2, 2020 at 5:11 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
>> > From: Vinicius José Latorre <viniciusjl@gmail.com>
>> > Date: Sun, 1 Mar 2020 22:39:09 -0300
>> >
>> > I've just updated Emacs sources in my local git clone and installed it
>> in my laptop.
>>
>> Is this the master branch or the emacs-27 branch?
>>
>> > I noticed that when Emacs is called via:
>> >
>> > $ ~opt/emacs-repo/bin/emacs
>> >
>> > Emacs crashes.
>> >
>> > And when called via:
>> >
>> > $ ~opt/emacs-repo/bin/emacs -Q
>> > M-x load-file RET
>> > ~/.emacs RET
>> >
>> > Emacs does not crash.
>>
>> That would mean the trigger for the crash is in your .emacs file.
>> Would it be possible to find the smallest subset of your .emacs which
>> still causes the crash, and then post it?
>>
>> Thanks.
>>
>

[-- Attachment #2: Type: text/html, Size: 2385 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-05 22:21     ` Vinicius José Latorre
@ 2020-03-06  7:18       ` Eli Zaretskii
  2020-03-06 17:20         ` Vinicius José Latorre
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2020-03-06  7:18 UTC (permalink / raw)
  To: Vinicius José Latorre; +Cc: 39865

> From: Vinicius José Latorre <viniciusjl@gmail.com>
> Date: Thu, 5 Mar 2020 19:21:22 -0300
> Cc: 39865@debbugs.gnu.org
> 
> I found this line in my ~/.emacs that causes the crash:
> 
> (push '(font-backend xft x) default-frame-alist)

OK, then the crash is a known problem: you cannot change the font
backend once the session started, you can only do that in X resources.
Previously, XFT was your original backend, but now it's HarfBuzz.

Why are you doing this?  What happens/doesn't work if you remove this
line?





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-06  7:18       ` Eli Zaretskii
@ 2020-03-06 17:20         ` Vinicius José Latorre
  2020-03-06 17:24           ` Vinicius José Latorre
  2020-03-06 17:53           ` Eli Zaretskii
  0 siblings, 2 replies; 27+ messages in thread
From: Vinicius José Latorre @ 2020-03-06 17:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865

[-- Attachment #1: Type: text/plain, Size: 1137 bytes --]

> OK, then the crash is a known problem: you cannot change the font
> backend once the session started, you can only do that in X resources.
> Previously, XFT was your original backend, but now it's HarfBuzz.

I think that emacs should be more robust about this and do not crash for
any bad value.

> Why are you doing this?  What happens/doesn't work if you remove this
> line?

Well, I use emacs since 1992, I don't remember why I set this.

Removing this line all works like a charming.



On Fri, Mar 6, 2020 at 4:18 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Vinicius José Latorre <viniciusjl@gmail.com>
> > Date: Thu, 5 Mar 2020 19:21:22 -0300
> > Cc: 39865@debbugs.gnu.org
> >
> > I found this line in my ~/.emacs that causes the crash:
> >
> > (push '(font-backend xft x) default-frame-alist)
>
> OK, then the crash is a known problem: you cannot change the font
> backend once the session started, you can only do that in X resources.
> Previously, XFT was your original backend, but now it's HarfBuzz.
>
> Why are you doing this?  What happens/doesn't work if you remove this
> line?
>

[-- Attachment #2: Type: text/html, Size: 1681 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-06 17:20         ` Vinicius José Latorre
@ 2020-03-06 17:24           ` Vinicius José Latorre
  2020-03-06 17:53           ` Eli Zaretskii
  1 sibling, 0 replies; 27+ messages in thread
From: Vinicius José Latorre @ 2020-03-06 17:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865

[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]

BTW, emacs 27 does not crash using that lisp line.


On Fri, Mar 6, 2020 at 2:20 PM Vinicius José Latorre <viniciusjl@gmail.com>
wrote:

> > OK, then the crash is a known problem: you cannot change the font
> > backend once the session started, you can only do that in X resources.
> > Previously, XFT was your original backend, but now it's HarfBuzz.
>
> I think that emacs should be more robust about this and do not crash for
> any bad value.
>
> > Why are you doing this?  What happens/doesn't work if you remove this
> > line?
>
> Well, I use emacs since 1992, I don't remember why I set this.
>
> Removing this line all works like a charming.
>
>
>
> On Fri, Mar 6, 2020 at 4:18 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
>> > From: Vinicius José Latorre <viniciusjl@gmail.com>
>> > Date: Thu, 5 Mar 2020 19:21:22 -0300
>> > Cc: 39865@debbugs.gnu.org
>> >
>> > I found this line in my ~/.emacs that causes the crash:
>> >
>> > (push '(font-backend xft x) default-frame-alist)
>>
>> OK, then the crash is a known problem: you cannot change the font
>> backend once the session started, you can only do that in X resources.
>> Previously, XFT was your original backend, but now it's HarfBuzz.
>>
>> Why are you doing this?  What happens/doesn't work if you remove this
>> line?
>>
>

[-- Attachment #2: Type: text/html, Size: 2160 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-06 17:20         ` Vinicius José Latorre
  2020-03-06 17:24           ` Vinicius José Latorre
@ 2020-03-06 17:53           ` Eli Zaretskii
  2020-03-10 14:29             ` Robert Pluim
  1 sibling, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2020-03-06 17:53 UTC (permalink / raw)
  To: Vinicius José Latorre; +Cc: 39865

> From: Vinicius José Latorre <viniciusjl@gmail.com>
> Date: Fri, 6 Mar 2020 14:20:42 -0300
> Cc: 39865@debbugs.gnu.org
> 
> > OK, then the crash is a known problem: you cannot change the font
> > backend once the session started, you can only do that in X resources.
> > Previously, XFT was your original backend, but now it's HarfBuzz.
> 
> I think that emacs should be more robust about this and do not crash for any bad value.

I agree.  It is not a bad value, we just couldn't yet find a way of
switching the font-backend.

> > Why are you doing this?  What happens/doesn't work if you remove this
> > line?
> 
> Well, I use emacs since 1992, I don't remember why I set this.
> 
> Removing this line all works like a charming.

Great, thanks.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-06 17:53           ` Eli Zaretskii
@ 2020-03-10 14:29             ` Robert Pluim
  2020-03-10 14:52               ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2020-03-10 14:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865, Vinicius José Latorre

>>>>> On Fri, 06 Mar 2020 19:53:32 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Vinicius José Latorre <viniciusjl@gmail.com>
    >> Date: Fri, 6 Mar 2020 14:20:42 -0300
    >> Cc: 39865@debbugs.gnu.org
    >> 
    >> > OK, then the crash is a known problem: you cannot change the font
    >> > backend once the session started, you can only do that in X resources.
    >> > Previously, XFT was your original backend, but now it's HarfBuzz.
    >> 
    >> I think that emacs should be more robust about this and do not crash for any bad value.

    Eli> I agree.  It is not a bad value, we just couldn't yet find a way of
    Eli> switching the font-backend.

Eli, would you accept a patch for emacs-27 that signals a user-error
if trying to set a font-backend thatʼs not supported by the running
emacs? Or that ignores it (with a message)?

Robert





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-10 14:29             ` Robert Pluim
@ 2020-03-10 14:52               ` Eli Zaretskii
  2020-03-10 14:54                 ` Vinicius José Latorre
  2020-03-10 15:15                 ` Robert Pluim
  0 siblings, 2 replies; 27+ messages in thread
From: Eli Zaretskii @ 2020-03-10 14:52 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 39865, viniciusjl

> From: Robert Pluim <rpluim@gmail.com>
> Cc: Vinicius José Latorre <viniciusjl@gmail.com>,
>   39865@debbugs.gnu.org
> Date: Tue, 10 Mar 2020 15:29:44 +0100
> 
>     >> I think that emacs should be more robust about this and do not crash for any bad value.
> 
>     Eli> I agree.  It is not a bad value, we just couldn't yet find a way of
>     Eli> switching the font-backend.
> 
> Eli, would you accept a patch for emacs-27 that signals a user-error
> if trying to set a font-backend thatʼs not supported by the running
> emacs? Or that ignores it (with a message)?

In general, yes; but I'd need to see the patch.

AFAIU, the problem in this case wasn't that the backend wasn't
supported, it was that it was changed in the middle of a session.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-10 14:52               ` Eli Zaretskii
@ 2020-03-10 14:54                 ` Vinicius José Latorre
  2020-03-10 15:20                   ` Robert Pluim
  2020-03-10 15:15                 ` Robert Pluim
  1 sibling, 1 reply; 27+ messages in thread
From: Vinicius José Latorre @ 2020-03-10 14:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865, Robert Pluim

[-- Attachment #1: Type: text/plain, Size: 1140 bytes --]

> AFAIU, the problem in this case wasn't that the backend wasn't
> supported, it was that it was changed in the middle of a session.

Yes, but only at emacs starting (~/.emacs evaluation), after starting there
is no problem to set a font-backend.




On Tue, Mar 10, 2020 at 11:52 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Robert Pluim <rpluim@gmail.com>
> > Cc: Vinicius José Latorre <viniciusjl@gmail.com>,
> >   39865@debbugs.gnu.org
> > Date: Tue, 10 Mar 2020 15:29:44 +0100
> >
> >     >> I think that emacs should be more robust about this and do not
> crash for any bad value.
> >
> >     Eli> I agree.  It is not a bad value, we just couldn't yet find a
> way of
> >     Eli> switching the font-backend.
> >
> > Eli, would you accept a patch for emacs-27 that signals a user-error
> > if trying to set a font-backend thatʼs not supported by the running
> > emacs? Or that ignores it (with a message)?
>
> In general, yes; but I'd need to see the patch.
>
> AFAIU, the problem in this case wasn't that the backend wasn't
> supported, it was that it was changed in the middle of a session.
>

[-- Attachment #2: Type: text/html, Size: 1782 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-10 14:52               ` Eli Zaretskii
  2020-03-10 14:54                 ` Vinicius José Latorre
@ 2020-03-10 15:15                 ` Robert Pluim
  2020-03-11 16:58                   ` Eli Zaretskii
  1 sibling, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2020-03-10 15:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865, viniciusjl

>>>>> On Tue, 10 Mar 2020 16:52:04 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Cc: Vinicius José Latorre <viniciusjl@gmail.com>,
    >> 39865@debbugs.gnu.org
    >> Date: Tue, 10 Mar 2020 15:29:44 +0100
    >> 
    >> >> I think that emacs should be more robust about this and do not crash for any bad value.
    >> 
    Eli> I agree.  It is not a bad value, we just couldn't yet find a way of
    Eli> switching the font-backend.
    >> 
    >> Eli, would you accept a patch for emacs-27 that signals a user-error
    >> if trying to set a font-backend thatʼs not supported by the running
    >> emacs? Or that ignores it (with a message)?

    Eli> In general, yes; but I'd need to see the patch.

diff --git a/src/frame.c b/src/frame.c
index 51fc78ab70..3b0174cea9 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4090,6 +4090,21 @@ gui_set_frame_parameters (struct frame *f, Lisp_Object alist)
 	}
       else
 	{
+          if (EQ (prop, Qfont_backend))
+            {
+              Lisp_Object tail = val;
+              Lisp_Object backend;
+              FOR_EACH_TAIL_SAFE (tail)
+                {
+                  backend = XCAR (tail);
+                  if (! c_symbol_p (XSYMBOL (backend)))
+                    {
+                      AUTO_STRING (format, "Unsupported font-backend: \"%s\"");
+                      xsignal1 (Quser_error, CALLN (Fformat, format, backend));
+                    }
+                }
+            }
+
 	  register Lisp_Object param_index, old_value;
 
 	  old_value = get_frame_param (f, prop);

    Eli> AFAIU, the problem in this case wasn't that the backend wasn't
    Eli> supported, it was that it was changed in the middle of a session.

Setting font-backend to a supported value with default-frame-alist
in .emacs should work, and does for me in master, at least switching
from 'ftcrhb' to 'ftcr'. Switching from 'ftcrhb' to 'xft' crashes.

Hmm, switching to 'x' also crashes. But I can create a new frame with
'x' as font-backend.

Robert





^ permalink raw reply related	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-10 14:54                 ` Vinicius José Latorre
@ 2020-03-10 15:20                   ` Robert Pluim
  2020-03-10 19:03                     ` Vinicius José Latorre
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2020-03-10 15:20 UTC (permalink / raw)
  To: Vinicius José Latorre; +Cc: 39865

>>>>> On Tue, 10 Mar 2020 11:54:53 -0300, Vinicius José Latorre <viniciusjl@gmail.com> said:

    >> AFAIU, the problem in this case wasn't that the backend wasn't
    >> supported, it was that it was changed in the middle of a session.

    Vinicius> Yes, but only at emacs starting (~/.emacs evaluation), after starting there
    Vinicius> is no problem to set a font-backend.

I donʼt remember seeing: was your emacs built with cairo or with xft?
With or without HarfBuzz? Because I canʼt get an xft+hb build to
crash when switching the font-backend to 'xft'.

Robert





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-10 15:20                   ` Robert Pluim
@ 2020-03-10 19:03                     ` Vinicius José Latorre
  2020-03-11  7:33                       ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Vinicius José Latorre @ 2020-03-10 19:03 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 39865

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

> I donʼt remember seeing: was your emacs built with cairo or with xft?
> With or without HarfBuzz? Because I canʼt get an xft+hb build to
> crash when switching the font-backend to 'xft'.

The line below in my ~/.emacs was crashing emacs at start time.

(push '(font-backend xft x) default-frame-alist)

Without the line above, all works right.

If emacs is started with -Q and then loading ~/.emacs with the line above
also works right, the problem is at starting time with that line.

The libharfbuzz* packages are installed in my GNU Debian.



On Tue, Mar 10, 2020 at 12:20 PM Robert Pluim <rpluim@gmail.com> wrote:

> >>>>> On Tue, 10 Mar 2020 11:54:53 -0300, Vinicius José Latorre <
> viniciusjl@gmail.com> said:
>
>     >> AFAIU, the problem in this case wasn't that the backend wasn't
>     >> supported, it was that it was changed in the middle of a session.
>
>     Vinicius> Yes, but only at emacs starting (~/.emacs evaluation), after
> starting there
>     Vinicius> is no problem to set a font-backend.
>
> I donʼt remember seeing: was your emacs built with cairo or with xft?
> With or without HarfBuzz? Because I canʼt get an xft+hb build to
> crash when switching the font-backend to 'xft'.
>
> Robert
>

[-- Attachment #2: Type: text/html, Size: 1818 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-10 19:03                     ` Vinicius José Latorre
@ 2020-03-11  7:33                       ` Robert Pluim
  2020-03-11 20:45                         ` Vinicius José Latorre
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2020-03-11  7:33 UTC (permalink / raw)
  To: Vinicius José Latorre; +Cc: 39865

>>>>> On Tue, 10 Mar 2020 16:03:12 -0300, Vinicius José Latorre <viniciusjl@gmail.com> said:

    >> I donʼt remember seeing: was your emacs built with cairo or with xft?
    >> With or without HarfBuzz? Because I canʼt get an xft+hb build to
    >> crash when switching the font-backend to 'xft'.

    Vinicius> The line below in my ~/.emacs was crashing emacs at start time.

    Vinicius> (push '(font-backend xft x) default-frame-alist)

    Vinicius> Without the line above, all works right.

    Vinicius> If emacs is started with -Q and then loading ~/.emacs with the line above
    Vinicius> also works right, the problem is at starting time with that line.

This we knew, the question is about how your emacs was built. Could
you show us your value of 'system-configuration-features', that will
tell us all we need to know about HarfBuzz etc.

Thanks

Robert





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-10 15:15                 ` Robert Pluim
@ 2020-03-11 16:58                   ` Eli Zaretskii
  2020-03-12  9:33                     ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2020-03-11 16:58 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 39865, viniciusjl

> From: Robert Pluim <rpluim@gmail.com>
> Cc: viniciusjl@gmail.com,  39865@debbugs.gnu.org
> Date: Tue, 10 Mar 2020 16:15:09 +0100
> 
> +          if (EQ (prop, Qfont_backend))
> +            {
> +              Lisp_Object tail = val;
> +              Lisp_Object backend;
> +              FOR_EACH_TAIL_SAFE (tail)
> +                {
> +                  backend = XCAR (tail);
> +                  if (! c_symbol_p (XSYMBOL (backend)))
> +                    {
> +                      AUTO_STRING (format, "Unsupported font-backend: \"%s\"");
> +                      xsignal1 (Quser_error, CALLN (Fformat, format, backend));
> +                    }
> +                }
> +            }
> +

This will pass any symbol, it doesn't really verify that the symbol
identifies a font backend, does it?  Why not loop over
font_driver_list instead?  Or do we need to support here font backends
that were not yet registered?

> Setting font-backend to a supported value with default-frame-alist
> in .emacs should work, and does for me in master, at least switching
> from 'ftcrhb' to 'ftcr'. Switching from 'ftcrhb' to 'xft' crashes.
> 
> Hmm, switching to 'x' also crashes.

And the above patch doesn't fix those crashes, does it?





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-11  7:33                       ` Robert Pluim
@ 2020-03-11 20:45                         ` Vinicius José Latorre
  2020-03-12  9:39                           ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Vinicius José Latorre @ 2020-03-11 20:45 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 39865

[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]

> This we knew, the question is about how your emacs was built. Could
> you show us your value of 'system-configuration-features', that will
> tell us all we need to know about HarfBuzz etc.

system-configuration-features is a variable defined in ‘C source code’.
Its value is
"XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
PDUMPER LCMS2 GMP"



On Wed, Mar 11, 2020 at 4:34 AM Robert Pluim <rpluim@gmail.com> wrote:

> >>>>> On Tue, 10 Mar 2020 16:03:12 -0300, Vinicius José Latorre <
> viniciusjl@gmail.com> said:
>
>     >> I donʼt remember seeing: was your emacs built with cairo or with
> xft?
>     >> With or without HarfBuzz? Because I canʼt get an xft+hb build to
>     >> crash when switching the font-backend to 'xft'.
>
>     Vinicius> The line below in my ~/.emacs was crashing emacs at start
> time.
>
>     Vinicius> (push '(font-backend xft x) default-frame-alist)
>
>     Vinicius> Without the line above, all works right.
>
>     Vinicius> If emacs is started with -Q and then loading ~/.emacs with
> the line above
>     Vinicius> also works right, the problem is at starting time with that
> line.
>
> This we knew, the question is about how your emacs was built. Could
> you show us your value of 'system-configuration-features', that will
> tell us all we need to know about HarfBuzz etc.
>
> Thanks
>
> Robert
>

[-- Attachment #2: Type: text/html, Size: 2097 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-11 16:58                   ` Eli Zaretskii
@ 2020-03-12  9:33                     ` Robert Pluim
  2020-03-12 10:25                       ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2020-03-12  9:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865, viniciusjl

>>>>> On Wed, 11 Mar 2020 18:58:41 +0200, Eli Zaretskii <eliz@gnu.org> said:

    Eli> This will pass any symbol, it doesn't really verify that the symbol
    Eli> identifies a font backend, does it?  Why not loop over
    Eli> font_driver_list instead?  Or do we need to support here font backends
    Eli> that were not yet registered?

Probably, but this doesnʼt fix everything anyway, see below.

    >> Setting font-backend to a supported value with default-frame-alist
    >> in .emacs should work, and does for me in master, at least switching
    >> from 'ftcrhb' to 'ftcr'. Switching from 'ftcrhb' to 'xft' crashes.
    >> 
    >> Hmm, switching to 'x' also crashes.

    Eli> And the above patch doesn't fix those crashes, does it?

It fixes the switch to xft, but not the switch to x.

Of course, what I should do is rebase
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>

Yep, that fixes this for me. Of course it breaks the macOS build,
since that doesnʼt have a gui_default_font_parameter function
(yet :-) ).

Robert





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-11 20:45                         ` Vinicius José Latorre
@ 2020-03-12  9:39                           ` Robert Pluim
  0 siblings, 0 replies; 27+ messages in thread
From: Robert Pluim @ 2020-03-12  9:39 UTC (permalink / raw)
  To: Vinicius José Latorre; +Cc: 39865

>>>>> On Wed, 11 Mar 2020 17:45:44 -0300, Vinicius José Latorre <viniciusjl@gmail.com> said:

    >> This we knew, the question is about how your emacs was built. Could
    >> you show us your value of 'system-configuration-features', that will
    >> tell us all we need to know about HarfBuzz etc.

    Vinicius> system-configuration-features is a variable defined in ‘C source code’.
    Vinicius> Its value is
    Vinicius> "XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
    Vinicius> INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
    Vinicius> ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
    Vinicius> PDUMPER LCMS2 GMP"

Thanks for that. So this is the same as
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386>

Robert





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-12  9:33                     ` Robert Pluim
@ 2020-03-12 10:25                       ` Robert Pluim
  2020-03-13  0:44                         ` Vinicius José Latorre
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2020-03-12 10:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865, viniciusjl

>>>>> On Thu, 12 Mar 2020 10:33:00 +0100, Robert Pluim <rpluim@gmail.com> said:
    Robert> Of course, what I should do is rebase
    Robert> <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>

    Robert> Yep, that fixes this for me. Of course it breaks the macOS build,
    Robert> since that doesnʼt have a gui_default_font_parameter function
    Robert> (yet :-) ).

Vinicius, the following patch should fix things for you. Iʼll have to
look at what's needed on the macOS side.

diff --git a/src/dispextern.h b/src/dispextern.h
index 6246c7c080..f08231f071 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3726,6 +3726,7 @@ #define IMAGE_BACKGROUND_TRANSPARENT(img, f, mask)			      \
                                           Lisp_Object, Lisp_Object,
                                           const char *, const char *,
                                           enum resource_types);
+extern void gui_default_font_parameter (struct frame *, Lisp_Object);
 
 #ifndef HAVE_NS /* These both used on W32 and X only.  */
 extern bool gui_mouse_grabbed (Display_Info *);
diff --git a/src/frame.c b/src/frame.c
index 51fc78ab70..45fed8420c 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4565,7 +4565,11 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
     return;
 
   if (FRAME_FONT (f))
-    free_all_realized_faces (Qnil);
+    {
+      Lisp_Object frame;
+      XSETFRAME (frame, f);
+      free_all_realized_faces (frame);
+    }
 
   new_value = font_update_drivers (f, NILP (new_value) ? Qt : new_value);
   if (NILP (new_value))
@@ -4579,10 +4583,8 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
 
   if (FRAME_FONT (f))
     {
-      Lisp_Object frame;
-
-      XSETFRAME (frame, f);
-      gui_set_font (f, Fframe_parameter (frame, Qfont), Qnil);
+      /* Reconsider default font after backend(s) change (Bug#23386).  */
+      gui_default_font_parameter (f, Qnil);
       face_change = true;
       windows_or_buffers_changed = 18;
     }
diff --git a/src/xfns.c b/src/xfns.c
index 5758bb7a18..ab013d85d8 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3555,8 +3555,8 @@ do_unwind_create_frame (Lisp_Object frame)
   unwind_create_frame (frame);
 }
 
-static void
-x_default_font_parameter (struct frame *f, Lisp_Object parms)
+void
+gui_default_font_parameter (struct frame *f, Lisp_Object parms)
 {
   struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
   Lisp_Object font_param = gui_display_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
@@ -3894,7 +3894,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
 
   /* Extract the window parameters from the supplied values
      that are needed to determine window geometry.  */
-  x_default_font_parameter (f, parms);
+  gui_default_font_parameter (f, parms);
   if (!FRAME_FONT (f))
     {
       delete_frame (frame, Qnoelisp);
@@ -6378,7 +6378,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms)
 
   /* Extract the window parameters from the supplied values that are
      needed to determine window geometry.  */
-  x_default_font_parameter (f, parms);
+  gui_default_font_parameter (f, parms);
 
   gui_default_parameter (f, parms, Qborder_width, make_fixnum (0),
                          "borderWidth", "BorderWidth", RES_TYPE_NUMBER);





^ permalink raw reply related	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-12 10:25                       ` Robert Pluim
@ 2020-03-13  0:44                         ` Vinicius José Latorre
  2020-03-13  9:35                           ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Vinicius José Latorre @ 2020-03-13  0:44 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 39865

[-- Attachment #1: Type: text/plain, Size: 3871 bytes --]

> Vinicius, the following patch should fix things for you.

I've just reinstalled with the fix, and I confirm that all works right when
setting font-backend to xft.



On Thu, Mar 12, 2020 at 7:25 AM Robert Pluim <rpluim@gmail.com> wrote:

> >>>>> On Thu, 12 Mar 2020 10:33:00 +0100, Robert Pluim <rpluim@gmail.com>
> said:
>     Robert> Of course, what I should do is rebase
>     Robert> <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>
>
>     Robert> Yep, that fixes this for me. Of course it breaks the macOS
> build,
>     Robert> since that doesnʼt have a gui_default_font_parameter function
>     Robert> (yet :-) ).
>
> Vinicius, the following patch should fix things for you. Iʼll have to
> look at what's needed on the macOS side.
>
> diff --git a/src/dispextern.h b/src/dispextern.h
> index 6246c7c080..f08231f071 100644
> --- a/src/dispextern.h
> +++ b/src/dispextern.h
> @@ -3726,6 +3726,7 @@ #define IMAGE_BACKGROUND_TRANSPARENT(img, f, mask)
>                             \
>                                            Lisp_Object, Lisp_Object,
>                                            const char *, const char *,
>                                            enum resource_types);
> +extern void gui_default_font_parameter (struct frame *, Lisp_Object);
>
>  #ifndef HAVE_NS /* These both used on W32 and X only.  */
>  extern bool gui_mouse_grabbed (Display_Info *);
> diff --git a/src/frame.c b/src/frame.c
> index 51fc78ab70..45fed8420c 100644
> --- a/src/frame.c
> +++ b/src/frame.c
> @@ -4565,7 +4565,11 @@ gui_set_font_backend (struct frame *f, Lisp_Object
> new_value, Lisp_Object old_va
>      return;
>
>    if (FRAME_FONT (f))
> -    free_all_realized_faces (Qnil);
> +    {
> +      Lisp_Object frame;
> +      XSETFRAME (frame, f);
> +      free_all_realized_faces (frame);
> +    }
>
>    new_value = font_update_drivers (f, NILP (new_value) ? Qt : new_value);
>    if (NILP (new_value))
> @@ -4579,10 +4583,8 @@ gui_set_font_backend (struct frame *f, Lisp_Object
> new_value, Lisp_Object old_va
>
>    if (FRAME_FONT (f))
>      {
> -      Lisp_Object frame;
> -
> -      XSETFRAME (frame, f);
> -      gui_set_font (f, Fframe_parameter (frame, Qfont), Qnil);
> +      /* Reconsider default font after backend(s) change (Bug#23386).  */
> +      gui_default_font_parameter (f, Qnil);
>        face_change = true;
>        windows_or_buffers_changed = 18;
>      }
> diff --git a/src/xfns.c b/src/xfns.c
> index 5758bb7a18..ab013d85d8 100644
> --- a/src/xfns.c
> +++ b/src/xfns.c
> @@ -3555,8 +3555,8 @@ do_unwind_create_frame (Lisp_Object frame)
>    unwind_create_frame (frame);
>  }
>
> -static void
> -x_default_font_parameter (struct frame *f, Lisp_Object parms)
> +void
> +gui_default_font_parameter (struct frame *f, Lisp_Object parms)
>  {
>    struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
>    Lisp_Object font_param = gui_display_get_arg (dpyinfo, parms, Qfont,
> NULL, NULL,
> @@ -3894,7 +3894,7 @@ DEFUN ("x-create-frame", Fx_create_frame,
> Sx_create_frame,
>
>    /* Extract the window parameters from the supplied values
>       that are needed to determine window geometry.  */
> -  x_default_font_parameter (f, parms);
> +  gui_default_font_parameter (f, parms);
>    if (!FRAME_FONT (f))
>      {
>        delete_frame (frame, Qnoelisp);
> @@ -6378,7 +6378,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
> Lisp_Object parms)
>
>    /* Extract the window parameters from the supplied values that are
>       needed to determine window geometry.  */
> -  x_default_font_parameter (f, parms);
> +  gui_default_font_parameter (f, parms);
>
>    gui_default_parameter (f, parms, Qborder_width, make_fixnum (0),
>                           "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
>

[-- Attachment #2: Type: text/html, Size: 4788 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-13  0:44                         ` Vinicius José Latorre
@ 2020-03-13  9:35                           ` Robert Pluim
  2020-03-13 14:09                             ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2020-03-13  9:35 UTC (permalink / raw)
  To: Vinicius José Latorre; +Cc: 39865

>>>>> On Thu, 12 Mar 2020 21:44:15 -0300, Vinicius José Latorre <viniciusjl@gmail.com> said:

    >> Vinicius, the following patch should fix things for you.
    Vinicius> I've just reinstalled with the fix, and I confirm that all works right when
    Vinicius> setting font-backend to xft.

Thanks for testing.

Eli, the patch as it stands is not suitable for pushing to emacs-27,
since it breaks the macOS build, which doesnʼt have a
gui_default_font_parameter function. As far as I can tell (and have
tested :-) ), we can get away with a dummy one, since there is only
one font backend on macOS. If you agree, this is what the complete
patch looks like:

diff --git a/src/dispextern.h b/src/dispextern.h
index 6246c7c080..f08231f071 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3726,6 +3726,7 @@ #define IMAGE_BACKGROUND_TRANSPARENT(img, f, mask)			      \
                                           Lisp_Object, Lisp_Object,
                                           const char *, const char *,
                                           enum resource_types);
+extern void gui_default_font_parameter (struct frame *, Lisp_Object);
 
 #ifndef HAVE_NS /* These both used on W32 and X only.  */
 extern bool gui_mouse_grabbed (Display_Info *);
diff --git a/src/frame.c b/src/frame.c
index 51fc78ab70..45fed8420c 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4565,7 +4565,11 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
     return;
 
   if (FRAME_FONT (f))
-    free_all_realized_faces (Qnil);
+    {
+      Lisp_Object frame;
+      XSETFRAME (frame, f);
+      free_all_realized_faces (frame);
+    }
 
   new_value = font_update_drivers (f, NILP (new_value) ? Qt : new_value);
   if (NILP (new_value))
@@ -4579,10 +4583,8 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
 
   if (FRAME_FONT (f))
     {
-      Lisp_Object frame;
-
-      XSETFRAME (frame, f);
-      gui_set_font (f, Fframe_parameter (frame, Qfont), Qnil);
+      /* Reconsider default font after backend(s) change (Bug#23386).  */
+      gui_default_font_parameter (f, Qnil);
       face_change = true;
       windows_or_buffers_changed = 18;
     }
diff --git a/src/nsfns.m b/src/nsfns.m
index cbde93b3f1..b7f6813e4f 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1447,6 +1447,14 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side.
   return unbind_to (count, frame);
 }
 
+/* This currently does nothing, since it's only really needed when
+   changing the font-backend, but macOS currently only has one
+   possible backend.  */
+void
+gui_default_font_parameter (struct frame *f, Lisp_Object parms)
+{
+}
+
 static BOOL
 ns_window_is_ancestor (NSWindow *win, NSWindow *candidate)
 /* Test whether CANDIDATE is an ancestor window of WIN.  */
diff --git a/src/w32fns.c b/src/w32fns.c
index 61e22e5700..c09e14d354 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5749,8 +5749,8 @@ do_unwind_create_frame (Lisp_Object frame)
   unwind_create_frame (frame);
 }
 
-static void
-w32_default_font_parameter (struct frame *f, Lisp_Object parms)
+void
+gui_default_font_parameter (struct frame *f, Lisp_Object parms)
 {
   struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
   Lisp_Object font_param = gui_display_get_arg (dpyinfo,
@@ -5978,7 +5978,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
 
   /* Extract the window parameters from the supplied values
      that are needed to determine window geometry.  */
-  w32_default_font_parameter (f, parameters);
+  gui_default_font_parameter (f, parameters);
 
   /* Default BorderWidth to 0 to match other platforms.  */
   gui_default_parameter (f, parameters, Qborder_width, make_fixnum (0),
@@ -7039,7 +7039,7 @@ w32_create_tip_frame (struct w32_display_info *dpyinfo, Lisp_Object parms)
 
   /* Extract the window parameters from the supplied values
      that are needed to determine window geometry.  */
-  w32_default_font_parameter (f, parms);
+  gui_default_font_parameter (f, parms);
 
   gui_default_parameter (f, parms, Qborder_width, make_fixnum (2),
                          "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
diff --git a/src/xfns.c b/src/xfns.c
index 5758bb7a18..ab013d85d8 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3555,8 +3555,8 @@ do_unwind_create_frame (Lisp_Object frame)
   unwind_create_frame (frame);
 }
 
-static void
-x_default_font_parameter (struct frame *f, Lisp_Object parms)
+void
+gui_default_font_parameter (struct frame *f, Lisp_Object parms)
 {
   struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
   Lisp_Object font_param = gui_display_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
@@ -3894,7 +3894,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
 
   /* Extract the window parameters from the supplied values
      that are needed to determine window geometry.  */
-  x_default_font_parameter (f, parms);
+  gui_default_font_parameter (f, parms);
   if (!FRAME_FONT (f))
     {
       delete_frame (frame, Qnoelisp);
@@ -6378,7 +6378,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms)
 
   /* Extract the window parameters from the supplied values that are
      needed to determine window geometry.  */
-  x_default_font_parameter (f, parms);
+  gui_default_font_parameter (f, parms);
 
   gui_default_parameter (f, parms, Qborder_width, make_fixnum (0),
                          "borderWidth", "BorderWidth", RES_TYPE_NUMBER);





^ permalink raw reply related	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-13  9:35                           ` Robert Pluim
@ 2020-03-13 14:09                             ` Eli Zaretskii
  2020-03-13 15:09                               ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2020-03-13 14:09 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 39865, viniciusjl

> From: Robert Pluim <rpluim@gmail.com>
> Date: Fri, 13 Mar 2020 10:35:14 +0100
> Cc: 39865@debbugs.gnu.org
> 
> Eli, the patch as it stands is not suitable for pushing to emacs-27,
> since it breaks the macOS build, which doesnʼt have a
> gui_default_font_parameter function. As far as I can tell (and have
> tested :-) ), we can get away with a dummy one, since there is only
> one font backend on macOS.

I'm okay with doing that.  However, ...

> If you agree, this is what the complete patch looks like:

... this is not how we introduce terminal-dependent methods.  We don't
define different versions of gui_SOMETHING functions in each
terminal-specific back-end.  Instead, we add a member to 'struct
redisplay_interface', and then assign a different value to it in each
back-end.  See how x_redisplay_interface, w32_redisplay_interface,
etc. are defined in the respective *term.[cm] files, and how they are
used via the FRAME_RIF macro.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-13 14:09                             ` Eli Zaretskii
@ 2020-03-13 15:09                               ` Robert Pluim
  2020-03-17 10:16                                 ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2020-03-13 15:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865, viniciusjl

>>>>> On Fri, 13 Mar 2020 16:09:27 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Date: Fri, 13 Mar 2020 10:35:14 +0100
    >> Cc: 39865@debbugs.gnu.org
    >> 
    >> Eli, the patch as it stands is not suitable for pushing to emacs-27,
    >> since it breaks the macOS build, which doesnʼt have a
    >> gui_default_font_parameter function. As far as I can tell (and have
    >> tested :-) ), we can get away with a dummy one, since there is only
    >> one font backend on macOS.

    Eli> I'm okay with doing that.  However, ...

    >> If you agree, this is what the complete patch looks like:

    Eli> ... this is not how we introduce terminal-dependent methods.  We don't
    Eli> define different versions of gui_SOMETHING functions in each
    Eli> terminal-specific back-end.  Instead, we add a member to 'struct
    Eli> redisplay_interface', and then assign a different value to it in each
    Eli> back-end.  See how x_redisplay_interface, w32_redisplay_interface,
    Eli> etc. are defined in the respective *term.[cm] files, and how they are
    Eli> used via the FRAME_RIF macro.

OK, I can rework it using that.

Robert





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-13 15:09                               ` Robert Pluim
@ 2020-03-17 10:16                                 ` Robert Pluim
  2020-03-17 15:15                                   ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2020-03-17 10:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865, viniciusjl

[-- Attachment #1: Type: text/plain, Size: 922 bytes --]

>>>>> On Fri, 13 Mar 2020 16:09:25 +0100, Robert Pluim <rpluim@gmail.com> said:
    Eli> ... this is not how we introduce terminal-dependent methods.  We don't
    Eli> define different versions of gui_SOMETHING functions in each
    Eli> terminal-specific back-end.  Instead, we add a member to 'struct
    Eli> redisplay_interface', and then assign a different value to it in each
    Eli> back-end.  See how x_redisplay_interface, w32_redisplay_interface,
    Eli> etc. are defined in the respective *term.[cm] files, and how they are
    Eli> used via the FRAME_RIF macro.

    Robert> OK, I can rework it using that.

The following has been compiled and tested on macOS, GNU/Linux, and
MSWindows. Itʼs against emacs-27, where Iʼd prefer to put it, since
people might start building that with Cairo enabled, which would make
this crash more likely, but I can put it in master if you wish.

Robert


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Recalculate-default-font-when-switching-font-backend.patch --]
[-- Type: text/x-patch, Size: 6342 bytes --]

From 6c1062b32f760bf220477230bb1e41a6c7149f2b Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Mon, 16 Mar 2020 17:21:02 +0100
Subject: [PATCH] Recalculate default font when switching font backend
To: emacs-devel@gnu.org

This is an updated version of the patch by Dmitry Antipov
<dmantipov@yandex.ru> in
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>.

Fixes Bug#23386

* src/dispextern.h (struct redisplay_interface): New member
default_font_parameter.
* src/xterm.h: Add prototype for x_default_font_parameter.
* src/xterm.c (x_redisplay_interface): Initialize
default_font_parameter member.
* src/xfns.c (x_default_font_parameter): Make non-static.
* src/w32term.h: Add prototype for w32_default_font_parameter
* src/w32fns.c (w32_default_font_parameter): Make non-static.
* src/w32term.c (w32_redisplay_interface): Initialize
default_font_parameter member.
* src/nsterm.m (ns_redisplay_interface): Add dummy
ns_default_font_parameter (there is currently only one possible font
backend on macOS).  Initialize default_font_parameter member.
* src/frame.c (gui_set_font_backend): Recalculate default font using
RIF default_font_parameter to avoid crash when changing font backend.
---
 src/dispextern.h |  3 +++
 src/frame.c      | 12 +++++++-----
 src/nsterm.m     | 10 +++++++++-
 src/w32fns.c     |  2 +-
 src/w32term.c    |  3 ++-
 src/w32term.h    |  4 ++++
 src/xfns.c       |  2 +-
 src/xterm.c      |  3 ++-
 src/xterm.h      |  1 +
 9 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/src/dispextern.h b/src/dispextern.h
index 6246c7c080..724aad4227 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3003,6 +3003,9 @@ reset_mouse_highlight (Mouse_HLInfo *hlinfo)
   /* Cancel hourglass cursor on frame F.  */
   void (*hide_hourglass) (struct frame *f);
 
+  /* Called to (re)calculate the default face when changing the font
+     backend.  */
+  void (*default_font_parameter) (struct frame *f, Lisp_Object parms);
 #endif /* HAVE_WINDOW_SYSTEM */
 };
 
diff --git a/src/frame.c b/src/frame.c
index 88d6f22fc0..ecf175f4f9 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4565,7 +4565,11 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
     return;
 
   if (FRAME_FONT (f))
-    free_all_realized_faces (Qnil);
+    {
+      Lisp_Object frame;
+      XSETFRAME (frame, f);
+      free_all_realized_faces (frame);
+    }
 
   new_value = font_update_drivers (f, NILP (new_value) ? Qt : new_value);
   if (NILP (new_value))
@@ -4579,10 +4583,8 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
 
   if (FRAME_FONT (f))
     {
-      Lisp_Object frame;
-
-      XSETFRAME (frame, f);
-      gui_set_font (f, Fframe_parameter (frame, Qfont), Qnil);
+      /* Reconsider default font after backend(s) change (Bug#23386).  */
+      FRAME_RIF(f)->default_font_parameter (f, Qnil);
       face_change = true;
       windows_or_buffers_changed = 18;
     }
diff --git a/src/nsterm.m b/src/nsterm.m
index ed2d82ceae..e92e3d5a6f 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5132,6 +5132,13 @@ static Lisp_Object ns_string_to_lispmod (const char *s)
     reset_mouse_highlight (&dpyinfo->mouse_highlight);
 }
 
+/* This currently does nothing, since it's only really needed when
+   changing the font-backend, but macOS currently only has one
+   possible backend.  This may change if we add HarfBuzz support.  */
+static void
+ns_default_font_parameter (struct frame *f, Lisp_Object parms)
+{
+}
 
 /* This and next define (many of the) public functions in this file.  */
 /* gui_* are generic versions in xdisp.c that we, and other terms, get away
@@ -5167,7 +5174,8 @@ static Lisp_Object ns_string_to_lispmod (const char *s)
   ns_draw_window_divider,
   ns_shift_glyphs_for_insert,
   ns_show_hourglass,
-  ns_hide_hourglass
+  ns_hide_hourglass,
+  ns_default_font_parameter
 };
 
 
diff --git a/src/w32fns.c b/src/w32fns.c
index 61e22e5700..2f01fb52e9 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5749,7 +5749,7 @@ do_unwind_create_frame (Lisp_Object frame)
   unwind_create_frame (frame);
 }
 
-static void
+void
 w32_default_font_parameter (struct frame *f, Lisp_Object parms)
 {
   struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
diff --git a/src/w32term.c b/src/w32term.c
index f515f5604d..76cf6bd696 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -7249,7 +7249,8 @@ w32_make_rdb (char *xrm_option)
   w32_draw_window_divider,
   w32_shift_glyphs_for_insert,
   w32_show_hourglass,
-  w32_hide_hourglass
+  w32_hide_hourglass,
+  w32_default_font_parameter
 };
 
 static void w32_delete_terminal (struct terminal *term);
diff --git a/src/w32term.h b/src/w32term.h
index 737764b894..f8a8a727e8 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -267,6 +267,10 @@ #define CP_DEFAULT 1004
 extern const char *w32_get_string_resource (void *v_rdb,
                                             const char *name,
                                             const char *class);
+
+/* w32fns.c */
+extern void w32_default_font_parameter (struct frame* f, Lisp_Object parms);
+
 \f
 #define PIX_TYPE COLORREF
 
diff --git a/src/xfns.c b/src/xfns.c
index 276ea1c393..afe1ceef81 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3555,7 +3555,7 @@ do_unwind_create_frame (Lisp_Object frame)
   unwind_create_frame (frame);
 }
 
-static void
+void
 x_default_font_parameter (struct frame *f, Lisp_Object parms)
 {
   struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
diff --git a/src/xterm.c b/src/xterm.c
index 21d99f0c7b..2ba3c00940 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -13374,7 +13374,8 @@ x_activate_timeout_atimer (void)
     x_draw_window_divider,
     x_shift_glyphs_for_insert, /* Never called; see comment in function.  */
     x_show_hourglass,
-    x_hide_hourglass
+    x_hide_hourglass,
+    x_default_font_parameter
   };
 
 
diff --git a/src/xterm.h b/src/xterm.h
index 51e75890b6..bc10043c54 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1056,6 +1056,7 @@ #define SELECTION_EVENT_TIME(eventp)	\
                                     int *xptr,
                                     int *yptr,
                                     int *outer_border);
+extern void x_default_font_parameter (struct frame* f, Lisp_Object parms);
 
 /* From xrdb.c.  */
 
-- 
2.25.0.232.gd8437c57fa


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-17 10:16                                 ` Robert Pluim
@ 2020-03-17 15:15                                   ` Eli Zaretskii
  2020-03-17 16:06                                     ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2020-03-17 15:15 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 39865, viniciusjl

> From: Robert Pluim <rpluim@gmail.com>
> Cc: 39865@debbugs.gnu.org,  viniciusjl@gmail.com
> Date: Tue, 17 Mar 2020 11:16:34 +0100
> 
> The following has been compiled and tested on macOS, GNU/Linux, and
> MSWindows. Itʼs against emacs-27, where Iʼd prefer to put it, since
> people might start building that with Cairo enabled, which would make
> this crash more likely, but I can put it in master if you wish.

SGTM, thanks.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#39865: 28.0.50; Emacs crash
  2020-03-17 15:15                                   ` Eli Zaretskii
@ 2020-03-17 16:06                                     ` Robert Pluim
  0 siblings, 0 replies; 27+ messages in thread
From: Robert Pluim @ 2020-03-17 16:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39865-done, viniciusjl

>>>>> On Tue, 17 Mar 2020 17:15:59 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Cc: 39865@debbugs.gnu.org,  viniciusjl@gmail.com
    >> Date: Tue, 17 Mar 2020 11:16:34 +0100
    >> 
    >> The following has been compiled and tested on macOS, GNU/Linux, and
    >> MSWindows. Itʼs against emacs-27, where Iʼd prefer to put it, since
    >> people might start building that with Cairo enabled, which would make
    >> this crash more likely, but I can put it in master if you wish.

    Eli> SGTM, thanks.

Pushed to emacs-27 as 5747a59a88

Closing the bug.





^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2020-03-17 16:06 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-02  1:39 bug#39865: 28.0.50; Emacs crash Vinicius José Latorre
2020-03-02  8:11 ` Eli Zaretskii
2020-03-05  1:03   ` Vinicius José Latorre
2020-03-05 22:21     ` Vinicius José Latorre
2020-03-06  7:18       ` Eli Zaretskii
2020-03-06 17:20         ` Vinicius José Latorre
2020-03-06 17:24           ` Vinicius José Latorre
2020-03-06 17:53           ` Eli Zaretskii
2020-03-10 14:29             ` Robert Pluim
2020-03-10 14:52               ` Eli Zaretskii
2020-03-10 14:54                 ` Vinicius José Latorre
2020-03-10 15:20                   ` Robert Pluim
2020-03-10 19:03                     ` Vinicius José Latorre
2020-03-11  7:33                       ` Robert Pluim
2020-03-11 20:45                         ` Vinicius José Latorre
2020-03-12  9:39                           ` Robert Pluim
2020-03-10 15:15                 ` Robert Pluim
2020-03-11 16:58                   ` Eli Zaretskii
2020-03-12  9:33                     ` Robert Pluim
2020-03-12 10:25                       ` Robert Pluim
2020-03-13  0:44                         ` Vinicius José Latorre
2020-03-13  9:35                           ` Robert Pluim
2020-03-13 14:09                             ` Eli Zaretskii
2020-03-13 15:09                               ` Robert Pluim
2020-03-17 10:16                                 ` Robert Pluim
2020-03-17 15:15                                   ` Eli Zaretskii
2020-03-17 16:06                                     ` Robert Pluim

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).