[Libreoffice] [PATCH] [REVIEW 3-4] application crash on exit

Noel Power nopower at suse.com
Sat Nov 12 01:49:50 PST 2011


(putting patch in subject )

Hi

We have an internal bug that happens when closing the application where 
there is a legacy format document ( e.g. something.sdd ) already open

I get the following trace

==23824== Invalid read of size 8
==23824==    at 0x10C543A0: GtkSalDisplay::EventGuardAcquire() 
(gtkdata.hxx:83)
==23824==    by 0x10C53633: GtkXLib::userEventFn(void*) (gtkdata.cxx:800)
==23824==    by 0x10C535D4: call_userEventFn (gtkdata.cxx:789)
==23824==    by 0x13538BD2: g_main_context_dispatch (in 
/lib64/libglib-2.0.so.0.2800.0)
==23824==    by 0x135393AF: ??? (in /lib64/libglib-2.0.so.0.2800.0)
==23824==    by 0x1353964F: g_main_context_iteration (in 
/lib64/libglib-2.0.so.0.2800.0)
==23824==    by 0x10C53861: GtkXLib::Yield(bool, bool) (gtkdata.cxx:868)
==23824==    by 0x10C5294A: GtkXLib::~GtkXLib() (gtkdata.cxx:577)
==23824==    by 0x10C52A37: GtkXLib::~GtkXLib() (gtkdata.cxx:587)
==23824==    by 0x1392F225: X11SalData::DeleteDisplay() (saldata.cxx:293)
==23824==    by 0x1392F108: X11SalData::~X11SalData() (saldata.cxx:286)
==23824==    by 0x10C53CEB: GtkData::~GtkData() (gtkdata.cxx:1032)
==23824==  Address 0x16002a00 is 576 bytes inside a block of size 2,296 
free'd
==23824==    at 0x4C2599C: free (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23824==    by 0x10C50897: GtkSalDisplay::~GtkSalDisplay() 
(gtkdata.cxx:110)
==23824==    by 0x1392F1ED: X11SalData::DeleteDisplay() (saldata.cxx:291)
==23824==    by 0x1392F108: X11SalData::~X11SalData() (saldata.cxx:286)
==23824==    by 0x10C53CEB: GtkData::~GtkData() (gtkdata.cxx:1032)
==23824==    by 0x10C53D1D: GtkData::~GtkData() (gtkdata.cxx:1034)
==23824==    by 0x139443E5: X11SalInstance::~X11SalInstance() 
(salinst.cxx:141)
==23824==    by 0x10C55F5D: GtkInstance::~GtkInstance() (gtkinst.cxx:187)
==23824==    by 0x10C55FB1: GtkInstance::~GtkInstance() (gtkinst.cxx:190)
==23824==    by 0x99EB564: DestroySalInstance(SalInstance*) 
(salplug.cxx:264)
==23824==    by 0x960A5C9: DeInitVCL() (svmain.cxx:566)
==23824==    by 0x96094F0: ImplSVMain() (svmain.cxx:198)

I had a patch ( that just returned immediately from GtkXLib::userEventFn 
while GtkXLib was destructing ) However now I see that this doesn't 
happen on master so after looking there I rewrote the patch be more like 
( albeit simpler ) the solution there ( which seems to be part of some 
bigger rework, for gtk3 ? )

attached is the patch, 2 version, one generated ingnoring whitespace ( 
for ease of review ) the other with whitespace for applying

since I know approximately zero about gtk stuff, appreciate wiser heads 
having a look

thanks,
Noel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: doc-close-gtk-crash.diff
Type: text/x-patch
Size: 1681 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111112/20ae9de8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doc-close-gtk-crash-ignorews.diff
Type: text/x-patch
Size: 1000 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111112/20ae9de8/attachment-0001.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Attached Message Part
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111112/20ae9de8/attachment.txt>


More information about the LibreOffice mailing list