Firing up the XForms version of lyx under valgrind and then shutting down immediately produces the following error report.
It would be nice if we could clean this up, but I can't see anything wrong with the LyX or XForms code, which suggests bugs in the X11 routines. No doubt I've got that analysis wrong ;-) Could someone running something other than Fedora 1 repeat the exercise with current CVS of both LyX and of XForms? Regards, Angus $ valgrind --leak-check=yes --num-callers=16 ./lyx-xforms ==10542== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux. ==10542== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward. ==10542== Using valgrind-2.0.0, a program supervision framework for x86-linux. ==10542== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward. ==10542== Estimated CPU clock rate is 2678 MHz ==10542== For more details, rerun with: -v ==10542== ==10542== Syscall param write(buf) contains uninitialised or unaddressable byte(s) ==10542== at 0x6EF238: __GI___libc_write (in /lib/libc-2.3.2.so) ==10542== by 0x163DDE: _X11TransWrite (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x143EB1: (within /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x14555C: _XReply (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x12F2A3: XGetWindowAttributes (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x27FA3E: init_xpm_attributes (pixmap.c:225) ==10542== by 0x27FFAF: fl_read_pixmapfile (pixmap.c:426) ==10542== by 0x280161: fl_set_pixmap_file (pixmap.c:466) ==10542== by 0x8268190: XFormsToolbar::add(FuncRequest const&, std::string const&) (basic_string.h:717) ==10542== by 0x8267823: XFormsToolbar::XFormsToolbar(ToolbarBackend::Toolbar const&, LyXView&) (stl_iterator.h:605) ==10542== by 0x8266DEA: make_toolbar(ToolbarBackend::Toolbar const&, LyXView&) (shared_ptr.hpp:125) ==10542== by 0x81EF716: Toolbars::add(ToolbarBackend::Toolbar const&) (Toolbars.C:115) ==10542== by 0x81EF4F2: Toolbars::init() (stl_iterator.h:602) ==10542== by 0x826C014: XFormsView::XFormsView(int, int) (LyXView.h:83) ==10542== by 0x81F21DF: lyx_gui::start(std::string const&, std::vector<std::string, std::allocator<std::string> > const&) (shared_ptr.hpp:125) ==10542== by 0x80D9AEE: LyX::priv_exec(int&, char**) (lyx_main.C:258) ==10542== Address 0x1E7113A is 1106 bytes inside a block of size 2048 alloc'd ==10542== at 0xBAC7CF: calloc (vg_replace_malloc.c:284) ==10542== by 0x135D0C: XOpenDisplay (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x26A2EA: fl_initialize (flresource.c:838) ==10542== by 0x81F17EB: lyx_gui::parse_init(int&, char**) (lyx_gui.C:162) ==10542== by 0x80D9269: LyX::priv_exec(int&, char**) (lyx_main.C:190) ==10542== by 0x80D8F7D: LyX::exec(int&, char**) (scoped_ptr.hpp:94) ==10542== by 0x805408D: main (main.C:42) ==10542== by 0x633BBE: __libc_start_main (in /lib/libc-2.3.2.so) ==10542== by 0x8053FB4: (within /home/angus/lyx/devel/build/src/lyx-xforms) ==10542== ==10542== Syscall param writev(vector[...]) contains uninitialised or unaddressable byte(s) ==10542== at 0x36CF6A: vgAllRoadsLeadToRome_writev (vg_intercept.c:111) ==10542== by 0x16324F: (within /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x163E3E: _X11TransWritev (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x144DC4: _XSend (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x12C29A: XFreeColors (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x27F6A1: cleanup_xpma_struct (pixmap.c:92) ==10542== by 0x27F7D0: change_pixmap (pixmap.c:143) ==10542== by 0x27FEA0: fl_set_pixmap_pixmap (pixmap.c:386) ==10542== by 0x8268339: XFormsToolbar::update() (stl_iterator.h:605) ==10542== by 0x81EFB1E: Toolbars::update() (shared_ptr.hpp:253) ==10542== by 0x81EF5FF: Toolbars::update(bool, bool) (Toolbars.C:63) ==10542== by 0x81EE249: LyXView::updateToolbars() (scoped_ptr.hpp:94) ==10542== by 0x826C858: XFormsView::XFormsView(int, int) (XFormsView.C:130) ==10542== by 0x81F21DF: lyx_gui::start(std::string const&, std::vector<std::string, std::allocator<std::string> > const&) (shared_ptr.hpp:125) ==10542== by 0x80D9AEE: LyX::priv_exec(int&, char**) (lyx_main.C:258) ==10542== by 0x80D8F7D: LyX::exec(int&, char**) (scoped_ptr.hpp:94) ==10542== Address 0x1E71136 is 1102 bytes inside a block of size 2048 alloc'd ==10542== at 0xBAC7CF: calloc (vg_replace_malloc.c:284) ==10542== by 0x135D0C: XOpenDisplay (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x26A2EA: fl_initialize (flresource.c:838) ==10542== by 0x81F17EB: lyx_gui::parse_init(int&, char**) (lyx_gui.C:162) ==10542== by 0x80D9269: LyX::priv_exec(int&, char**) (lyx_main.C:190) ==10542== by 0x80D8F7D: LyX::exec(int&, char**) (scoped_ptr.hpp:94) ==10542== by 0x805408D: main (main.C:42) ==10542== by 0x633BBE: __libc_start_main (in /lib/libc-2.3.2.so) ==10542== by 0x8053FB4: (within /home/angus/lyx/devel/build/src/lyx-xforms) no text in updateScrollbar ==10542== discard syms in /lib/libnss_files-2.3.2.so due to munmap() ==10542== ==10542== ERROR SUMMARY: 70 errors from 2 contexts (suppressed: 10 from 1) ==10542== malloc/free: in use at exit: 823864 bytes in 24846 blocks. ==10542== malloc/free: 60283 allocs, 35437 frees, 5754274 bytes allocated. ==10542== For counts of detected errors, rerun with: -v ==10542== searching for pointers to 24846 not-freed blocks. ==10542== checked 12195156 bytes. ==10542== ==10542== ==10542== 16 bytes in 1 blocks are definitely lost in loss record 15 of 143 ==10542== at 0xBAC28B: malloc (vg_replace_malloc.c:153) ==10542== by 0x1479C2: (within /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x14985B: XrmGetStringDatabase (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x12D457: (within /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x12D557: XGetDefault (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x56B17A: _XcursorGetDisplayInfo (in /usr/X11R6/lib/libXcursor.so.1.0) ==10542== by 0x56B21E: XcursorSupportsARGB (in /usr/X11R6/lib/libXcursor.so.1.0) ==10542== by 0x56DB2B: XcursorNoticeCreateBitmap (in /usr/X11R6/lib/libXcursor.so.1.0) ==10542== by 0x1276B2: _XNoticeCreateBitmap (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x127C4C: XCreatePixmap (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x126A7F: XCreateBitmapFromData (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x2953D2: fl_init_stipples (xsupport.c:154) ==10542== by 0x264525: fl_init_colormap (flcolor.c:659) ==10542== by 0x26A9F8: fl_initialize (flresource.c:960) ==10542== by 0x81F17EB: lyx_gui::parse_init(int&, char**) (lyx_gui.C:162) ==10542== by 0x80D9269: LyX::priv_exec(int&, char**) (lyx_main.C:190) ==10542== ==10542== ==10542== 168 bytes in 1 blocks are possibly lost in loss record 74 of 143 ==10542== at 0xBAC28B: malloc (vg_replace_malloc.c:153) ==10542== by 0x5693D5: XcursorCursorsCreate (in /usr/X11R6/lib/libXcursor.so.1.0) ==10542== by 0x56A6A7: XcursorImagesLoadCursors (in /usr/X11R6/lib/libXcursor.so.1.0) ==10542== by 0x56A776: XcursorImagesLoadCursor (in /usr/X11R6/lib/libXcursor.so.1.0) ==10542== by 0x56DACF: XcursorTryShapeCursor (in /usr/X11R6/lib/libXcursor.so.1.0) ==10542== by 0x1275BD: _XTryShapeCursor (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x127978: XCreateGlyphCursor (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x127DE8: XCreateFontCursor (in /usr/X11R6/lib/libX11.so.6.2) ==10542== by 0x260774: init_cursors (cursor.c:155) ==10542== by 0x26095C: fl_get_cursor_byname (cursor.c:233) ==10542== by 0x28FF32: fl_create_window (win.c:615) ==10542== by 0x26EE08: fl_prepare_form_window (forms.c:742) ==10542== by 0x26EEB7: fl_show_form (forms.c:767) ==10542== by 0x826D2F8: XFormsView::show(int, int, std::string const&) (basic_string.h:717) ==10542== by 0x81F22DE: lyx_gui::start(std::string const&, std::vector<std::string, std::allocator<std::string> > const&) (stl_alloc.h:652) ==10542== by 0x80D9AEE: LyX::priv_exec(int&, char**) (lyx_main.C:258) ==10542== ==10542== LEAK SUMMARY: ==10542== definitely lost: 16 bytes in 1 blocks. ==10542== possibly lost: 168 bytes in 1 blocks. ==10542== still reachable: 823680 bytes in 24844 blocks. ==10542== suppressed: 0 bytes in 0 blocks. ==10542== Reachable blocks (those to which a pointer was found) are not shown. ==10542== To see them, rerun with: --show-reachable=yes ==10542==