Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pandoc 2.0.6+ crashes on Windows 7 when a Lua Filter is used. #4293

Closed
RobertZenz opened this issue Jan 23, 2018 · 10 comments
Closed

Pandoc 2.0.6+ crashes on Windows 7 when a Lua Filter is used. #4293

RobertZenz opened this issue Jan 23, 2018 · 10 comments

Comments

@RobertZenz
Copy link

RobertZenz commented Jan 23, 2018

Pandoc 2.0.6/2.1+ are crashing on Windows 7 when a Lua Filter is used.

As test case is used the following:

pandoc.exe --from=markdown --to=html --lua-filter=filter.lua test.markdown

test.markdown:

Introduction
============

Test

filter.lua:

return {
    { Link = function(element)
        return element
    end }
}

When invoked with the above command, Pandoc crashes and Windows reports that Pandoc has stopped working. When the Lua filter is ommitted:

pandoc.exe --from=markdown --to=html test.markdown

Pandoc does not crash.

I could reproduce this on another Windows 7 machine, however, it works correctly on Windows 10. Pandoc 2.0.5 does not crash when used with Lua filters. The ZIP packaged version (from the releases page) has been used for all tests.

This has been reported on the mailing list.

@mb21
Copy link
Collaborator

mb21 commented Mar 11, 2018

Wondering whether this is still the case with pandoc 2.1.1 ?

@robinerd
Copy link

robinerd commented Mar 12, 2018

I'm having the same issue, running Windows 7 and pandoc 2.1.2

test.lua:

return {
  {
    Str = function (elem)
      if elem.text == "{{helloworld}}" then
        return pandoc.Emph {pandoc.Str "Hello, World"}
      else
        return elem
      end
    end,
  }
}

Running from command line:
C:/Devtools/Pandoc/pandoc.exe -f markdown -t docbook --lua-filter test.lua myfile.md

Please let me know if more info is needed for fault finding.

@RobertZenz
Copy link
Author

@mb21 Freshly downloaded 2.1.2 crashes as described above.

@mb21
Copy link
Collaborator

mb21 commented Mar 12, 2018

Can you post the exact output? and exact windows version?

Maybe you could also try the commands listed in #4283 and see whether they crash (and if so with what output/exit code)?

@robinerd
Copy link

robinerd commented Mar 12, 2018

Here are some more details.

$ C:/Devtools/Pandoc/pandoc.exe -v
pandoc.exe 2.1.2
Compiled with pandoc-types 1.17.3, texmath 0.10.1.1, skylighting 0.6
Default user data directory: C:\Users\a273094\AppData\Roaming\pandoc
Copyright (C) 2006-2018 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

System Info
OS Name: Microsoft Windows 7 Enterprise
Version: 6.1.7601 Service Pack 1 Build 7601
System Type: x64-based PC
Processor: Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz, 2801 Mhz, 4 Core(s), 8 Logical Processor(s)
Installed Physical Memory (RAM): 16,0 GB

Running the same command as before again. It produces no output, and I get a "Pandoc.exe has stopped working" dialogue from windows, almost immediately.

The pandoc -h command produces the help text below and then crashes with the same dialogue.
(see full output on https://pastebin.com/j2YJ7cXg)

@RobertZenz
Copy link
Author

RobertZenz commented Mar 12, 2018

There is no output of different, I'm afraid.

pandoc --help

Crashes after printing the complete help text, curiously --version does not.

pandoc --from=lua --to=html test.markdown

Does convert a simple test file (like the one above) just fine (prints the HTML to the stdout). Adding a Lua filter (even an empty Lua file) does crash the command (prints nothing).

Running Pandoc from the Windows CMD simply gives the "has stopped working" dialog, running it from Bash (Git Bash) gives a "Segmentation fault" and exit code 139. I'm not sure what else I can tell you. Windows version is "Windows 7 6.1.7601 Service Pack 1 Build 7601".

@RobertZenz
Copy link
Author

@mb21 And yes, this seems related to #4283.

@mb21
Copy link
Collaborator

mb21 commented Mar 12, 2018

Yeah, maybe let's focus on #4283 first... seems easier to figure out why --help crashes than why --lua-filter crashes – and it might just be for the same reason.

@robinerd
Copy link

Compiled pandoc from source on Windows 7, and it resolved also this issue! So I suppose the problem is only related to the distributed exe file. See #4283 for details.

@mb21
Copy link
Collaborator

mb21 commented Mar 12, 2018

Duplicate of #4283

@mb21 mb21 marked this as a duplicate of #4283 Mar 12, 2018
@mb21 mb21 closed this as completed Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants