all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: Eli Zaretskii <eliz-mXXj517/zsQ@public.gmane.org>
Cc: 16751-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org
Subject: bug#16751: 24.3.50; Export during Org export to HTML
Date: Mon, 24 Feb 2014 12:30:00 +0100	[thread overview]
Message-ID: <86wqgk7npj.fsf@somewhere.org> (raw)
In-Reply-To: <83ha7w75sc.fsf-mXXj517/zsQ@public.gmane.org> (Eli Zaretskii's message of "Tue, 18 Feb 2014 18:18:59 +0200")

Eli Zaretskii wrote:
> You are not in the correct stack frame.  You need to be in Thread 1 in
> frame #2:
>
>   Thread 1 (Thread 9012.0x1b80):
>   #0  0x77149bfd in KERNELBASE!DebugBreak () from /cygdrive/c/Windows/SYSTEM32/KERNELBASE.dll
>   #1  0x011ec39c in emacs_abort () at c:/msys/home/dani/emacs/repo/src/w32fns.c:7984
>   #2 0x01122321 in Fexpand_file_name (name=157735393,
> default_directory=157801377) at c:/msys/home/dani/emacs/repo/src/fileio.c:1450
>
> So:
>
>   (gdb) thread 1
>   (gdb) frame 2
>   (gdb) p name
>   (gdb) xstring
>   (gdb) p default_directory
>   (gdb) xtype

Thanks for these step-by-step commands... Applied with the following
Org file which allows me to reproduce the crash:

--8<---------------cut here---------------start------------->8---
* Config

Put this in your config file:

URI=file:///opt/tomcat/4/apache-tomcat-4.1.40/webapps/../user_projects/GHIJSP2/deploy/WEB-INF/sharedfiles/resources/FR/domVal.xml
Line=35: Attribute "fDel" must be declared for element type "pair".
--8<---------------cut here---------------end--------------->8---

And the info you want:

--8<---------------cut here---------------start------------->8---
(gdb) thread 1
[Switching to thread 1 (Thread 3868.0x1098)]
#0  0x77149bfd in KERNELBASE!DebugBreak () from /cygdrive/c/Windows/SYSTEM32/KERNELBASE.dll
(gdb) frame 2
#2  0x01131397 in Fexpand_file_name (name=107130897, default_directory=99518353) at c:/msys/home/dani/emacs/trunk/src/fileio.c:1484
1484      c:/msys/home/dani/emacs/trunk/src/fileio.c: No such file or directory.
(gdb) p name
$1 = 107130897
(gdb) xstring
(gdb) source ~/.gdbinit
Warning: /cygdrive/c/Program Files (x86)/emacs-trunk/bin/../lwlib: No such file or directory.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
Environment variable "DISPLAY" not defined.
TERM = xterm-256color
Breakpoint 1 at 0x10f0372: file c:/msys/home/dani/emacs/trunk/src/emacs.c, line 351.
Temporary breakpoint 2 at 0x1113e88: file c:/msys/home/dani/emacs/trunk/src/sysdep.c, line 854.
(gdb) xstring
$2 = (struct Lisp_String *) 0x662b010
"///opt/tomcat/4/apache-tomcat-4.1.40/webapps/../user_projects/GHIJSP2/deploy/WEB-INF/sharedfiles/resources/FR/domVal.xml"
(gdb) p default_directory
$3 = 99518353
(gdb) xtype
Lisp_String
(gdb)
--8<---------------cut here---------------end--------------->8---

>>> Alternatively, if you can find where in Lisp is this expand-file-name
>>> call, add 'message' there, or step through that code with Edebug, to
>>> show the arguments passed to expand-file-name.
>> 
>> It seems to be in `org-html-link', and there's only one call to
>> `expand-file-name', when the path begins by "file:".
>> 
>> I've looked at all my "file:" links in the buggy Org document. One such
>> line came out as very different from the others:
>> 
>> --8<---------------cut here---------------start------------->8---
>> URI=file:///opt/tomcat/4/apache-tomcat-4.1.40/webapps/../user_projects/GHIJSP2/deploy/WEB-INF/sharedfiles/resources/FR/domVal.xml
>> --8<---------------cut here---------------end--------------->8---
>> 
>> If I remove that line from my Org document, Emacs doesn't crash
>> anymore...
>
> How come you have such a file URI on a Windows machine?  Where does
> this point to?

It does not point to anything sensible, at least not from my machine.

It's a line of code which I have to copy in some Apache configuration
file (on a testing server) and which I inserted verbatim in my Org
file.

Admittedly, I should put such line in a #+begin/end_example block --
and, FYI, that doesn't crash Emacs. But I didn't in my real file, and
had the crash when exporting, hence this bug report.

> Also, what does org-element-property return for this file name (that's
> the argument passed to expand-file-name, I think)?

I tried to eval (org-element-property) on the file name, in the above
Org file:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-number-of-arguments (lambda (property element) "Extract the value from the PROPERTY of an ELEMENT." (if (stringp element) (get-text-property 0 property element) (plist-get (nth 1 element) property))) 0)
  org-element-property()
  eval((org-element-property) nil)
  eval-expression((org-element-property) nil)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)
--8<---------------cut here---------------end--------------->8---

Not what you wanted, for sure.

Best regards,
  Seb





  parent reply	other threads:[~2014-02-24 11:30 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14  9:17 bug#16751: 24.3.50; Export during Org export to HTML Sebastien Vauban
2014-02-14 10:06 ` Eli Zaretskii
     [not found] ` <mailman.15076.1392372434.10748.bug-gnu-emacs@gnu.org>
     [not found]   ` <mailman.15076.1392372434.10748.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
2014-02-18 11:39     ` Sebastien Vauban
2014-02-18 16:18       ` Eli Zaretskii
     [not found]         ` <83ha7w75sc.fsf-mXXj517/zsQ@public.gmane.org>
2014-02-24 11:30           ` Sebastien Vauban [this message]
2014-02-24 16:24             ` Eli Zaretskii
     [not found]             ` <mailman.15924.1393259115.10748.bug-gnu-emacs@gnu.org>
     [not found]               ` <mailman.15924.1393259115.10748.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
2014-02-25  9:36                 ` Sebastien Vauban
2014-02-25 16:20                   ` Eli Zaretskii
2014-02-25 17:12                     ` Bastien
2014-02-25 17:12                     ` Bastien
2014-02-25 17:49                       ` Eli Zaretskii
2014-03-01 11:53                         ` Eli Zaretskii
2014-03-21  8:17                           ` Bastien
2014-03-21  8:17                           ` Bastien
2014-03-28 18:36                             ` Nicolas Goaziou
2014-04-10 21:03                               ` Nicolas Goaziou
2014-04-11  8:48                                 ` Bastien
2014-04-11  8:48                                 ` Bastien
2014-04-10 21:03                               ` Nicolas Goaziou
2014-03-28 18:36                             ` Nicolas Goaziou
2014-03-01 11:53                         ` Eli Zaretskii
2014-02-25 17:49                       ` Eli Zaretskii
2014-02-25 18:04                       ` Nicolas Goaziou
2014-02-25 18:32                         ` Eli Zaretskii
2014-02-25 19:11                           ` Achim Gratz
2014-02-25 18:32                         ` Eli Zaretskii
2014-02-25 18:41                           ` Glenn Morris
2014-02-25 18:41                           ` Glenn Morris
2014-02-25 20:53                             ` Eli Zaretskii
2014-02-25 20:53                             ` Eli Zaretskii
2014-02-25 18:04                       ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86wqgk7npj.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=16751-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org \
    --cc=eliz-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.