Rendering of bookdown book fails with pandoc error code 137 - pandoc

I am rendering a book with bookdown to PDF, that uses pandoc under the hood.
The rendering fails with:
"pandoc document conversion failed with error 137"
I cannot find out what the error stands for.
Any ideas?

It's an "Out of memory" error. The only solutions I'm aware of are reducing document size or getting more RAM.

Related

What is "JIT must be enabled" error while using MATLAB?

I am trying to execute a piece of code which takes fast curvelet transform using 32-bit MATLAB and toolbox in this website. When I execute the line reconstructing signal from its curvelet coefficients, it shows an error:
the line making this error has a break point in the image above. Any of the three choices in this error message results in termination of whole MATLAB program.
Does anyone know how to fix this?

Pdftk heap sections error when over 512Mb memory

I use pdftk server to automate various tasks. Recently I ran into a problem where pdftk crashed while merging a large number of pdfs with the error window:
Fatal error in gc: Too many heap sections
After receiving this error I've run some tests to confirm that this same error will happen, regardless of what task pdftk is doing on pdfs, when its memory usage exceeds 512Mb.
I was hoping someone could help me understand what this error means, and if there's a way to set up pdftk to handle these larger jobs?
If it's just a limitation of the program, does anyone have a suggestion for a similarly functioning program without this limitation?
I used pdftk for dumping data, such as bookmarks/contents. It is very useful.
However, I met similar problems.
Ghostscript may be helpful.
Ghostscript can change original PDF file into newer one, and decrease its size.
Ghostscript also split 1 large PDF file into smaller PDF files.
My commands are:
gswin64c -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dBATCH -dQUIET -dNOPAUSE -dDOPDFMARKS -dFirstPage=(some number) -dLastPage=(some number) -sOutputFile=newfile.pdf originalfile.pdf
Parameters such as -dFirstPage=(some number) -dLastPage=(some number) may be skipped if the transformed PDF file is small enough
I wish the above could be helpful
So I know it's not perfect, but I just wrote my own implementation using iTextSharp to fulfill my requirements. If anyone else runs into this post and needs it, it's available at this github link under the AGPL license.

How to run PATCHMATCH source code

I would like to inpaint one image with a corrupted part using the patches of another image. in the link below, the authors of PATCHMATCH algorithm has provided the users with the source code. PATCHMATCH algorithm tries to find the nearest patch in the second image to fill the corrupted patches in the first image.
main page of the paper with source code:
http://gfx.cs.princeton.edu/pubs/Barnes_2009_PAR/index.php
and the link of source code:
http://www.cs.princeton.edu/gfx/pubs/Barnes_2009_PAR/patchmatch-2.1.zip
My problem is that I followed the instruction in the readme.txt file and ran build_unix.sh in terminal of Ubuntu 14.04 LTS,but got an error which says:
Unknown MEX argument '-inline'.
Unknown MEX argument '-inline'.
I removed -inline and execute the bash file in terminal and fortunately it worked and got this message:
MEX completed successfully.
MEX completed successfully.
Now my question is how to use this code to inpaint one image corrupted partially by using another image which comes from the same class (e.g.class)
For example:
I do really appreciate it if you could help me out of this problem. I am really in the need of help and have to make this source code run.
I will provide you with more information if needed.
Update: I have come up with an inpainting algorithm using Convolutional Neural Networks, which you can see the result below, I'd like to implement patchmatch algorithm to compare my result with this algorithm. CNN only gets corrupted image as input.

Getting [Fatal error: exception Out_of_memory] using Cairo.PNG.create in OCaml

I use Cairo.PNG.create to read images in OCaml.
I get
Fatal error: exception Out_of_memory
when I try to read some images. They are 5KB, but there are images whose size is 5KB I can read. I can read bigger images(ex. 45KB), so I don't think the cause of the error is a image's size. However, I can't find common points with images I can't read except the size.
When do I get the error using Cairo.PNG.create in OCaml? I want hints to delete the error.
Something else to check is whether the images you're reading are well formed. Maybe the images describe themselves as being gigantic. I believe I've seen some rogue PNG formats where the size looks absurdly large.
Cairo.PNG.create is a thin wrapper around the C function cairo_image_surface_create_from_png. It raises Out_of_memory when the C function returns CAIRO_STATUS_NO_MEMORY. Since this is done before any memory is allocated, I do not think this is a bug in the wrapper. Could you report the result of the command file on your images?
This kinds of errors are usually a sign of memory corruption. You should look take a look at all calls to Marshal module, either direct or indirect (like input_value). They are usually cause of evil. Otherwise, the possible candidates are bugs in C-bindings. This kinds of errors are very hard to find and debug.
P.S. And, to make sure that this is indeed a memory corruption, you should look at the dmesg output. If it is not a memory corruption, then there must be notes from OOM killer, something like "killing all children, etc". But I'm pretty sure that you won't see anything like this, as applications killed with OOM usually finish with last word: "Killed".

HTK HEREST ISSUE

I'm doing some speech recognition using HTK (HMM ToolKit) and I'm getting this odd error:
ERROR [+7390] StepAlpha: Alpha prune failed sq(16) > qHi(15)
I have tried to play around with pruning but only those 15/16 would change to other numbers, I keel receiving the same error. I've even tried to disable pruning and it keeps giving me this error.
I just don't know where to look for anything, if I knew I could fix it.
this is my HERest command:
HERest -C config -I Label.mlf -t 250 100 1000 -S trainlist.scp -H hmms\0\vFloors -H hmms\0\hmm0 -M hmms\1 wordlist
I've looked into the HTK book but there is nothing about the error number 7390.
I work with the HTK toolkit off and on, but not with HEREST. I also have never seen the error that you have encountered. A quick search on the web reveals some links that may be helpful.
Link 1
Scroll to the bottom of the link above, and you see an error code like ??9?. This means that a sanity check has failed. It further says that the error has nothing to do with your code, but that the HTK itself may be faulty. I think, given that Error 7390 has not occurred any where else, and that it also fits your error code, you might want to consider re-installing HTK.
Link 2
The link above shows a lot of common errors and its causes seen when working with the HTK toolkit. The original poster has painstakingly put up errors and common conditions that cause them. Saved me a lot of effort. In my eyes, she deserves the Nobel (or something like that).
Link 3
This link gives more detailed, module by module error codes. Also worth a look.
Do let me know here how you were able to solve your problem.
HTH,
Sriram.
In my case it was related to big (15 MB) file in input data. It worked after deleting it. Run HERest with -T 1 option to see which file causes problem, then remove or split it.
You must adjust -t parameter. This error occur when pruning is failed, so with modify prune parameter. I have this problem and with -t 10 it's solved!

Resources