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

Adding a header with only a space causes a segmentation fault #27

Closed
dldx opened this issue Aug 15, 2024 · 2 comments
Closed

Adding a header with only a space causes a segmentation fault #27

dldx opened this issue Aug 15, 2024 · 2 comments

Comments

@dldx
Copy link

dldx commented Aug 15, 2024

Thanks for this very helpful package!

I just noticed a very strange bug occuring due to pymupdf.

The following sample code causes a segmentation fault:

from markdown_pdf import MarkdownPdf, Section
pdf = MarkdownPdf(toc_level=2)
pdf.add_section(Section("# "))

Result with gdb:

Starting program: ./venv/bin/python test.py

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Downloading separate debug info for ./venv/lib/python3.11/site-packages/fitz/_extra.cpython-311-x86_64-linux-gnu.so
Downloading separate debug info for ./venv/lib/python3.11/site-packages/fitz/libmupdf.so.24.1                                                                                 
Downloading separate debug info for ./venv/lib/python3.11/site-packages/fitz/libmupdfcpp.so.24.1                                                                              
Downloading separate debug info for ./venv/lib/python3.11/site-packages/fitz/_mupdf.so                                                                                        
                                                                                                                                                                                                                        
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff56e5ad2 in ?? () from ./venv/lib/python3.11/site-packages/fitz/libmupdf.so.24.1

The bug appears to be in the fitz package but I'm unsure where to file it.

Cheers

@vb64
Copy link
Owner

vb64 commented Jan 8, 2025

Thanks for bug report.

More detailed description for this bug is here:

#38

@vb64
Copy link
Owner

vb64 commented Jan 8, 2025

Fixed in version 1.3.3. Please, update your installation.

@vb64 vb64 closed this as completed Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants