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

Crash in page_set_function when EPUB navMap refers to missing file #599

Closed
correctmost opened this issue Jan 8, 2024 · 0 comments · Fixed by #600
Closed

Crash in page_set_function when EPUB navMap refers to missing file #599

correctmost opened this issue Jan 8, 2024 · 0 comments · Fixed by #600

Comments

@correctmost
Copy link
Contributor

Expected behaviour

Atril opens the linked EPUB

Actual behaviour

Atril crashes when opening the linked EPUB

Steps to reproduce the behaviour

Backtrace
Thread 16 "EvJobScheduler" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd2ffd6c0 (LWP 4643)]
page_set_function (Link=0x7fffbc00bbf0, contentList=0x7fffbc00b660 = {...}) at /usr/src/debug/atril/atril-1.26.1/backend/epub/epub-document.c:1617
1617            pagedata = listiter->data;                                                                                                                                                                                                    
(gdb) p listiter
$1 = 0x0
(gdb) bt
#0  page_set_function (Link=0x7fffbc00bbf0, contentList=0x7fffbc00b660 = {...}) at /usr/src/debug/atril/atril-1.26.1/backend/epub/epub-document.c:1617
#1  0x00007ffff706dcd0 in g_list_foreach (list=<optimized out>, func=func@entry=0x7fffe043ddb0 <page_set_function>, user_data=user_data@entry=0x7fffbc00b660) at ../glib/glib/glist.c:1092
#2  0x00007fffe044190d in epub_document_set_index_pages (contentList=0x7fffbc00b660 = {...}, index=<optimized out>) at /usr/src/debug/atril/atril-1.26.1/backend/epub/epub-document.c:1636
#3  epub_document_load (document=<optimized out>, uri=<optimized out>, error=0x7fffd2ffc1a0) at /usr/src/debug/atril/atril-1.26.1/backend/epub/epub-document.c:1762
#4  0x00007ffff7f71048 in ev_document_load (document=document@entry=0x7fffbc0066f0, uri=uri@entry=0x555555a03d60 "file:///home/s/Downloads/crash.epub", error=error@entry=0x7fffd2ffc210)
    at /usr/src/debug/atril/atril-1.26.1/libdocument/ev-document.c:236
#5  0x00007ffff7f71c75 in ev_document_factory_get_document (uri=0x555555a03d60 "file:///home/s/Downloads/crash.epub", error=error@entry=0x7fffd2ffc260) at /usr/src/debug/atril/atril-1.26.1/libdocument/ev-document-factory.c:235
#6  0x00007ffff7f2372d in ev_job_load_run (job=0x5555559ed7e0) at /usr/src/debug/atril/atril-1.26.1/libview/ev-jobs.c:1122
#7  0x00007ffff7f22659 in ev_job_thread (job=0x5555559ed7e0) at /usr/src/debug/atril/atril-1.26.1/libview/ev-job-scheduler.c:184
#8  ev_job_thread_proxy (data=<optimized out>) at /usr/src/debug/atril/atril-1.26.1/libview/ev-job-scheduler.c:217
#9  0x00007ffff70a4a05 in g_thread_proxy (data=0x5555559fe210) at ../glib/glib/gthread.c:831
#10 0x00007ffff6dd69eb in start_thread (arg=<optimized out>) at pthread_create.c:444
#11 0x00007ffff6e5a7cc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Atril can open the EPUB if I delete this code from OEBPS/toc.ncx (coverpage.xhtml does not exist):

<navPoint id="navpoint-coverpage" playOrder="0">
	<navLabel>
		<text>Cover Page</text>
	</navLabel>
	<content src="Text/coverpage.xhtml" />
</navPoint>

MATE general version

mate-desktop 1.26.2-1

Package version

atril 1.26.1-1

Linux Distribution

Arch

Link to bugreport of your Distribution (requirement)

N/A

correctmost added a commit to correctmost/atril that referenced this issue Jan 8, 2024
This commit also fixes an incorrect sizeof call detected by
AddressSanitizer.

Closes mate-desktop#599
raveit65 pushed a commit to correctmost/atril that referenced this issue Jan 31, 2024
This commit also fixes an incorrect sizeof call detected by
AddressSanitizer.

Closes mate-desktop#599
raveit65 pushed a commit that referenced this issue Jan 31, 2024
This commit also fixes an incorrect sizeof call detected by
AddressSanitizer.

Closes #599
raveit65 pushed a commit that referenced this issue Jan 31, 2024
This commit also fixes an incorrect sizeof call detected by
AddressSanitizer.

Closes #599
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

Successfully merging a pull request may close this issue.

1 participant