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

gppdf from package segfaults on opening PDF #3

Open
pevik opened this issue Jul 4, 2022 · 2 comments
Open

gppdf from package segfaults on opening PDF #3

pevik opened this issue Jul 4, 2022 · 2 comments

Comments

@pevik
Copy link

pevik commented Jul 4, 2022

$ gppdf /tmp/file.pdf 
*** gfxprim: gp_blit.c:41: in gp_blit_xyxy: check failed: x2 + (x1 - x0) < (gp_coord) gp_pixmap_w(dst)
 

C stack trace (most recent call first):
/lib64/libgfxprim.so.1(gp_debug_print_cstack+0x1b)[0x7feab3773c4b]
/lib64/libgfxprim.so.1(gp_print_abort_info+0x103)[0x7feab3773da3]
/lib64/libgfxprim.so.1(gp_blit_xyxy+0xe8)[0x7feab3773798]
/lib64/libgfxprim-widgets.so.1(+0x1cda5)[0x7feab371dda5]
/lib64/libgfxprim-widgets.so.1(gp_widget_ops_render+0x123)[0x7feab371bc13]
/lib64/libgfxprim-widgets.so.1(+0x13bb0)[0x7feab3714bb0]
/lib64/libgfxprim-widgets.so.1(gp_widget_ops_render+0x123)[0x7feab371bc13]
/lib64/libgfxprim-widgets.so.1(gp_widget_render+0x83)[0x7feab371bf03]
/lib64/libgfxprim-widgets.so.1(gp_widgets_event+0x1e4)[0x7feab371f984]
/lib64/libgfxprim-widgets.so.1(gp_widgets_process_events+0x18)[0x7feab371fce8]
/lib64/libgfxprim-widgets.so.1(+0x1eef0)[0x7feab371fef0]
/lib64/libgfxprim.so.1(gp_fds_poll+0x8a)[0x7feab37fec6a]
/lib64/libgfxprim-widgets.so.1(gp_widgets_main_loop+0xbe)[0x7feab371fe6e]
./gppdf[0x4023f6]
/lib64/libc.so.6(+0x405b0)[0x7feab04405b0]
/lib64/libc.so.6(__libc_start_main+0x8b)[0x7feab0440679]
./gppdf(_start+0x25)[0x402425]
Aborted (core dumped)

