GNOME Bugzilla – Bug 630845
synctex_backward_search causes segfault (SIGSEGV)
Last modified: 2010-09-30 15:36:16 UTC
Running beta release of ubuntu 2010-09-28 in virtualbox, ctrl-clicking in synctex-enabled pdf document causes evince to segfault. Here is the gdb stacktrace: ----------------- Start of GDB output ------------------------- gdb evince GNU gdb (GDB) 7.2-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/evince... warning: the debug information found in "/usr/lib/debug//usr/bin/evince" does not match "/usr/bin/evince" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/usr/bin/evince" does not match "/usr/bin/evince" (CRC mismatch). (no debugging symbols found)...done. (gdb) run main.pdf Starting program: /usr/bin/evince main.pdf [Thread debugging using libthread_db enabled] [New Thread 0x7f192c20f710 (LWP 1671)] [New Thread 0x7f192ba0e710 (LWP 1672)] [New Thread 0x7f192b20d710 (LWP 1673)] [New Thread 0x7f19298a7710 (LWP 1674)] [New Thread 0x7f192378c710 (LWP 1675)] [Thread 0x7f192ba0e710 (LWP 1672) exited] [Thread 0x7f192b20d710 (LWP 1673) exited] (evince:1668): GLib-CRITICAL **: g_variant_new_string: assertion `string != NULL' failed Program received signal SIGSEGV, Segmentation fault. 0x00007f1932312560 in ?? () from /lib/libglib-2.0.so.0 (gdb) backtrace
+ Trace 223929
Thanks for reporting this. I can't reproduce the crash. Does it happen with every synctex-enabled pdf file? Does it happen every time you ctrl-click in Evince?
It doesnt happen everytime in every synctex-enabled pdf file. It happens only in some areas of the pdf file. Maybe it's when synctex fails to find the source file. This pdf-file can generate the crash. http://dl.dropbox.com/u/198449/main.pdf http://dl.dropbox.com/u/198449/main.synctex.gz (I had to put it on dropbox, because the files are too big for an attachment) Steps to reproduce: Download main.pdf and main.synctex.gz to the same folder. Open main.pdf in evince and go to page label 43 (absolute page 53) and ctrl-click the text and you should get a crash.
Peter, Thanks you for the useful files and steps to reproduce. I get the crash now, so hopefully I will attach a patch soon.
Created attachment 171345 [details] [review] patch fixing the issue The attached patch fixes the crash. The patch is done to be applied to the gnome-2-32 branch. More info about the issue. I was assuming that the synctex parser ALWAYS return an input_file + line + col when you do a backward_search. In test case provided, this is not true, and this is an issue in the synctex parser itself. So it would be good if you could forward the issue to synctex developer. (just try to do synctex -o 52:300:200:main.pdf in your file to see that the synctex parser does not perform the backward search).
Review of attachment 171345 [details] [review]: Pushed to gnome-2-32 and master branches.
Peter, thanks for reporting, the fix will be available in the next release of Evince.