unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: martin rudalics <rudalics@gmx.at>, 24692@debbugs.gnu.org
Subject: bug#24692: 25.1; simple, reproducible Emacs 25.1 crash on MS Windows
Date: Fri, 14 Oct 2016 10:51:15 -0700 (PDT)	[thread overview]
Message-ID: <9fc2c8e1-8cc0-499d-a871-949e7871635e@default> (raw)
In-Reply-To: <5801121F.8090404@gmx.at>

> No crash here, just takes some time to execute.  Tested with release and
> master.  The recipe seems contrived.  ‘fit-frame-same-row-windows’ and
> ‘fit-frame-same-column-windows’ are nowhere used, IIUC.  All you do is
> find the number of lines and the maximum number of columns of any line
> of simple.el.  Why on earth should that crash?

The recipe seems "contrived"?  Of course it is contrived.
I narrowed down tons of code to this simple recipe.

And yes, I forgot to finally remove those two functions, when
I had it narrowed down.  As you noted, you can completely
remove them.  This is thus sufficient to crash Emacs 100% of
the time (on my system):

(defun fit-frame (frame)
  (save-window-excursion
    (select-frame frame)
    (let ((win-cons (fit-frame-max-window-size (selected-window))))
      (cons (car win-cons) (cdr win-cons)))))

(defun fit-frame-max-window-size (window)
  (select-window window)
  (let ((max-win-width  0)
        (max-win-height 1))
    (save-excursion
      (set-buffer (window-buffer))
      (goto-char (point-min))
      (while (not (eobp))
        (end-of-line)
        (setq max-win-width  (max (current-column) max-win-width))
        (when (zerop (forward-line 1))
          (setq max-win-height  (1+ max-win-height)))))
    (cons max-win-width max-win-height)))

(setq pop-up-frames  t)
(let ((after-make-frame-functions  ())) (make-frame '((minibuffer . only))))
(add-hook 'after-make-frame-functions 'fit-frame)

As for "Why on earth should that crash?"  Why indeed?  The answer
seems to be "Because Emacs 25" - it does not crash in Emacs 20
through 24.5.

You can use a different command, such as `digit-argument', for
`C-h f', since `prefix-command-preserve-state' does not exist
in previous releases.  (`digit-argument' will also crash Emacs
25.)  Note, BTW, that even though Emacs 24.5 does not crash, it
does take a long time to show `simple.el'.

Note too that the time it takes Emacs 25 to crash, after clicking
`simple.el', seems variable - but it always crashes.  There is
always a period when you see a blank `simple.el' frame, before
the crash, but sometimes the crash comes more quickly than other
times.

This makes me think that the actual crash occurs elsewhere from
where the bug is manifested - e.g. eventually trying to access
an improper memory location.  (Just a hunch, and likely not very
helpful.)





  parent reply	other threads:[~2016-10-14 17:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 16:39 bug#24692: 25.1; simple, reproducible Emacs 25.1 crash on MS Windows Drew Adams
2016-10-14 17:13 ` martin rudalics
2016-10-14 17:26   ` Eli Zaretskii
2016-10-14 17:52     ` martin rudalics
2016-10-14 17:51   ` Drew Adams [this message]
2016-10-14 18:05     ` martin rudalics
2016-10-14 18:10       ` Drew Adams
2016-10-14 18:16         ` martin rudalics
2016-10-14 18:28           ` Drew Adams
2016-10-14 19:04             ` Eli Zaretskii
2016-10-14 18:24         ` Drew Adams
2016-10-14 18:51           ` Eli Zaretskii
2016-10-14 17:20 ` Eli Zaretskii
     [not found] <<dd7af3f4-68e0-47d6-ace7-a9f086be7643@default>
     [not found] ` <<83a8e64zkt.fsf@gnu.org>
2016-10-14 17:57   ` Drew Adams
2016-10-14 18:07     ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9fc2c8e1-8cc0-499d-a871-949e7871635e@default \
    --to=drew.adams@oracle.com \
    --cc=24692@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).