phyllisstein / Pandown

A powerful, versatile, highly Subliminal Pandoc build wrapper for ST2/3
64 stars 12 forks source link

Pandown freezes sublime #9

Closed cameronraysmith closed 10 years ago

cameronraysmith commented 10 years ago

Ubuntu 12.04.3 Sublime Text 2 Build 2221 Pandoc 1.12.1 installed through cabal Pandown installed through Package Control

jareciog commented 10 years ago

Same issue: Ubuntu 12.04 64-bit Sublime Text 2 Build 2221 Pandoc 1.9.1.1 installed through ubuntu main repository Pandown installed through git and package control

Thanks for you great work!

phyllisstein commented 10 years ago

Hi guys, I apologize for having taken so long to look into this. As this isn't happening on OS X, I'm downloading VMWare Fusion and an Ubuntu ISO now; in the meantime, it'd be helpful to know a couple of things: first off, does the crash occur as soon as you install the package or open Sublime, or when you try to build, or what? Is the file one that you've saved, or are you trying to use the "Build to Window" widget? Are you building Markdown to HTML, or something else? And finally, if you run the problem command with the Sublime console open (I think it's summoned with Ctrl+` on PCs), can you catch any errors before the crash? Thanks---the more you can tell me, the better. I'll see if I can figure anything out in the meantime.

Daniel

P.S.: As the README mentions, @jareciog, the package is officially built to work with Pandoc v1.10. The command-line switches changed pretty dramatically with that update, as I recall. So it's not impossible that that's part of the problem. But I'm running 1.12.2.1 locally, @cameronraysmith, so I likely have only myself to blame for your crash.

phyllisstein commented 10 years ago

I've been unable to reproduce this on Ubuntu 12.04.3. Using an incompatible version of Pandoc (i.e., 1.9.1.1), the build commands simply failed; using the latest version, building Markdown to HTML worked just as expected. Neither crashed Sublime. So I'm flying blind here, meaning it'd be a great help to know some of the info I listed above. It also occurred to me that you might try adding "PANDOWN_DEBUG": true to your settings before building with the console open to increase the logging verbosity.

jareciog commented 10 years ago

Hi Daniel. I have installed pandoc through cabal and it wasn't the problem. I still have the same error. When I kill sublime I always get the following message in shell: pandoc: : hGetBuf: hardware fault (Input/output error) It seems pandoc can't read the source file.... I have tested different filesystems (ntfs, ext,...) and it is not the problem.

There is no message in console. Let me know if you need more debug info.

Thanks again for your help. Juan

jareciog commented 10 years ago

Hi again. I think I have found the problem. Listing processes after freeze I get: 16692 pts/0 Sl+ 0:00 | | _ ./sublimetext 16706 pts/0 S+ 0:00 | | /bin/sh -c pandoc --version 16707 pts/0 S+ 0:00 | | _ pandoc

The execution of /bin/sh -c pandoc --version is not correct and makes pandoc to wait for input. You need to quote the whole command: /bin/sh -c "pandoc --version"

I hope this helps. Juan.

jareciog commented 10 years ago

Hi again. Changing output = subprocess.check_call(cmd, env=env, shell=True) to output = subprocess.check_call(cmd, env=env, shell=False) at line 139 in file pandownBuildCommand.py solves the problem.

Cheers, Juan

phyllisstein commented 10 years ago

Well spotted! Thanks for spending so much time looking into that. I'm about to push a fix; it'll be on Github immediately, natch, and Package Control should notice shortly.