unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24692: 25.1; simple, reproducible Emacs 25.1 crash on MS Windows
@ 2016-10-14 16:39 Drew Adams
  2016-10-14 17:13 ` martin rudalics
  2016-10-14 17:20 ` Eli Zaretskii
  0 siblings, 2 replies; 15+ messages in thread
From: Drew Adams @ 2016-10-14 16:39 UTC (permalink / raw)
  To: 24692

[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

I hope this is responsible for the frequent crashes I get with Emacs 25,
or at least most of them.

I spent many hours narrowing this down.  I'm hoping that that time won't
have been wasted. ;-)

Recipe:

1. Save the attached file, `e25-crash.el'.

2. runemacs.exe -Q --debug-init -l "/YOUR/PATH/TO/e25-crash.el

You will get two frames, one with buffer *scratch*, the other with the
minibuffer, buffer *Minibuf-0*.

3. Click the title bar of the frame having buffer *scratch*, to raise
and select it.

4. `C-h f prefix-command-preserve-state RET'.

5. Click `mouse-2' on the file name `simple.el' in buffer `*Help*'.

CRASH!

Note that using a different command for `C-h f', which is not in
`simple.el', might not crash Emacs.  A guess is that the (now)
large size of `simple.el' contributes to the problem.

In GNU Emacs 25.1.1 (x86_64-w64-mingw32)
 of 2016-09-17
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --without-dbus --without-compress-install CFLAGS=-static'

[-- Attachment #2: e25-crash.el --]
[-- Type: application/octet-stream, Size: 1662 bytes --]

;; 1. Save attached file `e25-crash.el'.
;; 2. runemacs.exe -Q --debug-init -l "/YOUR/PATH/TO/e25-crash.el
;; 3. `C-h f prefix-command-preserve-state'
;; 4. Click the file name `simple.el' in buffer `*Help*'
;;
;; CRASH!!!!!!!!!!

(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-same-row-windows (wins window exclude)
  ""
  (let ((ref-bottom  (cadr (cddr (window-edges window))))
        (row-wins    ()))
    (dolist (win wins)
      (when (and (not (memq win exclude))  (< (cadr (window-edges win)) ref-bottom))
        (push win row-wins)))
    row-wins))

(defun fit-frame-same-column-windows (wins window exclude)
  ""
  (let ((ref-right  (car (cddr (window-edges window))))
        (col-wins   ()))
    (dolist (win wins)
      (when (and (not (memq win exclude))  (< (car (window-edges win)) ref-right))
        (push win col-wins)))
    col-wins))

(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)

^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <<dd7af3f4-68e0-47d6-ace7-a9f086be7643@default>]

end of thread, other threads:[~2016-10-14 19:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).