VM

Not a PNG file

Bug #590132 reported by Uday Reddy
This bug report is a duplicate of:  Bug #713100: Bad PNG image encoding error. Edit Remove
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Confirmed
Medium
Unassigned

Bug Description

The button for a PDF file isn't getting displayed correctly. It produces a "Not a PNG file" error in the *Messages* buffer (but it is rarely seen in the mini-buffer itself).

Tags: emacsen mime
Uday Reddy (reddyuday)
Changed in vm:
status: New → Confirmed
importance: Undecided → Low
tags: added: mime
Revision history for this message
nega (nega) wrote :

I assume this is related to the "[Unknown/Bad PNG image encoding]" error when trying to display the mime-type icon for an attached file. This appears to be an XEmacs only related issue (if im reading the code right.)

Firstly, this can be worked around by setting "vm-imagemagick-convert-program" to "nil" in your ~/.vm

Tracing this in vm-8.1.925a brings us to the function: (defun vm-mime-display-internal-image-xemacs-xxxx (line 3331)
It appears that this function, and the conditionals for calling it, are broken. Here's what I've found.

;; this always fails, because...
3360 (cond (do-strips

;; this always fails because vm-mime-use-image-strips is always nil
;; even though C-h v says's it's true. adding an assert confirms that it's nil
3358 (setq do-strips (and (stringp vm-imagemagick-convert-program)
3359 vm-mime-use-image-strips))

;; we bounce down to
3421 (cond ((not do-strips)

;; that whole block "fails" because, this doesnt work:
3423 (setq g (make-glyph

;; and we get the error set here:
3430 (format "[Unknown/Bad %s image encoding]"

;; now if we force...
+++ (setq vm-mime-use-image-strips t)
3358 (setq do-strips (and (stringp vm-imagemagick-convert-program)
3359 vm-mime-use-image-strips))
3360 (cond (do-strips

;; that block fails, and we get kicked back to
3421 (cond ((not do-strips)
;; which will fail because (i think) make-glyph() isnt getting good data

So, now that i've been totally distracted and it's taken me 3+ hours just to write this up....
I think one of the issues might be what vm is giving to make-glyph(). it might possibly be XEmacs's make-glyph()'s fault. Honestly I didn't have the heart to totally trace that down tonight.

Uday Reddy (reddyuday)
Changed in vm:
importance: Low → Medium
tags: added: xemacs
Uday Reddy (reddyuday)
tags: added: emacsen
removed: xemacs
Revision history for this message
Uday Reddy (reddyuday) wrote :

Nega, please check to see if this problem has been fixed from Julian Bradfield's patch in Bug 713100.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.