unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1337: crash on going into non-existing dir with find-file
@ 2008-11-13 14:04 xah lee
  0 siblings, 0 replies; 12+ messages in thread
From: xah lee @ 2008-11-13 14:04 UTC (permalink / raw)
  To: bug-gnu-emacs

  using a
This causes a hard crash.

Steps:

1. eval (find-file "file:///Users/xah/web/emacs/apple_pc_kb_diff.html")
then you'll go into a empty buffer.

2. now M-x find-file, hit Enter. Now i expect to go to the dir this  
file is located. (note that the file doesn't exist yet)

3. emacs crashed.

am pretty sure this is 100% reproducible. It crashed 3 times on me.

The problem occured because i was trying to open a local file, where  
the file path happend to be a url scheme path. Apparently, find-file  
does not recognize url scheme local files, but find-file-at-point  
auto launch browser when the file is url scheme. In any case, i got  
confused a bit because i know the file exist but i got a empty  
buffer. So i tried to go into th dir to see where exactly emacs think  
is the path, then crash.

In GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0)
  of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp
Windowing system distributor `Apple Inc.', version 10.4.11
configured using `configure  '--prefix=/Applications/Emacs.app/ 
Contents/Resources' '--with-carbon' '--without-x' '--libexecdir=/ 
Volumes/Emacs/Emacs.app/Contents/MacOS/libexec' 'CFLAGS=-Os -arch  
i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DUSE_ATSUI - 
DUSE_MAC_TSM''

   Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
@ 2008-11-14 17:48 Chong Yidong
  2008-11-15  1:21 ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 12+ messages in thread
From: Chong Yidong @ 2008-11-14 17:48 UTC (permalink / raw)
  To: xah lee; +Cc: 1337

> 1. eval (find-file "file:///Users/xah/web/emacs/apple_pc_kb_diff.html")
> then you'll go into a empty buffer.
>
> 2. now M-x find-file, hit Enter. Now i expect to go to the dir this  
> file is located. (note that the file doesn't exist yet)
>
> 3. emacs crashed.
>
> am pretty sure this is 100% reproducible. It crashed 3 times on me.
>
> In GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0)
>  of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp

I can't reproduce this on GNU Emacs 23.0.60.19 (i686-pc-linux-gnu, GTK+
Version 2.14.4) of 2008-11-13.  This is probably either an Emacs 22 only
bug or a Emacs Carbon bug.  If someone could check whether the crash
happens on Emacs 23 Cocoa, that would be good.






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
  2008-11-14 17:48 Chong Yidong
@ 2008-11-15  1:21 ` YAMAMOTO Mitsuharu
  2008-11-15  2:22   ` xah lee
  0 siblings, 1 reply; 12+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-11-15  1:21 UTC (permalink / raw)
  To: Chong Yidong, 1337; +Cc: xah lee

>>>>> On Fri, 14 Nov 2008 12:48:23 -0500, Chong Yidong <cyd@stupidchicken.com> said:

>> 1. eval (find-file "file:///Users/xah/web/emacs/apple_pc_kb_diff.html")
>> then you'll go into a empty buffer.
>> 
>> 2. now M-x find-file, hit Enter. Now i expect to go to the dir this  
>> file is located. (note that the file doesn't exist yet)
>> 
>> 3. emacs crashed.
>> 
>> am pretty sure this is 100% reproducible. It crashed 3 times on me.
>> 
>> In GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0)
>> of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp

> I can't reproduce this on GNU Emacs 23.0.60.19 (i686-pc-linux-gnu, GTK+
> Version 2.14.4) of 2008-11-13.  This is probably either an Emacs 22 only
> bug or a Emacs Carbon bug.

I can't reproduce it with Emacs 22.3 Carbon on Mac OS X 10.5.5, either.

For further debugging, the following information would be helpful.

1. A crash log in ~/Library/CrashReporter/ if available.
2. A concrete procedure to reproduce the crash starting with
   ".../Emacs.app/Contents/MacOS/Emacs -Q" from the command line.
3. Whether it is reproducible with Emacs 22.3 Carbon, preferably with
   no modifications unlike Carbon Emacs Package or Aquamacs Emacs.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
  2008-11-15  1:21 ` YAMAMOTO Mitsuharu
@ 2008-11-15  2:22   ` xah lee
  2008-11-15  3:05     ` YAMAMOTO Mitsuharu
  2008-11-15 19:38     ` Stefan Monnier
  0 siblings, 2 replies; 12+ messages in thread
From: xah lee @ 2008-11-15  2:22 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: 1337, Chong Yidong

Thanks for the reply.

after some debugging, it turns out that problem is tabbar mode.

Here's the steps:

• start emacs by
/Applications/Emacs.app/Contents/MacOS/Emacs -Q