$ strace ./gppdf /tmp/file.pdf
...
close(5)                                = 0
mprotect(0x7fe69aa97000, 4096, PROT_READ) = 0
munmap(0x7fe69a6f9000, 171807)          = 0
futex(0x7fe69aa98070, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "\nC stack trace (most recent call"..., 41
C stack trace (most recent call first):
) = 41
writev(2, [{iov_base="/lib64/libgfxprim.so.1", iov_len=22}, {iov_base="(", iov_len=1}, {iov_base="gp_debug_print_cstack", iov_len=21}, {iov_base="+0x", iov_len=3}, {iov_base="1b", iov_len=2}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec73c4b", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libgfxprim.so.1(gp_debug_print_cstack+0x1b)[0x7fe69ec73c4b]
) = 67
writev(2, [{iov_base="/lib64/libgfxprim.so.1", iov_len=22}, {iov_base="(", iov_len=1}, {iov_base="gp_print_abort_info", iov_len=19}, {iov_base="+0x", iov_len=3}, {iov_base="103", iov_len=3}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec73da3", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libgfxprim.so.1(gp_print_abort_info+0x103)[0x7fe69ec73da3]
) = 66
writev(2, [{iov_base="/lib64/libgfxprim.so.1", iov_len=22}, {iov_base="(", iov_len=1}, {iov_base="gp_blit_xyxy", iov_len=12}, {iov_base="+0x", iov_len=3}, {iov_base="e8", iov_len=2}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec73798", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libgfxprim.so.1(gp_blit_xyxy+0xe8)[0x7fe69ec73798]
) = 58
writev(2, [{iov_base="/lib64/libgfxprim-widgets.so.1", iov_len=30}, {iov_base="(", iov_len=1}, {iov_base="+0x", iov_len=3}, {iov_base="1cda5", iov_len=5}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec1dda5", iov_len=12}, {iov_base="]\n", iov_len=2}], 8/lib64/libgfxprim-widgets.so.1(+0x1cda5)[0x7fe69ec1dda5]
) = 57
writev(2, [{iov_base="/lib64/libgfxprim-widgets.so.1", iov_len=30}, {iov_base="(", iov_len=1}, {iov_base="gp_widget_ops_render", iov_len=20}, {iov_base="+0x", iov_len=3}, {iov_base="123", iov_len=3}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec1bc13", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libgfxprim-widgets.so.1(gp_widget_ops_render+0x123)[0x7fe69ec1bc13]
) = 75
writev(2, [{iov_base="/lib64/libgfxprim-widgets.so.1", iov_len=30}, {iov_base="(", iov_len=1}, {iov_base="+0x", iov_len=3}, {iov_base="13bb0", iov_len=5}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec14bb0", iov_len=12}, {iov_base="]\n", iov_len=2}], 8/lib64/libgfxprim-widgets.so.1(+0x13bb0)[0x7fe69ec14bb0]
) = 57
writev(2, [{iov_base="/lib64/libgfxprim-widgets.so.1", iov_len=30}, {iov_base="(", iov_len=1}, {iov_base="gp_widget_ops_render", iov_len=20}, {iov_base="+0x", iov_len=3}, {iov_base="123", iov_len=3}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec1bc13", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libgfxprim-widgets.so.1(gp_widget_ops_render+0x123)[0x7fe69ec1bc13]
) = 75
writev(2, [{iov_base="/lib64/libgfxprim-widgets.so.1", iov_len=30}, {iov_base="(", iov_len=1}, {iov_base="gp_widget_render", iov_len=16}, {iov_base="+0x", iov_len=3}, {iov_base="83", iov_len=2}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec1bf03", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libgfxprim-widgets.so.1(gp_widget_render+0x83)[0x7fe69ec1bf03]
) = 70
writev(2, [{iov_base="/lib64/libgfxprim-widgets.so.1", iov_len=30}, {iov_base="(", iov_len=1}, {iov_base="gp_widgets_event", iov_len=16}, {iov_base="+0x", iov_len=3}, {iov_base="1e4", iov_len=3}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec1f984", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libgfxprim-widgets.so.1(gp_widgets_event+0x1e4)[0x7fe69ec1f984]
) = 71
writev(2, [{iov_base="/lib64/libgfxprim-widgets.so.1", iov_len=30}, {iov_base="(", iov_len=1}, {iov_base="gp_widgets_process_events", iov_len=25}, {iov_base="+0x", iov_len=3}, {iov_base="18", iov_len=2}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec1fce8", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libgfxprim-widgets.so.1(gp_widgets_process_events+0x18)[0x7fe69ec1fce8]
) = 79
writev(2, [{iov_base="/lib64/libgfxprim-widgets.so.1", iov_len=30}, {iov_base="(", iov_len=1}, {iov_base="+0x", iov_len=3}, {iov_base="1eef0", iov_len=5}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec1fef0", iov_len=12}, {iov_base="]\n", iov_len=2}], 8/lib64/libgfxprim-widgets.so.1(+0x1eef0)[0x7fe69ec1fef0]
) = 57
writev(2, [{iov_base="/lib64/libgfxprim.so.1", iov_len=22}, {iov_base="(", iov_len=1}, {iov_base="gp_fds_poll", iov_len=11}, {iov_base="+0x", iov_len=3}, {iov_base="8a", iov_len=2}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ecfec6a", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libgfxprim.so.1(gp_fds_poll+0x8a)[0x7fe69ecfec6a]
) = 57
writev(2, [{iov_base="/lib64/libgfxprim-widgets.so.1", iov_len=30}, {iov_base="(", iov_len=1}, {iov_base="gp_widgets_main_loop", iov_len=20}, {iov_base="+0x", iov_len=3}, {iov_base="be", iov_len=2}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69ec1fe6e", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libgfxprim-widgets.so.1(gp_widgets_main_loop+0xbe)[0x7fe69ec1fe6e]
) = 74
writev(2, [{iov_base="./gppdf", iov_len=7}, {iov_base="[0x", iov_len=3}, {iov_base="4023f6", iov_len=6}, {iov_base="]\n", iov_len=2}], 4./gppdf[0x4023f6]
) = 18
writev(2, [{iov_base="/lib64/libc.so.6", iov_len=16}, {iov_base="(", iov_len=1}, {iov_base="+0x", iov_len=3}, {iov_base="405b0", iov_len=5}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69b8405b0", iov_len=12}, {iov_base="]\n", iov_len=2}], 8/lib64/libc.so.6(+0x405b0)[0x7fe69b8405b0]
) = 43
writev(2, [{iov_base="/lib64/libc.so.6", iov_len=16}, {iov_base="(", iov_len=1}, {iov_base="__libc_start_main", iov_len=17}, {iov_base="+0x", iov_len=3}, {iov_base="8b", iov_len=2}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="7fe69b840679", iov_len=12}, {iov_base="]\n", iov_len=2}], 9/lib64/libc.so.6(__libc_start_main+0x8b)[0x7fe69b840679]
) = 57
writev(2, [{iov_base="./gppdf", iov_len=7}, {iov_base="(", iov_len=1}, {iov_base="_start", iov_len=6}, {iov_base="+0x", iov_len=3}, {iov_base="25", iov_len=2}, {iov_base=")", iov_len=1}, {iov_base="[0x", iov_len=3}, {iov_base="402425", iov_len=6}, {iov_base="]\n", iov_len=2}], 9./gppdf(_start+0x25)[0x402425]
) = 31
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
gettid()                                = 2858
getpid()                                = 2858
tgkill(2858, 2858, SIGABRT)             = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=2858, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++
Aborted (core dumped)

The problem is with several PDF files. Actually I haven't been able to open any PDF file. I used packaged versions of libgfxprim.so.1 and libmupdf.so.1, I also tested packaged version (https://build.opensuse.org/package/show/home:metan/gppdf).

@metan-ucw
Copy link
Member

This should be fixed by gfxprim/gfxprim@22ef191, the problem was that after return from a dialog (for instance open file dialog) the layout wasn't recalculated properly.

Please try latest git or gfxprim library packages, the commit should be there.

@metan-ucw
Copy link
Member

Can you please retest?

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