Subject: Re: bug#12698: 24.2.50; crash on OSX when accessing top menu with mouse

From: Eli Zaretskii <[email-masked]>
Date: Thu, 01 Nov 2012 16:32:01 +0200

> Date: Thu, 1 Nov 2012 23:16:36 +0900
> From: Ragga Muffin <[email-masked]>
> Cc: [email-masked]
> 
> Unfortunately I still get a crash.
> Here's a new stack trace, with debug symbols. Hope this helps.

Looks like ns_select is called recursively:

> #6  0x0000000100180c87 in emacs_abort () at sysdep.c:2133
> #7  0x00000001002fc2f2 in ns_select (nfds=9, readfds=0x7fff5fbeab10, writefds=0x0, exceptfds=0x0, timeout=0x7fff5fbeaa68, sigmask=0x0) at nsterm.m:3512
> #8  0x00000001002a375f in wait_reading_process_output (time_limit=1, nsecs=0, read_kbd=0, do_display=false, wait_for_cell=4328534074, wait_proc=0x1029b53e0, just_wait_proc=1) at process.c:4635
> #9  0x00000001002a1de9 in Faccept_process_output (process=4338701285, seconds=4, millisec=4328534074, just_this_one=4328534122) at process.c:4025
> [...]
> #95 0x00000001002fc316 in ns_select (nfds=9, readfds=0x7fff5fbfe0e0, writefds=0x7fff5fbfe060, exceptfds=0x0, timeout=0x7fff5fbfe038, sigmask=0x0) at nsterm.m:3514
> #96 0x00000001002a375f in wait_reading_process_output (time_limit=28, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=4328534074, wait_proc=0x0, just_wait_proc=0) at process.c:4635

Can it handle that?

AFAIU, the second call is because updating the menu bar reads output
of some subprocess.  Does that make sense?