Discussion:
Crash on master
Ben Boeckel
2015-02-09 03:31:15 UTC
Permalink
Hi,

With commit df6488a47088ec8bcddc6a1cfa85fec1a462c789, I experienced a
crash that I haven't been able to reproduce (yet). The setup (as close
as I can remember):

- days-old session; up to session 23 by the command in the backtrace;
- client attached to a session with window id 398 as the last window;
- wanting to bring that window to the main session I'm using (over
SSH), `tmux movew -s @398 -t 23:3`;
- tmux crashes with the backtrace below.

I can dig into the backtrace and get other info if needed.

Backtrace:

http://paste.fedoraproject.org/183140/42345264

Thanks,

--Ben
Nicholas Marriott
2015-02-09 12:37:26 UTC
Permalink
Hmm. The windows list can contain NULL, so window_find_by_id is probably
wrong here, but I'm not sure how you got to that codepath in the first
place. Clearly it is possible though.

(I think what you were trying would not work at the moment, we should
probably make cmd_lookup_window pass @foo through cmd_window_session if
it isn't in the current session...)


diff --git a/window.c b/window.c
index 5412963..8894625 100644
--- a/window.c
+++ b/window.c
@@ -262,7 +262,7 @@ window_find_by_id(u_int id)

for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
w = ARRAY_ITEM(&windows, i);
- if (w->id == id)
+ if (w != NULL && w->id == id)
return (w);
}
return (NULL);
Post by Ben Boeckel
Hi,
With commit df6488a47088ec8bcddc6a1cfa85fec1a462c789, I experienced a
crash that I haven't been able to reproduce (yet). The setup (as close
- days-old session; up to session 23 by the command in the backtrace;
- client attached to a session with window id 398 as the last window;
- wanting to bring that window to the main session I'm using (over
- tmux crashes with the backtrace below.
I can dig into the backtrace and get other info if needed.
http://paste.fedoraproject.org/183140/42345264
Thanks,
--Ben
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Ben Boeckel
2015-02-09 15:39:33 UTC
Permalink
Post by Nicholas Marriott
(I think what you were trying would not work at the moment, we should
it isn't in the current session...)
Hmm. It *does* work, but it also hasn't crashed since. At least it seems
to work...

--Ben
Nicholas Marriott
2015-02-09 15:53:59 UTC
Permalink
Hmm weird it doesn't work for me, oh well...
Post by Ben Boeckel
Post by Nicholas Marriott
(I think what you were trying would not work at the moment, we should
it isn't in the current session...)
Hmm. It *does* work, but it also hasn't crashed since. At least it seems
to work...
--Ben
Ben Boeckel
2015-02-09 15:55:50 UTC
Permalink
Post by Nicholas Marriott
Hmm weird it doesn't work for me, oh well...
Maybe because my test case was:

tmux

# in another terminal
tmux
tmux movew -s @0 -t 1:1

and it just grabbed *session* 0 instead?

--Ben
Nicholas Marriott
2015-02-09 16:09:13 UTC
Permalink
Yes it will use @0 from session 0, if you try to move from another
session to the current one using the window id, it will fail.
Post by Ben Boeckel
Post by Nicholas Marriott
Hmm weird it doesn't work for me, oh well...
tmux
# in another terminal
tmux
and it just grabbed *session* 0 instead?
--Ben
Loading...