[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23875: 25.0.95; Emacs crashes when closing a frame on OSX
From: |
Ivan Cibrario Bertolotti |
Subject: |
bug#23875: 25.0.95; Emacs crashes when closing a frame on OSX |
Date: |
Thu, 30 Jun 2016 21:34:04 +0200 |
Hello Alan,
first of all, thank you so much for your help.
> On 30 Jun 2016, at 20:50, Alan Third <alan@idiocy.org> wrote:
>
> Ivan Cibrario Bertolotti <ivan.cibrario@polito.it> writes:
>
>> Emacs occasionally crashes with a segmentation fault when deleting a
>> frame on OSX. The crash occurs with low probability, I am sorry I
>> cannot provide a detailed recipe to reproduce it at the moment.
>
> Can you provide any information about what you're doing when it crashes?
> Are you just closing a frame with C-x 5 0?
Sorry, I forgot to mention. Yes, that’s it. It seems that the way the frame
was created (C-x 5 2, C-x 5 f, or emacsclient) does not make any difference.
On the other hand (but this is just a wild guess given the low probability of
the crash) it seems that having another frame in full-screen mode makes the
crash more likely. In this case, emacs switches from windowed to full-screen
mode when the frame is closed.
>> Looking at the crash report (at the bottom of this email) it seems to me
>> that an EmacsImage is being deallocated by autorelease after it has
>> already been freed, thus causing a NULL pointer dereference.
>>
>> Might this be another case of omitted bracketing with
>> block_input()/unblock_input(), like in bug #23462?
>
> It could be, but I don't think so. That one happened when the event
> handler fired *within* the iconify function. I don't see anything in the
> stack trace that looks like that.
That’s right, I stand corrected.
>> I am now running Emacs with NSTRACE_ENABLED. If you have any better
>> idea on how to gather more information, please let me know. I am
>> willing to help.
>
> I'm not sure how to go about debugging this stuff, but NSZombiesEnabled
> seems to be the way:
>
> $ NSZombiesEnabled=YES /path/to/emacs.app/Contents/MacOS/Emacs
>
> this should print out a message when an object is deallocated too many
> times, instead of just crashing.
> --
> Alan Third
I understand, it looks nasty indeed and it happens on average only once a day.
Thank you for the hint. I will keep using Emacs with NSTRACE_ENABLED and
NSZombiesEnabled=YES. Will get back as soon as I have more substantial
information.
Thanks again,
Ivan