From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.bugs Subject: bug#33990: 27.0.50; image-transform-fit-to-height/-width violates assert Date: Sun, 06 Jan 2019 10:12:13 +0100 Message-ID: <87lg3yno9e.fsf@turtle-trading.net> References: <875zv3m2xd.fsf@turtle-trading.net> <83a7kf0y6w.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1546765872 22843 195.159.176.226 (6 Jan 2019 09:11:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 6 Jan 2019 09:11:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33990@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 06 10:11:08 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gg4SY-0005pg-Rn for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Jan 2019 10:11:07 +0100 Original-Received: from localhost ([127.0.0.1]:57461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gg4Uf-000413-Oa for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Jan 2019 04:13:17 -0500 Original-Received: from eggsout.gnu.org ([209.51.188.92]:57897 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gg4UV-0003zS-6n for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2019 04:13:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gg4UQ-0002Pd-9S for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2019 04:13:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46538) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gg4UP-0002PH-VV for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2019 04:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gg4UP-0003N6-Pw for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2019 04:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Benjamin Riefenstahl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Jan 2019 09:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33990 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33990-submit@debbugs.gnu.org id=B33990.154676594412915 (code B ref 33990); Sun, 06 Jan 2019 09:13:01 +0000 Original-Received: (at 33990) by debbugs.gnu.org; 6 Jan 2019 09:12:24 +0000 Original-Received: from localhost ([127.0.0.1]:48229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gg4To-0003MF-0K for submit@debbugs.gnu.org; Sun, 06 Jan 2019 04:12:24 -0500 Original-Received: from odoacer.turtle-trading.net ([93.241.193.16]:60382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gg4Tl-0003Lx-64 for 33990@debbugs.gnu.org; Sun, 06 Jan 2019 04:12:22 -0500 Original-Received: from justinian.turtle-trading.net ([192.168.2.118]) by odoacer.turtle-trading.net with esmtp (Exim 4.80) (envelope-from ) id 1gg4Te-0003fb-Bn; Sun, 06 Jan 2019 10:12:14 +0100 Original-Received: from benny by justinian.turtle-trading.net with local (Exim 4.89) (envelope-from ) id 1gg4Te-00060g-1a; Sun, 06 Jan 2019 10:12:14 +0100 In-Reply-To: <83a7kf0y6w.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 Jan 2019 20:13:59 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154186 Archived-At: Eli Zaretskii writes: > Please show the error message and the Lisp backtrace from the error, > and also the values of the relevant variables. Values: size -> (995 . 1068) ; From image-display-size, i.e. the image dimensions (window-inside-pixel-edges) -> (8 0 933 970) And yes, the image is actually higher than the window, it can be scrolled. The original image is rather small, 75x80, and the difference, 1068 - 970 -> 98, is about the size of an original pixel after transformation, so this looks like a rounding problem. Maybe the code should adjust by one original pixel when it calculates the target height in image-transform-properties? Stacktrace: Debugger entered--Lisp error: (cl-assertion-failed ((= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) nil 1068 970)) cl--assertion-failed((= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) nil (1068 970) nil) (or (= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) (cl--assertion-failed '(= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) nil (list (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) (list))) (progn (or (= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) (cl--assertion-failed '(= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) nil (list (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) (list))) nil) (cl-assert (= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) t) (cond ((eq image-transform-resize 'fit-width) (cl-assert (= (car size) (- (nth 2 (window-inside-pixel-edges)) (nth 0 (window-inside-pixel-edges)))) t)) ((eq image-transform-resize 'fit-height) (cl-assert (= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) t))) (let ((size (image-display-size (image-get-display-property) t))) (cond ((eq image-transform-resize 'fit-width) (cl-assert (= (car size) (- (nth 2 (window-inside-pixel-edges)) (nth 0 (window-inside-pixel-edges)))) t)) ((eq image-transform-resize 'fit-height) (cl-assert (= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) t)))) (progn (let ((size (image-display-size (image-get-display-property) t))) (cond ((eq image-transform-resize 'fit-width) (cl-assert (= (car size) (- (nth 2 ...) (nth 0 ...))) t)) ((eq image-transform-resize 'fit-height) (cl-assert (= (cdr size) (- (nth 3 ...) (nth 1 ...))) t))))) (if (and (not (numberp image-transform-resize)) (boundp 'image-type) (eq image-type 'imagemagick)) (progn (let ((size (image-display-size (image-get-display-property) t))) (cond ((eq image-transform-resize 'fit-width) (cl-assert (= (car size) (- ... ...)) t)) ((eq image-transform-resize 'fit-height) (cl-assert (= (cdr size) (- ... ...)) t)))))) (when (and (not (numberp image-transform-resize)) (boundp 'image-type) (eq image-type 'imagemagick)) (let ((size (image-display-size (image-get-display-property) t))) (cond ((eq image-transform-resize 'fit-width) (cl-assert (= (car size) (- (nth 2 ...) (nth 0 ...))) t)) ((eq image-transform-resize 'fit-height) (cl-assert (= (cdr size) (- (nth 3 ...) (nth 1 ...))) t))))) image-transform-check-size() image-toggle-display-image() image-mode() set-auto-mode-0(image-mode nil) set-auto-mode() normal-mode(t) after-find-file(nil t) find-file-noselect-1(# "~/Projects/Mandaic-Font/src/199/att-fin-199.03.14...." nil nil "~/Projects/Mandaic-Font/src/199/att-fin-199.03.14...." (17829146 66305)) find-file-noselect("/home/benny/Projects/Mandaic-Font/src/199/att-fin-..." nil nil nil) find-file("/home/benny/Projects/Mandaic-Font/src/199/att-fin-...") dired-find-file() funcall-interactively(dired-find-file) call-interactively(dired-find-file nil nil) command-execute(dired-find-file) recursive-edit() debug(error (cl-assertion-failed ((= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) nil 1067 970))) cl--assertion-failed((= (cdr size) (- (nth 3 (window-inside-pixel-edges)) (nth 1 (window-inside-pixel-edges)))) nil (1067 970) nil) image-transform-check-size() image-toggle-display-image() image-transform-fit-to-height() funcall-interactively(image-transform-fit-to-height) call-interactively(image-transform-fit-to-height nil nil) command-execute(image-transform-fit-to-height)