[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Killing a frame sometimes kills emacs
From: |
Tassilo Horn |
Subject: |
Re: Killing a frame sometimes kills emacs |
Date: |
Thu, 17 Nov 2011 11:10:13 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
Hi Stefan,
>> I commente 3 lines as indicated below:
>
>> --8<---------------cut here---------------start------------->8---
>> /* If needed, delete the terminal that this frame was on.
>> (This must be done after the frame is killed.) */
>> terminal->reference_count--;
>> if (terminal->reference_count == 0)
>> {
>> // Lisp_Object tmp;
>> // XSETTERMINAL (tmp, terminal);
>
>> kb = NULL;
>> // Fdelete_terminal (tmp, NILP (force) ? Qt : force);
>> }
>> else
>> kb = terminal->kboard;
>> --8<---------------cut here---------------end--------------->8---
>
>> I'm not sure if keeping the "kb = NULL;" was correct, though. If you
>> want, I can try again with the complete then block commented.
>
> I'd suggest to only comment out the "terminal->reference_count--;".
I did that by using the patch below for about one month. Since then,
the crashes I had are gone, and working with multiple emacs X frames is
fun again. Should I go ahead and commit?
--8<---------------cut here---------------start------------->8---
=== modified file 'src/frame.c'
--- src/frame.c 2011-11-17 09:09:20 +0000
+++ src/frame.c 2011-11-17 10:05:11 +0000
@@ -1358,7 +1358,11 @@
/* If needed, delete the terminal that this frame was on.
(This must be done after the frame is killed.) */
- terminal->reference_count--;
+
+ // FIXME: Deleting the terminal crashes emacs because of a GTK
+ // bug. See the thread starting with <address@hidden>
+ // on emacs-devel.
+ // terminal->reference_count--;
if (terminal->reference_count == 0)
{
Lisp_Object tmp;
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
--
(What the world needs (I think) is not
(a Lisp (with fewer parentheses))
but (an English (with more.)))
Brian Hayes, http://tinyurl.com/3y9l2kf