emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird behavior and crash with X and TTY frame


From: Jan Djärv
Subject: Re: Weird behavior and crash with X and TTY frame
Date: Sun, 7 Apr 2013 14:06:46 +0200

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 <address@hidden>:

> On r112235 configured with --with-x-toolkit=gtk3 --enable-checking:
> 
> 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:
> 
> [1]+  Stopped                 ./src/emacs -Q -nw
> 
> 6. At shell prompt, resume Emacs with %1. Response is:
> 
> ./src/emacs -Q -nw
> Auto-save? (y or n) [answer y]
> Auto-save done
> Abort (and dump core)? (y or n) [answer y]
> 
> ==> crash:
> 
> #0  0x0000003daf40eedb in raise (address@hidden) at 
> ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:41
> #1  0x000000000051da46 in terminate_due_to_signal (address@hidden, 
> address@hidden)
>    at src/emacs.c:343
> #2  0x000000000053d583 in emacs_abort () at src/sysdep.c:2148
> #3  0x00000000005206f9 in handle_interrupt (in_signal_handler=<optimized out>)
>    at src/keyboard.c:10389
> #4  0x000000000053d215 in deliver_process_signal (sig=2, handler=0x520700 
> <handle_interrupt_signal>)
>    at src/sysdep.c:1591
> #5  <signal handler called>
> #6  0x0000003dae8eb889 in __pselect (address@hidden, address@hidden, 
> address@hidden,
>    address@hidden, timeout=<optimized out>, address@hidden, address@hidden)
>    at ../sysdeps/unix/sysv/linux/pselect.c:78
> #7  0x000000000050bc5b in xg_select (fds_lim=8, rfds=0x7fffcf24d6f0, 
> wfds=0x0, efds=0x0, timeout=0x0, sigmask=0x0)
>    at src/xgselect.c:48
> #8  0x0000000000479d88 in x_menu_wait_for_event (data=<optimized out>) at 
> src/xmenu.c:407
> #9  popup_widget_loop (widget=<optimized out>, do_timers=<optimized out>) at 
> src/xmenu.c:606
> #10 0x000000000047a2f3 in create_and_show_dialog (first_wv=<optimized out>, 
> f=0x12cf948)
>    at src/xmenu.c:1934
> #11 xdialog_show (keymaps=false, error_name=<synthetic pointer>, header=..., 
> f=0x12cf948, title=...)
>    at src/xmenu.c:2142
> #12 Fx_popup_dialog (position=..., contents=..., header=...) at 
> src/xmenu.c:329
> #13 0x00000000005a87fe in eval_sub (form=..., address@hidden) at 
> src/eval.c:2045
> #14 0x00000000005ac3b2 in Feval (form=..., lexical=...) at src/eval.c:1901
> #15 0x00000000005a95e6 in Ffuncall (nargs=<optimized out>, args=<optimized 
> out>) at src/eval.c:2677
> #16 0x00000000005ef203 in exec_byte_code (bytestr=..., vector=..., 
> maxdepth=..., args_template=..., nargs=140736668686848, args=
>    0x7fffcf24d110, address@hidden) at src/bytecode.c:900
> #17 0x00000000005a8e79 in funcall_lambda (fun=..., address@hidden, 
> address@hidden)
>    at src/eval.c:2840
> #18 0x00000000005a941b in Ffuncall (address@hidden, args=0x7fffcf24db90) at 
> src/eval.c:2735
> #19 0x00000000005aac3b in Fapply (address@hidden, address@hidden)
>    at src/eval.c:2208
> #20 0x00000000005aadae in apply1 (fn=..., arg=..., address@hidden) at 
> src/eval.c:2442
> #21 0x00000000005a4fe2 in Fcall_interactively (function=..., record_flag=..., 
> keys=...)
>    at src/callint.c:377
> #22 0x00000000005a95d5 in Ffuncall (nargs=<optimized out>, args=<optimized 
> out>) at src/eval.c:2681
> #23 0x00000000005ef203 in exec_byte_code (bytestr=..., vector=..., 
> maxdepth=..., args_template=..., nargs=140736668687872, args=
>    0x7fffcf24d110, address@hidden) at src/bytecode.c:900
> #24 0x00000000005a8e79 in funcall_lambda (fun=..., address@hidden, 
> address@hidden)
>    at src/eval.c:2840
> #25 0x00000000005a941b in Ffuncall (address@hidden, address@hidden)
>    at src/eval.c:2735
> #26 0x00000000005a974a in call1 (fn=..., arg1=...) at src/eval.c:2468
> #27 0x0000000000530a1c in command_loop_1 () at src/keyboard.c:1578
> #28 0x00000000005a7603 in internal_condition_case (address@hidden 
> <command_loop_1>, handlers=..., address@hidden
>    0x523e60 <cmd_error>) at src/eval.c:1193
> #29 0x000000000051dd0e in command_loop_2 (ignore=..., address@hidden) at 
> src/keyboard.c:1167
> #30 0x00000000005a74de in internal_catch (tag=..., address@hidden 
> <command_loop_2>, arg=...)
>    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=<optimized out>, argv=0x7fffcf24e5d8) at 
> src/emacs.c:1531
> 
> Dmitry




reply via email to

[Prev in Thread] Current Thread [Next in Thread]