unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.60; restarting X causes emacsclient display bugs
@ 2008-02-02 20:30 Tom Rauchenwald
  2008-02-03 14:12 ` Dan Nicolaescu
  2008-02-11  0:18 ` Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Tom Rauchenwald @ 2008-02-02 20:30 UTC (permalink / raw)
  To: emacs-pretest-bug

Hi,

I try running emacs inside screen, and open frames to it with emacsclient.
This works fine, until I need to restart the X server for whatever
reason. newly created X frames don't update properly when scrolling
(part of the text stays), the mode-line faces are not right
(background is black) and the modeline isn't cleared before it
updates, so after switching a few buffers only garbage is in it.

To reproduce:
1) start emacs in a detached screen
screen -dmS emacsserver emacs -nw -Q --eval '(setq server-name "foo")'
-f server-start
2) open an X frame
emacsclient -s foo -c -d :0
3) close the X frame and restart X
4) open an X frame (the first try always fails for me, so you may need
to do it twice
emacsclient -s foo -c -d :0 

This frame shows various redisplay problems, for example when browsing
through a buffer with C-n (here only half of the screen is updated,
but it seems to be connected to scoll-conservatively).
Note that tty frames (emacsclient -t) work fine. 

Can anyone reproduce this? What other information do you need?

Thanks,
Tom


In GNU Emacs 23.0.60.3 (i686-pc-linux-gnu, GTK+ Version 2.12.7)
 of 2008-02-02 on walter
configured using `configure  '--with-gtk' '--enable-font-backend' '--with-xft' '--with-dbus''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
C-x 5 0 <down> <down> <up> <up> C-x b <return> C-x 
C-f . e m a <tab> <return> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
C-x C-c <return> <return> <return> <return> <return> 
<return> C-h k C-x C-c C-x C-c RET C-x b m e s s TAB 
DEL DEL DEL DEL DEL ESC x r e p o TAB r TAB RET

Recent messages:
("emacs" "-Q" "--eval" "(setq server-name \"foo\")" "-f" "server-start")
For information about GNU Emacs and the GNU system, type C-h C-a.
When done with this frame, type C-x 5 0 [2 times]
(No files need saving)
When done with this frame, type C-x 5 0
Type C-x 1 to delete the help window.
(No files need saving)
call-interactively: Text is read-only
Quit
Making completion list...




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

* Re: 23.0.60; restarting X causes emacsclient display bugs
  2008-02-02 20:30 23.0.60; restarting X causes emacsclient display bugs Tom Rauchenwald
@ 2008-02-03 14:12 ` Dan Nicolaescu
  2008-02-03 21:42   ` Tom Rauchenwald
  2008-02-11  0:18 ` Richard Stallman
  1 sibling, 1 reply; 5+ messages in thread
From: Dan Nicolaescu @ 2008-02-03 14:12 UTC (permalink / raw)
  To: Tom Rauchenwald; +Cc: emacs-pretest-bug

Tom Rauchenwald <everybodyhatesatourist@gmail.com> writes:

  > Hi,
  > 
  > I try running emacs inside screen, and open frames to it with emacsclient.
  > This works fine, until I need to restart the X server for whatever
  > reason. newly created X frames don't update properly when scrolling
  > (part of the text stays), the mode-line faces are not right
  > (background is black) and the modeline isn't cleared before it
  > updates, so after switching a few buffers only garbage is in it.
  > 
  > To reproduce:
  > 1) start emacs in a detached screen
  > screen -dmS emacsserver emacs -nw -Q --eval '(setq server-name "foo")'
  > -f server-start
  > 2) open an X frame
  > emacsclient -s foo -c -d :0
  > 3) close the X frame and restart X
  > 4) open an X frame (the first try always fails for me, so you may need
  > to do it twice
  > emacsclient -s foo -c -d :0 
  > 
  > This frame shows various redisplay problems, for example when browsing
  > through a buffer with C-n (here only half of the screen is updated,
  > but it seems to be connected to scoll-conservatively).
  > Note that tty frames (emacsclient -t) work fine. 
  > 
  > Can anyone reproduce this? What other information do you need?

Thank you. Here's a simpler way to reproduce this:

emacs -Q -nw -f server-start
from another xterm:
emacsclient -c -d :0

from yet another xterm:

xkill

and click on the X11 frame created by emacsclient


(gdb) bt
#0  internal_condition_case_2 (bfun=0x81699d0 <Frun_hook_with_args>, nargs=2, 
    args=0xbfba9384, handlers=137657705, hfun=0x805d5d0 <delete_frame_handler>)
    at /home/dann/emacs/src/eval.c:1568
