Open tinloaf opened 11 years ago
Oh, this seems PDF-specific. With some other PDF, it works. If you give me your email address, I'll send you the 'bad' PDF (generated by pdflatex..)
My best guess is that a call of PNG.Engine.retrieve() has an out-of-bounds argument, and we're reading beyond the end of storage. Note that storage has length metadata.get_slide_count() == metadata.page_count. PNG.Engine.retrieve() is being called by Overview._fill_previews(), which is getting page numbers from metadata.user_slide_to_real_slide(). This in turn, is trying to use metadata.user_view_indexes if possible, but will return metadata.page_count if something goes wrong. Since Vala is 0-indexed, this is an invalid index for storage.
What I don't know is how to fix this. Is metadata.user_slide_to_real_slide() returning an invalid page number as a mistake, or is it a flag for us to notice something's gone wrong? And for that matter, what happened to metadata.user_view_indices to mess things up?
It's possible that the problem isn't in the PDF file, but in the associated pdfpc file, which can store information on skipped slides, among other things. If your presentation is pres.pdf, you may also have a file in the same directory named pres.pdfpc. If so, try renaming that file, launching pdfpc again, and seeing if it seg faults. If this fixes it, please paste the pdfpc file here, and tell us how many pages (both real and logical, if different) the PDF has.
If that isn't the problem, you can send the PDF file to me (rschroll at gmail), and I'll see if I can reproduce it.
Just came back from my holidays. Try what rschroll suggested. If not, please send the pdf file also to davvil at gmail.
Oh, sorry, somehow I had not seen your updates here. You were correct, the .pdfpc file was the problem, removing it helps. Thanks a lot! I'll probably leave this open, since it still is a bug, right?
Definitely still a bug. If you still have the offending pdfpc file, could you post it here. It might also help if you can include information about the number of pages in the PDF file.
I believe I ran into the same bug. The .pdfpc file was not the issue as it did not exist yet (no notes saved). A quick workaround is to disable caching with --disable-cache.
Hello, i have also a problem with a segfault. The problem arises when i try to open a non-existent pdf-file.
user@computer /tmp % pdf-presenter-console LATEX_Presentation-TUG-SPSC.pdf
pdfpc v3.1.1
(C) 2012 David Vilar
(C) 2009-2011 Jakob Westhoff
Initializing rendering...
Error: Couldn't open file '/tmp/LATEX_Presentation-TUG-SPSC.pdf': No such file or directory.
** (pdf-presenter-console:6656): ERROR **: pdf.vala:462: Unable to open pdf file: No such file or directory
[1] 6656 trace trap (core dumped) pdf-presenter-console LATEX_Presentation-TUG-SPSC.pdf
user@computer /tmp % ls LATEX_Presentation-TUG-SPSC.pdf
ls: cannot access LATEX_Presentation-TUG-SPSC.pdf: No such file or directory
Hi,
pdfpc gives me a segfault when starting, right after prerendering is done.
The console output is this:
================== snip ===================== pdfpc v3.1.1 (C) 2012 David Vilar (C) 2009-2011 Jakob Westhoff
Initializing rendering...
(pdfpc:27306): Gdk-CRITICAL **: IA__gdk_pixbuf_get_from_drawable: assertion `src != NULL' failed
(pdfpc:27306): Gdk-CRITICAL **: IA__gdk_pixbuf_get_from_drawable: assertion `src != NULL' failed
Program received signal SIGSEGV, Segmentation fault. ================== snip =====================
Here is the (short) backtrace from GDB:
================== snip ===================== (gdb) bt
0 0x00007ffff7ba1d69 in g_object_ref () from /usr/lib/libgobject-2.0.so.0
1 0x000000000042d506 in _g_object_ref0 (self=0x21)
2 0x000000000042d9f8 in pdfpc_renderer_cache_png_engine_real_retrieve (base=0x97ead0, index=5)
3 0x000000000042e659 in pdfpc_renderer_cache_base_retrieve (self=0x97ead0, index=5)
4 0x00000000004343ac in _pdfpc_window_overview_fill_previews (self=0x951050)
5 0x000000000043406e in __pdfpc_window_overview_fill_previews_gsource_func (self=0x951050)
6 0x00007ffff78de845 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
7 0x00007ffff78deb78 in ?? () from /usr/lib/libglib-2.0.so.0
8 0x00007ffff78def72 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
9 0x00007ffff68b4727 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
10 0x000000000043c480 in pdfpc_application_run (self=0x65e400, args=0x7fffffffe708, args_length1=2)
11 0x000000000043c552 in pdfpc_application_main (args=0x7fffffffe708, args_length1=2)
12 0x000000000043c5a8 in main (argc=2, argv=0x7fffffffe708)
================== snip =====================
The full backtrace is rather long, so I used a pastebin:
http://pastebin.com/fjJ4MYX5
I hope you can make some sense of this. :)
Thanks for the great software, Lukas