Does this fix it? Index: window.c =================================================================== RCS file: /cvs/src/usr.bin/tmux/window.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -p -r1.58 -r1.59 --- window.c 23 Oct 2010 13:04:34 -0000 1.58 +++ window.c 14 Nov 2010 08:58:25 -0000 1.59 @@ -325,6 +325,8 @@ window_resize(struct window *w, u_int sx void window_set_active_pane(struct window *w, struct window_pane *wp) { + if (wp == w->active) + return; w->last = w->active; w->active = wp; while (!window_pane_visible(w->active)) { @@ -342,7 +344,7 @@ window_set_active_at(struct window *w, u struct window_pane *wp; TAILQ_FOREACH(wp, &w->panes, entry) { - if (!window_pane_visible(wp)) + if (wp == w->active || !window_pane_visible(wp)) continue; if (x < wp->xoff || x >= wp->xoff + wp->sx) continue;
On Sun, Nov 21, 2010 at 04:14:21PM +0000, Thomas Adam wrote: > On Sun, Nov 21, 2010 at 03:32:08PM +0000, Nicholas Marriott wrote: > > tmux version? > > > > what platform? > > It seems I can always reproduce this -- at least to get a stack trace > identical to the one reported. > > This is tmux cvs HEAD (as of today) on Linux (Debian Unstable). > > If I start tmux like this: > > $ tmux -Lrandom -f /dev/null > > ... and then immediately start to split the window, creating random > horizontal/vertical splits -- do it a few times until you get four of five. > > Then turn on "mouse-select-pane": > > :set mouse-select-pane > > ... then click to any random pane with the mouse to make it active, and > press: > > ^d > > ... to close the pane. I immediately then get a "[lost server]" error, and > a coredump. Here's the results: > > (gdb) bt > #0 0x080839fc in window_pane_visible (wp=0x9011570) at window.c:836 > #1 0x0806d3cc in server_client_reset_state (c=0x8ff2680) > at server-client.c:448 > #2 0x0806d2c2 in server_client_loop () at server-client.c:408 > #3 0x0807010c in server_loop () at server.c:213 > #4 0x080700e2 in server_start () at server.c:201 > #5 0x0804ae83 in client_connect (path=0x80ab620 "/tmp//tmux-1001/main356", > start_server=1) at client.c:79 > #6 0x0804b07c in client_main (argc=0, argv=0xbfbd1390, flags=1) > at client.c:153 > #7 0x080770f4 in main (argc=0, argv=0xbfbd1390) at tmux.c:495 > > Doing some digging: > > (gdb) p wp->xoff > $2 = 1963065346 > (gdb) p w->sx > Cannot access memory at address 0x2000264 > (gdb) p w > $3 = (struct window *) 0x2000200 > (gdb) p *w > Cannot access memory at address 0x2000200 > > What's up with the struct window * here? > > Also -- things get a little more interesting... > > If I repeat the above steps, but this time keep splitting a window down so I > get a really tiny pane, and type "ls" (so that wp->fd > -1) -- and then > close it -- again with "^d", tmux goes round in an infinite loop, with the > title of the window. This is due to automatic-rename for sure -- the title > of the window goes through endless loops of: > > 0:z [dead] > 0:X [dead] > > ... over and over. There's always a random character before [dead] -- no > tmux crash, but it does look like (through stracing it) it's caught around > here: > > names.c:window_name_callback(): > > if (w->active->cmd != NULL && *w->active->cmd == '\0' && > name != NULL && name[0] == '-' && name[1] != '\0') > wname = parse_window_name(name + 1); > > I'm having problems tracking this down to be honest. > > HTH, > > -- Thomas Adam > > -- > "Deep in my heart I wish I was wrong. But deep in my heart I know I am > not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.) ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users