vim-pandoc / vim-pandoc-legacy

[UNSUPPORTED/use vim-pandoc/vim-pandoc] vim bundle for pandoc users
143 stars 23 forks source link

gvim crashes on windows with this file #90

Closed blaenk closed 10 years ago

blaenk commented 11 years ago

I'm on gVim 7.4a 64-bit on Windows 8 64-bit and it crashes when I open this file. The command prompt window opens for a split second (as it does when I open any other markdown file) then I get a message that gVim has crashed.

When I disable the plugin everything works perfectly fine. I'm not quite sure what other information could be of use in tracking this down. Every other markdown file I've opened so far has had no problems.

EDIT: I couldn't find anything that stood out at me about this markdown document, but after reading other issues I get the impression that there is a problem with the @ symbol, which is present in my markdown file in the form of:

[...] using the `@import` directive [...]

I removed this symbol and everything worked perfectly fine. Of course, that's not a solution because I need the symbol there, but it does show that that is what is causing the crash.

The fix by @jldiaz in #88 didn't really seem to do anything. I suppose I'll try just editing pandoc.vim directly.

mreid commented 11 years ago

I'm having the same issue with MacVim on my Mac OS with any file containing the @ symbol as a prefix.

For example, I can reproduce the crash by setting the filetype to pandoc and then trying to type My Twitter handle is @mdreid. As soon as I type the @ MacVim crashes. Opening a markdown file (e.g., any *.md file) that already contains an @ also crashes MacVim.

I've observed that starting a new file with no filetype set, typing an @ and then doing :set filetype=pandoc displays the following error before crashing:

 Error detected while processing function pandoc#Pandoc_Find_Bibfile:
 line   54:
 Traceback (most recent call last):
   File "<string>", line 10, in <module>
   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 404, in relpath
     raise ValueError("no path specified")
 ValueError: no path specified

It looks as though vim-pandoc is attempting to do citation completion when an @ is typed but is failing to find some path or other and then crashing.

For reference, I'm running:

aignas commented 10 years ago

I can confirm, that I see the same behaviour. Even if the file is empty it still crashes as soon as I type in @ symbol. Was there any progress on this?

fmoralesc commented 10 years ago

I just pushed some changes that should fix this. Please confirm.