From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: Weird behavior and crash with X and TTY frame Date: Sun, 7 Apr 2013 14:06:46 +0200 Message-ID: References: <51601D0E.4050507@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1365336418 13595 80.91.229.3 (7 Apr 2013 12:06:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Apr 2013 12:06:58 +0000 (UTC) Cc: Emacs development discussions To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 07 14:07:02 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UOoNB-0008Rg-2T for ged-emacs-devel@m.gmane.org; Sun, 07 Apr 2013 14:07:01 +0200 Original-Received: from localhost ([::1]:34607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOoNA-0002ay-HK for ged-emacs-devel@m.gmane.org; Sun, 07 Apr 2013 08:07:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOoN6-0002Zs-Jj for emacs-devel@gnu.org; Sun, 07 Apr 2013 08:06:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOoN4-0000fk-WC for emacs-devel@gnu.org; Sun, 07 Apr 2013 08:06:56 -0400 Original-Received: from mailout.melmac.se ([62.20.26.67]:37452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOoN4-0000Wm-Ko for emacs-devel@gnu.org; Sun, 07 Apr 2013 08:06:54 -0400 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id CE5A2C864 for ; Sun, 7 Apr 2013 14:06:47 +0200 (CEST) Original-Received: (qmail 15621 invoked by uid 89); 7 Apr 2013 12:06:19 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 7 Apr 2013 12:06:19 -0000 Original-Received: from anon-62-44.vpn.ipredator.se (unknown [46.246.62.44]) by coolsville.localdomain (Postfix) with ESMTPSA id 3C9137FA058; Sun, 7 Apr 2013 14:06:47 +0200 (CEST) In-Reply-To: <51601D0E.4050507@yandex.ru> X-Mailer: Apple Mail (2.1503) X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 62.20.26.67 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158748 Archived-At: Hello. This is something Emacs can't handle. It is because how the lisp and = event loop interracts. When you do (x-popup-dialog t '("Test" ("yes" . 1))), a Lisp return = value is expected back to the Lisp code. So Emacs does not execute any = more Lisp, until the dialog is popped down. The popup is shown by a loop that just processes X events = (x_menu_wait_for_event). When you switch frame and do C-g C-g, the "normal" stuff does not = happen, because Lisp is not executed. This would be solvable if we had an independent Lisp loop per terminal, = but it is not so. There is only one Lisp loop, shared by all frames/terminals, and if one = frame/terminal suspends the loop, it is suspended for all = frames/terminals. Jan D. 6 apr 2013 kl. 15:03 skrev Dmitry Antipov : > On r112235 configured with --with-x-toolkit=3Dgtk3 --enable-checking: >=20 > 1. ./src/emacs -Q -nw > 2. M-x make-frame-on-display :0.0 > 3. On X frame, eval: (x-popup-dialog t '("Test" ("yes" . 1))) > 4. Do not touch popup, but go back to TTY frame and press C-g C-g. > 5. Shell responds with: >=20 > [1]+ Stopped ./src/emacs -Q -nw >=20 > 6. At shell prompt, resume Emacs with %1. Response is: >=20 > ./src/emacs -Q -nw > Auto-save? (y or n) [answer y] > Auto-save done > Abort (and dump core)? (y or n) [answer y] >=20 > =3D=3D> crash: >=20 > #0 0x0000003daf40eedb in raise (sig=3Dsig@entry=3D6) at = ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:41 > #1 0x000000000051da46 in terminate_due_to_signal (sig=3Dsig@entry=3D6, = backtrace_limit=3Dbacktrace_limit@entry=3D40) > at src/emacs.c:343 > #2 0x000000000053d583 in emacs_abort () at src/sysdep.c:2148 > #3 0x00000000005206f9 in handle_interrupt = (in_signal_handler=3D) > at src/keyboard.c:10389 > #4 0x000000000053d215 in deliver_process_signal (sig=3D2, = handler=3D0x520700 ) > at src/sysdep.c:1591 > #5 > #6 0x0000003dae8eb889 in __pselect (nfds=3Dnfds@entry=3D8, = readfds=3Dreadfds@entry=3D0x7fffcf24d6f0, writefds=3Dwritefds@entry=3D0x0,= > exceptfds=3Dexceptfds@entry=3D0x0, timeout=3D, = timeout@entry=3D0x0, sigmask=3Dsigmask@entry=3D0x0) > at ../sysdeps/unix/sysv/linux/pselect.c:78 > #7 0x000000000050bc5b in xg_select (fds_lim=3D8, rfds=3D0x7fffcf24d6f0,= wfds=3D0x0, efds=3D0x0, timeout=3D0x0, sigmask=3D0x0) > at src/xgselect.c:48 > #8 0x0000000000479d88 in x_menu_wait_for_event (data=3D) at src/xmenu.c:407 > #9 popup_widget_loop (widget=3D, do_timers=3D) at src/xmenu.c:606 > #10 0x000000000047a2f3 in create_and_show_dialog (first_wv=3D, f=3D0x12cf948) > at src/xmenu.c:1934 > #11 xdialog_show (keymaps=3Dfalse, error_name=3D, = header=3D..., f=3D0x12cf948, title=3D...) > at src/xmenu.c:2142 > #12 Fx_popup_dialog (position=3D..., contents=3D..., header=3D...) at = src/xmenu.c:329 > #13 0x00000000005a87fe in eval_sub (form=3D..., form@entry=3D...) at = src/eval.c:2045 > #14 0x00000000005ac3b2 in Feval (form=3D..., lexical=3D...) at = src/eval.c:1901 > #15 0x00000000005a95e6 in Ffuncall (nargs=3D, = args=3D) at src/eval.c:2677 > #16 0x00000000005ef203 in exec_byte_code (bytestr=3D..., vector=3D..., = maxdepth=3D..., args_template=3D..., nargs=3D140736668686848, args=3D > 0x7fffcf24d110, args@entry=3D0x7fffcf24db98) at src/bytecode.c:900 > #17 0x00000000005a8e79 in funcall_lambda (fun=3D..., = nargs=3Dnargs@entry=3D2, arg_vector=3Darg_vector@entry=3D0x7fffcf24db98) > at src/eval.c:2840 > #18 0x00000000005a941b in Ffuncall (nargs=3Dnargs@entry=3D3, = args=3D0x7fffcf24db90) at src/eval.c:2735 > #19 0x00000000005aac3b in Fapply (nargs=3Dnargs@entry=3D2, = args=3Dargs@entry=3D0x7fffcf24dc40) > at src/eval.c:2208 > #20 0x00000000005aadae in apply1 (fn=3D..., arg=3D..., arg@entry=3D...) = at src/eval.c:2442 > #21 0x00000000005a4fe2 in Fcall_interactively (function=3D..., = record_flag=3D..., keys=3D...) > at src/callint.c:377 > #22 0x00000000005a95d5 in Ffuncall (nargs=3D, = args=3D) at src/eval.c:2681 > #23 0x00000000005ef203 in exec_byte_code (bytestr=3D..., vector=3D..., = maxdepth=3D..., args_template=3D..., nargs=3D140736668687872, args=3D > 0x7fffcf24d110, args@entry=3D0x7fffcf24dfb8) at src/bytecode.c:900 > #24 0x00000000005a8e79 in funcall_lambda (fun=3D..., = nargs=3Dnargs@entry=3D1, arg_vector=3Darg_vector@entry=3D0x7fffcf24dfb8) > at src/eval.c:2840 > #25 0x00000000005a941b in Ffuncall (nargs=3Dnargs@entry=3D2, = args=3Dargs@entry=3D0x7fffcf24dfb0) > at src/eval.c:2735 > #26 0x00000000005a974a in call1 (fn=3D..., arg1=3D...) at = src/eval.c:2468 > #27 0x0000000000530a1c in command_loop_1 () at src/keyboard.c:1578 > #28 0x00000000005a7603 in internal_condition_case = (bfun=3Dbfun@entry=3D0x530580 , handlers=3D..., = hfun=3Dhfun@entry=3D > 0x523e60 ) at src/eval.c:1193 > #29 0x000000000051dd0e in command_loop_2 (ignore=3D..., = ignore@entry=3D...) at src/keyboard.c:1167 > #30 0x00000000005a74de in internal_catch (tag=3D..., = func=3Dfunc@entry=3D0x51dcf0 , arg=3D...) > at src/eval.c:964 > #31 0x000000000052380e in command_loop () at src/keyboard.c:1146 > #32 recursive_edit_1 () at src/keyboard.c:779 > #33 0x0000000000523b8e in Frecursive_edit () at src/keyboard.c:843 > #34 0x000000000041a2a5 in main (argc=3D, = argv=3D0x7fffcf24e5d8) at src/emacs.c:1531 >=20 > Dmitry