#1  0x0805def1 in Fdelete_frame (frame=146496652, force=137657705)
    at /home/dann/emacs/src/frame.c:1412
#2  0x080d8fb1 in x_connection_closed (dpy=0x858e9c8, 
    error_message=<value optimized out>)
    at /home/dann/emacs/src/xterm.c:8054
#3  0x080d906b in x_io_error_quitter (display=0x858e9c8)
    at /home/dann/emacs/src/xterm.c:8202
#4  0x00826fc2 in _XIOError () from /usr/lib/libX11.so.6
#5  0x0082dbb9 in ?? () from /usr/lib/libX11.so.6
#6  0x0082df9f in _XEventsQueued () from /usr/lib/libX11.so.6
#7  0x008176d2 in XPending () from /usr/lib/libX11.so.6
#8  0x080d90fe in XTread_socket (terminal=0x85d3898, expected=1, hold_quit=0xbfba9c64)
    at /home/dann/emacs/src/xterm.c:7366
#9  0x08105adf in read_avail_input (expected=1)
    at /home/dann/emacs/src/keyboard.c:7110
#10 0x08105c0a in handle_async_input ()
    at /home/dann/emacs/src/keyboard.c:7340
#11 0x08105dd1 in input_available_signal (signo=29)
    at /home/dann/emacs/src/keyboard.c:7382
#12 <signal handler called>
#13 0x00110402 in __kernel_vsyscall ()
#14 0x00cbb5bd in ___newselect_nocancel () from /lib/libc.so.6
#15 0x08195325 in select_wrapper (n=1, rfd=0x0, wfd=0xbfbaa1e8, xfd=0x0, tmo=0xbfbaa318)
    at /home/dann/emacs/src/process.c:4240
#16 0x08198530 in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, 
    do_display=1, wait_for_cell=137657657, wait_proc=0x0, just_wait_proc=0)
    at /home/dann/emacs/src/process.c:4610
#17 0x08052ce0 in sit_for (timeout=240, reading=1, do_display=1)
    at /home/dann/emacs/src/dispnew.c:6608
#18 0x0810af8d in read_char (commandflag=1, nmaps=2, maps=0xbfbaa5f0, 
    prev_event=137657657, used_mouse_menu=0xbfbaa698, end_time=0x0)
    at /home/dann/emacs/src/keyboard.c:2969
#19 0x0810ceca in read_key_sequence (keybuf=0xbfbaa734, bufsize=30, prompt=137657657, 
    dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1)
    at /home/dann/emacs/src/keyboard.c:9460
#20 0x0810ed63 in command_loop_1 ()
    at /home/dann/emacs/src/keyboard.c:1655
#21 0x08166ed2 in internal_condition_case (bfun=0x810ebc0 <command_loop_1>, 
    handlers=137701849, hfun=0x8109140 <cmd_error>)
    at /home/dann/emacs/src/eval.c:1494
#22 0x081085b3 in command_loop_2 ()
    at /home/dann/emacs/src/keyboard.c:1370
#23 0x08166f8a in internal_catch (tag=137696697, func=0x8108590 <command_loop_2>, 
    arg=137657657) at /home/dann/emacs/src/eval.c:1230
#24 0x08108fa7 in command_loop ()
    at /home/dann/emacs/src/keyboard.c:1349
#25 0x0810930a in recursive_edit_1 ()
    at /home/dann/emacs/src/keyboard.c:958
#26 0x08109441 in Frecursive_edit ()
    at /home/dann/emacs/src/keyboard.c:1020
