Subject: bug#62402: 30.0.50; Emacs crashes on popup menu selection

From: Ruijie Yu <[email-masked]>
Date: Thu, 23 Mar 2023 16:56:20 +0800

Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email-masked]> writes:

> [...]
> Trying to isolate the issue, I came up with the following minimal
> example:
>
> 1. emacs -Q
> 2. evaluate the following form to create a popup menu:
>     (x-popup-menu `((0 0) ,(get-buffer-window))
>                   '(keymap (Bar menu-item "Bar" ignore :key-sequence nil)
>                            (Baz menu-item "Baz" ignore :key-sequence nil)))
> 3. select an option from the menu
> 4. Emacs crashes with the following backtrace:
>
> [...]
>
> Thanks,
> Eshel
>
> In GNU Emacs 30.0.50 (build 25, x86_64-apple-darwin22.3.0, NS
>  appkit-2299.40 Version 13.2.1 (Build 22D68)) of 2023-03-21 built on
>  esmac.local
> Repository revision: 42fba8f36b19536964d6deb6a34f3fd1c02b43dd
> Repository branch: master
> Windowing system distributor 'Apple', version 10.3.2299
> System Description:  macOS 13.2.1
>
> Configured using:
>  'configure --with-native-compilation --with-json --with-tree-sitter'
>
> Configured features:
> ACL DBUS GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
> NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF
> TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB
>

FTR, I cannot reproduce this issue on PGTK GNU/Linux with 30.0.50
(c6bfffa9fe1af7f4f806e5533ba5f3c33476cf9a), so this issue might be OS-
or WM-specific.

--
Best,

RY