emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crash in image-mode


From: Juri Linkov
Subject: Crash in image-mode
Date: Fri, 26 May 2006 01:43:14 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Emacs crashes while visiting remote image files.

Program received signal SIGSEGV, Segmentation fault.
0xb7c03e07 in fclose () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7c03e07 in fclose () from /lib/tls/i686/cmov/libc.so.6
#1  0x081142fd in png_load (f=0x8669530, img=0x8738060) at image.c:6107
#2  0x0810f6a0 in lookup_image (f=0x8669530, spec=143472109) at image.c:1865
#3  0x0806bea2 in handle_single_display_spec (it=0xbf92e030, spec=143472109, 
object=144230780, position=0xbf92e0d0, display_replaced_before_p=0) at 
xdisp.c:4191
#4  0x0806af30 in handle_display_prop (it=0xbf92e030) at xdisp.c:3800
#5  0x080694f3 in handle_stop (it=0xbf92e030) at xdisp.c:3010
#6  0x0806e076 in reseat (it=0xbf92e030, pos={charpos = 1, bytepos = 1}, 
force_p=1) at xdisp.c:5196
#7  0x08068c8c in init_iterator (it=0xbf92e030, w=0x866c448, charpos=1, 
bytepos=1, row=0x87c91f0, base_face_id=DEFAULT_FACE_ID) at xdisp.c:2677
#8  0x08068dbd in start_display (it=0xbf92e030, w=0x866c448, pos={charpos = 1, 
bytepos = 1}) at xdisp.c:2696
#9  0x0807eb4c in try_window (window=140952652, pos={charpos = 1, bytepos = 1}, 
check_margins=1) at xdisp.c:13326
#10 0x0807d9a0 in redisplay_window (window=140952652, just_this_one_p=0) at 
xdisp.c:12959
#11 0x08079ddb in redisplay_window_0 (window=140952652) at xdisp.c:11586
#12 0x0819de6c in internal_condition_case_1 (bfun=0x8079da8 
<redisplay_window_0>, arg=140952652, handlers=137942245, hfun=0x8079d87 
<redisplay_window_error>)
    at eval.c:1522
#13 0x08079d6e in redisplay_windows (window=140952652) at xdisp.c:11565
#14 0x08079d1b in redisplay_windows (window=140858996) at xdisp.c:11557
#15 0x080791b2 in redisplay_internal (preserve_echo_area=0) at xdisp.c:11125
#16 0x08077546 in redisplay () at xdisp.c:10355
#17 0x0811df90 in read_char (commandflag=1, nmaps=2, maps=0xbf92ee00, 
prev_event=137955529, used_mouse_menu=0xbf92ef34) at keyboard.c:2549
#18 0x081282b8 in read_key_sequence (keybuf=0xbf92f110, bufsize=30, 
prompt=137955529, dont_downcase_last=0, can_return_switch_frame=1, 
fix_current_buffer=1)
    at keyboard.c:8864
#19 0x0811b6f9 in command_loop_1 () at keyboard.c:1536
#20 0x0819dd40 in internal_condition_case (bfun=0x811b3d6 <command_loop_1>, 
handlers=138000169, hfun=0x811af04 <cmd_error>) at eval.c:1474
#21 0x0811b24d in command_loop_2 () at keyboard.c:1328
#22 0x0819d7dc in internal_catch (tag=137996401, func=0x811b22a 
<command_loop_2>, arg=137955529) at eval.c:1212
#23 0x0811b203 in command_loop () at keyboard.c:1307
#24 0x0811ac70 in recursive_edit_1 () at keyboard.c:1000
#25 0x0811adc4 in Frecursive_edit () at keyboard.c:1061
#26 0x081196b5 in main (argc=2, argv=0xbf92f8d4) at emacs.c:1789

It seems that the png library can't handle remote files, so the
following change fixes this:

Index: lisp/image-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/image-mode.el,v
retrieving revision 1.11
diff -u -r1.11 image-mode.el
--- lisp/image-mode.el  18 Apr 2006 21:21:08 -0000      1.11
+++ lisp/image-mode.el  25 May 2006 22:41:30 -0000
@@ -140,6 +140,8 @@
     (let* ((image
            (if (and (buffer-file-name)
                     (not (buffer-modified-p))
+                    (not (file-remote-p (buffer-file-name)))
                     (not (and (boundp 'archive-superior-buffer)
                               archive-superior-buffer))
                     (not (and (boundp 'tar-superior-buffer)

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]