#27 0x080feb87 in main (argc=3, argv=0xbfbaae34)
    at /home/dann/emacs/src/emacs.c:1793


The abort is because of this code in internal_condition_case_2:

#if HAVE_X_WINDOWS
  if (x_catching_errors ())
    abort ();
#endif


x_connection_closed does an:

  x_catch_errors (dpy);

but the condition that x_catching_errors looks for is different.

Can someone that knows this code please look at this?




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

* Re: 23.0.60; restarting X causes emacsclient display bugs
  2008-02-03 14:12 ` Dan Nicolaescu
@ 2008-02-03 21:42   ` Tom Rauchenwald
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Rauchenwald @ 2008-02-03 21:42 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-pretest-bug, Tom Rauchenwald

Dan Nicolaescu <dann@ics.uci.edu> writes:

> Thank you. Here's a simpler way to reproduce this:
>
> emacs -Q -nw -f server-start
> from another xterm:
> emacsclient -c -d :0
>
> from yet another xterm:
>
> xkill
>
> and click on the X11 frame created by emacsclient

I think you refer to a different problem. In my case emacs doesn't crash
or close. But the newly created frame doesn't display correctly and is
unusable.

Thanks,
Tom

-- 
Then I drew in a breath, and my renewed will with it, lifted the rod
in my right hand, murmured a phrase in a language I didn't know, and
blew the tires off his fucking truck.
        -- Harry Dresden




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

* Re: 23.0.60; restarting X causes emacsclient display bugs
  2008-02-02 20:30 23.0.60; restarting X causes emacsclient display bugs Tom Rauchenwald
  2008-02-03 14:12 ` Dan Nicolaescu
@ 2008-02-11  0:18 ` Richard Stallman
  2008-02-17  9:32   ` Tom Rauchenwald
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2008-02-11  0:18 UTC (permalink / raw)
  To: Tom Rauchenwald; +Cc: emacs-pretest-bug

    To reproduce:
    1) start emacs in a detached screen
    screen -dmS emacsserver emacs -nw -Q --eval '(setq server-name "foo")'
    -f server-start
    2) open an X frame
    emacsclient -s foo -c -d :0
    3) close the X frame and restart X
    4) open an X frame (the first try always fails for me, so you may need
    to do it twice
    emacsclient -s foo -c -d :0 

Does this still fail for you?




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

* Re: 23.0.60; restarting X causes emacsclient display bugs
  2008-02-11  0:18 ` Richard Stallman
@ 2008-02-17  9:32   ` Tom Rauchenwald
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Rauchenwald @ 2008-02-17  9:32 UTC (permalink / raw)
  To: rms; +Cc: emacs-pretest-bug, Tom Rauchenwald

Richard Stallman <rms@gnu.org> writes:

>     To reproduce:
>     1) start emacs in a detached screen
>     screen -dmS emacsserver emacs -nw -Q --eval '(setq server-name "foo")'
>     -f server-start
>     2) open an X frame
>     emacsclient -s foo -c -d :0
>     3) close the X frame and restart X
>     4) open an X frame (the first try always fails for me, so you may need
>     to do it twice
>     emacsclient -s foo -c -d :0 
>
> Does this still fail for you?

Due to another bug I ran into I couldn't test this until today. 

The problem seems to have gone away. Thanks to everyone involved in
fixing this!

It may be of interest what I intend to do: I want to issue something
like
screen -dmS emacsserver emacs -nw --eval '(setq server-name "emacs")'
\-f server-start
@reboot via cron, and then only open frames with emacsclient when
needed. 

Tom

-- 
Then I drew in a breath, and my renewed will with it, lifted the rod
in my right hand, murmured a phrase in a language I didn't know, and
blew the tires off his fucking truck.
        -- Harry Dresden




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

end of thread, other threads:[~2008-02-17  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-02 20:30 23.0.60; restarting X causes emacsclient display bugs Tom Rauchenwald
2008-02-03 14:12 ` Dan Nicolaescu
2008-02-03 21:42   ` Tom Rauchenwald
2008-02-11  0:18 ` Richard Stallman
2008-02-17  9:32   ` Tom Rauchenwald

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).