GNOME Bugzilla – Bug 737365
evince: regression: traps: evince[25787] general protection fault
Last modified: 2014-09-27 13:46:27 UTC
Created attachment 287077 [details] Backtrace [I initially reported this on Debian http://bugs.debian.org/762806] Opening a PDF a second time; or rebuilding the PDF, causes evince to crash with a general protection fault (in almost all cases, sometimes it works). traps: evince[25787] general protection ip:7f2af00e6c8d sp:7fff3a933378 error:0 in libgobject-2.0.so.0.4200.0[7f2af00b6000+51000] This did not happen in 3.12, but happened in all 3.13 release(s?) I tried and the 3.14 one. Versions of packages evince depends on: ii evince-common 3.14.0-1 ii gnome-icon-theme-symbolic 3.12.0-1 ii libatk1.0-0 2.12.0-1 ii libc6 2.19-11 ii libcairo-gobject2 1.12.16-5 ii libcairo2 1.12.16-5 ii libevdocument3-4 3.14.0-1 ii libevview3-3 3.14.0-1 ii libgdk-pixbuf2.0-0 2.30.8-1 ii libglib2.0-0 2.42.0-1 ii libgtk-3-0 3.14.0-1 ii libnautilus-extension1a 3.14.0-1 ii libpango-1.0-0 1.36.7-1 ii libpangocairo-1.0-0 1.36.7-1 ii libsecret-1-0 0.18-1 ii libxml2 2.9.1+dfsg1-4 ii shared-mime-info 1.3-1 ii zlib1g 1:1.2.8.dfsg-2
(gdb) backtrace full
+ Trace 234126
Thread 1 (Thread 0x7ffff7fb9980 (LWP 29445))
Could you please attach a test pdf file? this is dependent on fht filename and on the pdf metadata, so I can't reproduce the crash here.
Created attachment 287083 [details] PDF to reproduce Here's a PDF to reproduce it
ups.. :( Ok, thanks for the file. Will fix it as soon as possible, and we will need to make a new release.
Created attachment 287095 [details] [review] shell: window-title needs to hold a reference to document Otherwise the document pointer may become invalid during document reloading.
The patch should fix the bug. We are setting the document pointer without adding to the ref-count. Thus, the pointer is becoming invalid in some situations, notably when reloading the document.
*** Bug 737105 has been marked as a duplicate of this bug. ***
I am happy to confirm that this patch fixes the bug.
Review of attachment 287095 [details] [review]: This is not correct, you are keeping a reference for an old document that you are never releasing. So, I don't see why to keep the old document alive, and even less leaked :-) I think we could use a wek ref to clean up both, the document and doc_title when the document is destroyed.
Created attachment 287234 [details] [review] window-title: Keep a weak ref on the document Could you confirm this fixes the crash?
Review of attachment 287234 [details] [review]: This patch fixes the issue.
(In reply to comment #11) > Review of attachment 287234 [details] [review]: > > This patch fixes the issue. Thanks for checking, I've just pushed it.