FS#74162 - pandoc hangs/explodes on .odp files

Attached to Project: Community Packages
Opened by Ng Oon-Ee (ngoonee) - Saturday, 19 March 2022, 02:31 GMT
Last edited by Caleb Maclennan (alerque) - Monday, 02 May 2022, 08:48 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Caleb Maclennan (alerque)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Running pandoc on .odp/.ods files hangs with constantly increasing ram usage (and 100% CPU). Does not happen on other filetypes I've tried (.docx, .odt, .csv, .pptx). I first noticed this after an update today, pandoc gets automatically called by ranger with -s and and -t markdown (but same thing happens without these flags)

Additional info:
* package version(s)
pandoc-2.15-4
* config and/or log files etc.
Never been configured by me, and happens with a simple `pandoc file.odp` without any flags too
* link to upstream bug report, if any
As it is only happening with the recent update I haven't reported upstream, in case its a simple packaging issue with Arch.

Steps to reproduce:
Fully update system (including afore-mentioned version of pandoc). Run pandoc on any odp or ods file.
This task depends upon

Closed by  Caleb Maclennan (alerque)
Monday, 02 May 2022, 08:48 GMT
Reason for closing:  Upstream
Additional comments about closing:  Actual bug is in ranger uspstream, not pandoc or Arch's packaging.
Comment by A. Bosch (progandy) - Saturday, 19 March 2022, 14:00 GMT
pandoc does not recognize the odp format and treats it as latin1 encoded markdown. The markdown parser then chokes on the gibberish it receives.

$ pandoc -t html /tmp/test.odp
[WARNING] Could not deduce format from file extension .odp
Defaulting to markdown
[WARNING] /tmp/test.odp is not UTF-8 encoded: falling back to latin1.

I was able to reproduce it using the binary from https://aur.archlinux.org/packages/pandoc-bin
Comment by Ng Oon-Ee (ngoonee) - Saturday, 19 March 2022, 22:31 GMT
Thanks for confirmation progandy. I have filed an upstream bug report - https://github.com/jgm/pandoc/issues/7973
Comment by Ng Oon-Ee (ngoonee) - Sunday, 20 March 2022, 23:27 GMT
Upstream for pandoc has closed as not-a-bug, the new upstream bug report should now be https://github.com/ranger/ranger/issues/2594
Comment by Ng Oon-Ee (ngoonee) - Tuesday, 22 March 2022, 12:09 GMT
ranger has already fixed their scope.sh in master (but haven't released anything since 2019). As its a simple config file change, I think this can be closed?
Comment by Caleb Maclennan (alerque) - Monday, 02 May 2022, 08:47 GMT
I'm closing this because it is not an Arch bug or anything that the Pandoc packaging can fix. The correct fix looks like it is already going into ranger and Arch getting fixed will depend on them cutting a release.

Loading...