• evaluate the following
(autoload 'tabbar-mode "tabbar" "Show tab bars." t)
(tabbar-mode 1)
presuming the file is in your load path.

• now, dired into root dir. C-x C-f / RET

• emacs crashes.

The version of tabbar i'm using is:

;; Author: David Ponce <david@dponce.com>
;; Maintainer: David Ponce <david@dponce.com>
;; Created: 25 February 2003
;; Keywords: convenience
;; Revision: $Id: tabbar.el,v 1.4 2008/06/11 22:28:24 davidswelt Exp $

(defconst tabbar-version "2.0")

it's not part GNU emacs so prob not relevant here... but if any is  
interested, email me and i can provide more debugging info.

Thanks.

   Xah
∑ http://xahlee.org/

☄



On Nov 14, 2008, at 5:21 PM, YAMAMOTO Mitsuharu wrote:

>>>>> On Fri, 14 Nov 2008 12:48:23 -0500, Chong Yidong  
>>>>> <cyd@stupidchicken.com> said:

>> 1. eval (find-file "file:///Users/xah/web/emacs/ 
>> apple_pc_kb_diff.html")
>> then you'll go into a empty buffer.
>>
>> 2. now M-x find-file, hit Enter. Now i expect to go to the dir this
>> file is located. (note that the file doesn't exist yet)
>>
>> 3. emacs crashed.
>>
>> am pretty sure this is 100% reproducible. It crashed 3 times on me.
>>
>> In GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version  
>> 1.6.0)
>> of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp

> I can't reproduce this on GNU Emacs 23.0.60.19 (i686-pc-linux-gnu,  
> GTK+
> Version 2.14.4) of 2008-11-13.  This is probably either an Emacs 22  
> only
> bug or a Emacs Carbon bug.

I can't reproduce it with Emacs 22.3 Carbon on Mac OS X 10.5.5, either.

For further debugging, the following information would be helpful.

1. A crash log in ~/Library/CrashReporter/ if available.
2. A concrete procedure to reproduce the crash starting with
    ".../Emacs.app/Contents/MacOS/Emacs -Q" from the command line.
3. Whether it is reproducible with Emacs 22.3 Carbon, preferably with
    no modifications unlike Carbon Emacs Package or Aquamacs Emacs.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

☄








^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
  2008-11-15  2:22   ` xah lee
@ 2008-11-15  3:05     ` YAMAMOTO Mitsuharu
  2008-11-15  3:33       ` Glenn Morris
  2008-11-15  5:34       ` Chong Yidong
  2008-11-15 19:38     ` Stefan Monnier
  1 sibling, 2 replies; 12+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-11-15  3:05 UTC (permalink / raw)
  To: xah lee; +Cc: 1337, Chong Yidong

>>>>> On Fri, 14 Nov 2008 18:22:31 -0800, xah lee <xah@xahlee.org> said:

> Thanks for the reply.
> after some debugging, it turns out that problem is tabbar mode.

> Here's the steps:

> • start emacs by
> /Applications/Emacs.app/Contents/MacOS/Emacs -Q

> • evaluate the following
> (autoload 'tabbar-mode "tabbar" "Show tab bars." t)
> (tabbar-mode 1)
> presuming the file is in your load path.

> • now, dired into root dir. C-x C-f / RET

> • emacs crashes.

> The version of tabbar i'm using is:

> ;; Author: David Ponce <david@dponce.com>
> ;; Maintainer: David Ponce <david@dponce.com>
> ;; Created: 25 February 2003
> ;; Keywords: convenience
> ;; Revision: $Id: tabbar.el,v 1.4 2008/06/11 22:28:24 davidswelt Exp $

> (defconst tabbar-version "2.0")

> it's not part GNU emacs so prob not relevant here... but if any is  
> interested, email me and i can provide more debugging info.

Thanks.  I could reproduce it with a slightly different version of
tabbar.el.

I think the patch below will fix it.  The other terms (X11, W32) need
a similar change.  It may not happen on X11 using the above procedure,
but it has something to do with drawing with overhangs, and whether
the crash occurs or not depends on the metric of the used font.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

Index: src/macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/Attic/macterm.c,v
retrieving revision 1.214.2.31
diff -c -p -r1.214.2.31 macterm.c
*** src/macterm.c	2 Sep 2008 08:19:06 -0000	1.214.2.31
--- src/macterm.c	15 Nov 2008 02:57:28 -0000
*************** x_draw_glyph_string (s)
*** 3777,3783 ****
        xassert (s->next->img == NULL);
        x_set_glyph_string_gc (s->next);
        x_set_glyph_string_clipping (s->next);
!       x_draw_glyph_string_background (s->next, 1);
      }
  
    /* Set up S->gc, set clipping and draw S.  */
--- 3777,3786 ----
        xassert (s->next->img == NULL);
        x_set_glyph_string_gc (s->next);
        x_set_glyph_string_clipping (s->next);
!       if (s->next->first_glyph->type == STRETCH_GLYPH)
! 	x_draw_stretch_glyph_string (s->next);
!       else
! 	x_draw_glyph_string_background (s->next, 1);
      }
  
    /* Set up S->gc, set clipping and draw S.  */






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
  2008-11-15  3:05     ` YAMAMOTO Mitsuharu
@ 2008-11-15  3:33       ` Glenn Morris
  2008-11-15  3:44         ` YAMAMOTO Mitsuharu
  2008-11-15  5:34       ` Chong Yidong
  1 sibling, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2008-11-15  3:33 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: 1337, xah lee, Chong Yidong

YAMAMOTO Mitsuharu wrote:

> I could reproduce it with a slightly different version of tabbar.el.

Sounds like this is the same as bug 615?

http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=615






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
  2008-11-15  3:33       ` Glenn Morris
@ 2008-11-15  3:44         ` YAMAMOTO Mitsuharu
  2008-11-15 19:15           ` Glenn Morris
  0 siblings, 1 reply; 12+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-11-15  3:44 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 1337, xah lee, Chong Yidong

>>>>> On Fri, 14 Nov 2008 22:33:30 -0500, Glenn Morris <rgm@gnu.org> said:

> YAMAMOTO Mitsuharu wrote:
>> I could reproduce it with a slightly different version of
>> tabbar.el.

> Sounds like this is the same as bug 615?

> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=615

I think it is a different issue, because it crashes at
ns_free_indexed_color.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
  2008-11-15  3:05     ` YAMAMOTO Mitsuharu
  2008-11-15  3:33       ` Glenn Morris
@ 2008-11-15  5:34       ` Chong Yidong
  1 sibling, 0 replies; 12+ messages in thread
From: Chong Yidong @ 2008-11-15  5:34 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: xah lee, 1337

YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:

> Thanks.  I could reproduce it with a slightly different version of
> tabbar.el.
>
> I think the patch below will fix it.  The other terms (X11, W32) need
> a similar change.  It may not happen on X11 using the above procedure,
> but it has something to do with drawing with overhangs, and whether
> the crash occurs or not depends on the metric of the used font.

Thanks for the quick work debugging.  Your analysis is, of course,
correct, and I've checked the fix into xterm.c and w32term.c in CVS
trunk.






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
  2008-11-15  3:44         ` YAMAMOTO Mitsuharu
@ 2008-11-15 19:15           ` Glenn Morris
  2008-11-15 23:34             ` Chong Yidong
  0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2008-11-15 19:15 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: 1337, xah lee, Chong Yidong

YAMAMOTO Mitsuharu wrote:

>> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=615
>
> I think it is a different issue, because it crashes at
> ns_free_indexed_color.

Then it sounds like #615 is related to#1075 (and friends), which I had
hoped was fixed...






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
  2008-11-15  2:22   ` xah lee
  2008-11-15  3:05     ` YAMAMOTO Mitsuharu
@ 2008-11-15 19:38     ` Stefan Monnier
  1 sibling, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2008-11-15 19:38 UTC (permalink / raw)
  To: xah lee; +Cc: 1337, Chong Yidong

> after some debugging, it turns out that problem is tabbar mode.
[...]
> • emacs crashes.

No Elisp code should be able to cause Emacs to crash, so if Emacs
crashes it's a problem in the Emacs C code (tho it might be triggered by
a problem in tabbar).


        Stefan






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
  2008-11-15 19:15           ` Glenn Morris
@ 2008-11-15 23:34             ` Chong Yidong
  2008-11-17 23:55               ` Glenn Morris
  0 siblings, 1 reply; 12+ messages in thread
From: Chong Yidong @ 2008-11-15 23:34 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 1337

Glenn Morris <rgm@gnu.org> writes:

> Then it sounds like #615 is related to#1075 (and friends), which I had
> hoped was fixed...

Adrian Robert checked in a fix for 1075 last month, but AFAICT we never
heard back about whether the bug went away.






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#1337: crash on going into non-existing dir with find-file
  2008-11-15 23:34             ` Chong Yidong
@ 2008-11-17 23:55               ` Glenn Morris
  0 siblings, 0 replies; 12+ messages in thread
From: Glenn Morris @ 2008-11-17 23:55 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 1337

Chong Yidong wrote:

>> Then it sounds like #615 is related to#1075 (and friends), which I had
>> hoped was fixed...
>
> Adrian Robert checked in a fix for 1075 last month, but AFAICT we never
> heard back about whether the bug went away.

No we didn't; and now bug#1362 reports another crash related to
ns_free_indexed_color. :(






^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-11-17 23:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-13 14:04 bug#1337: crash on going into non-existing dir with find-file xah lee
  -- strict thread matches above, loose matches on Subject: below --
2008-11-14 17:48 Chong Yidong
2008-11-15  1:21 ` YAMAMOTO Mitsuharu
2008-11-15  2:22   ` xah lee
2008-11-15  3:05     ` YAMAMOTO Mitsuharu
2008-11-15  3:33       ` Glenn Morris
2008-11-15  3:44         ` YAMAMOTO Mitsuharu
2008-11-15 19:15           ` Glenn Morris
2008-11-15 23:34             ` Chong Yidong
2008-11-17 23:55               ` Glenn Morris
2008-11-15  5:34       ` Chong Yidong
2008-11-15 19:38     ` Stefan Monnier

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