Hi Andrew: Thanks for helping out. More below in context:
On 2015-03-03 22:03-0000 Andrew Ross wrote: > > Alan, > > As a further reference point, I've tried with Qt5 on Ubuntu 14.10 (this is > 5.3.0) and I get lots of lost / still reachable memory issues, but no > invalid reads (which I think was your concern). Just to be absolutely > clear, I've tested > > valgrind --leak-check=full --log-file=log --trace-children=yes ./x01c -dev > qtwidget > > and also the c++ qt_example. > > Does this correspond to your test? Not exactly, but I don't think that matters for an invalid read. But just to be sure here are my exact tests and results: # Tests the qtwidget device (which is part of qt.so) and qt_example really are linked to Qt5: wine@raven> ldd -r drivers/qt.so |& grep -i qt libQt5Svg.so.5 => /home/wine/newstart/build_script/install-linux/lib/libQt5Svg.so.5 (0x00007f56cfb65000) libQt5Gui.so.5 => /home/wine/newstart/build_script/install-linux/lib/libQt5Gui.so.5 (0x00007f56cf44f000) libQt5PrintSupport.so.5 => /home/wine/newstart/build_script/install-linux/lib/libQt5PrintSupport.so.5 (0x00007f56cf1eb000) libplplotqt.so.1 => /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/bindings/qt_gui/libplplotqt.so.1 (0x00007f56ced51000) libQt5Widgets.so.5 => /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5 (0x00007f56ce552000) libQt5Core.so.5 => /home/wine/newstart/build_script/install-linux/lib/libQt5Core.so.5 (0x00007f56cdd92000) wine@raven> ldd -r examples/c++/qt_example |& grep -i qt libQt5Svg.so.5 => /home/wine/newstart/build_script/install-linux/lib/libQt5Svg.so.5 (0x00007f84e79bc000) libQt5Gui.so.5 => /home/wine/newstart/build_script/install-linux/lib/libQt5Gui.so.5 (0x00007f84e72a6000) libQt5PrintSupport.so.5 => /home/wine/newstart/build_script/install-linux/lib/libQt5PrintSupport.so.5 (0x00007f84e7042000) libplplotqt.so.1 => /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/bindings/qt_gui/libplplotqt.so.1 (0x00007f84e6e29000) libQt5Widgets.so.5 => /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5 (0x00007f84e63a9000) libQt5Core.so.5 => /home/wine/newstart/build_script/install-linux/lib/libQt5Core.so.5 (0x00007f84e5be9000) # valgrind results: wine@raven> valgrind examples/c/x01c -dev qtwidget ==16629== Memcheck, a memory error detector ==16629== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==16629== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==16629== Command: examples/c/x01c -dev qtwidget ==16629== PLplot library version: 5.10.0 ==16629== Invalid read of size 8 ==16629== at 0xB59E174: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16629== by 0xB59E1AB: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16629== by 0xB59E1E8: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16629== by 0x7704D32: QBackingStore::~QBackingStore() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Gui.so.5.3.2) ==16629== by 0x81C00F1: QWidgetPrivate::deleteTLSysExtra() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16629== by 0x81C172F: QWidget::destroy(bool, bool) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16629== by 0x81A9B50: QWidget::~QWidget() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16629== by 0x7E17558: QtPLWidget::~QtPLWidget() (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/bindings/qt_gui/libplplotqt.so.1.0.0) ==16629== by 0x7039935: plD_tidy_qtwidget(PLStream*) (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/drivers/qt.so) ==16629== by 0x4E50A5E: c_plend1 (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/src/libplplot.so.12.0.1) ==16629== by 0x4E50AC2: c_plend (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/src/libplplot.so.12.0.1) ==16629== by 0x40161B: main (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/examples/c/x01c) ==16629== Address 0xd682908 is 40 bytes inside a block of size 48 free'd ==16629== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==16629== by 0xB59E127: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16629== by 0xB59E1AB: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16629== by 0xB59E1E8: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16629== by 0x7704D32: QBackingStore::~QBackingStore() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Gui.so.5.3.2) ==16629== by 0x81C00F1: QWidgetPrivate::deleteTLSysExtra() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16629== by 0x81C172F: QWidget::destroy(bool, bool) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16629== by 0x81A9B50: QWidget::~QWidget() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16629== by 0x7E17558: QtPLWidget::~QtPLWidget() (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/bindings/qt_gui/libplplotqt.so.1.0.0) ==16629== by 0x7039935: plD_tidy_qtwidget(PLStream*) (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/drivers/qt.so) ==16629== by 0x4E50A5E: c_plend1 (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/src/libplplot.so.12.0.1) ==16629== by 0x4E50AC2: c_plend (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/src/libplplot.so.12.0.1) ==16629== ==16629== ==16629== HEAP SUMMARY: ==16629== in use at exit: 107,048 bytes in 1,510 blocks ==16629== total heap usage: 55,548 allocs, 54,038 frees, 14,520,479 bytes allocated ==16629== ==16629== LEAK SUMMARY: ==16629== definitely lost: 460 bytes in 10 blocks ==16629== indirectly lost: 61,739 bytes in 1,344 blocks ==16629== possibly lost: 0 bytes in 0 blocks ==16629== still reachable: 44,849 bytes in 156 blocks ==16629== suppressed: 0 bytes in 0 blocks ==16629== Rerun with --leak-check=full to see details of leaked memory ==16629== ==16629== For counts of detected and suppressed errors, rerun with: -v ==16629== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 5 from 5) In the above -dev qtwidget case, the invalid read error was generated when I exited the plot by hitting the enter key, and I got similar results with the other exit methods (alt F4 and hitting the delete button on the GUI). wine@raven> valgrind examples/c++/qt_example ==16635== Memcheck, a memory error detector ==16635== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==16635== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==16635== Command: examples/c++/qt_example ==16635== ==16635== Invalid read of size 8 ==16635== at 0xB395174: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16635== by 0xB3951AB: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16635== by 0xB3951E8: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16635== by 0x52F7D32: QBackingStore::~QBackingStore() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Gui.so.5.3.2) ==16635== by 0x60340F1: QWidgetPrivate::deleteTLSysExtra() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== by 0x603572F: QWidget::destroy(bool, bool) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== by 0x601DB50: QWidget::~QWidget() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== by 0x404480: PlotWindow::~PlotWindow() (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/examples/c++/qt_example) ==16635== by 0x69A60B7: QObject::event(QEvent*) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Core.so.5.3.2) ==16635== by 0x6018AB0: QWidget::event(QEvent*) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== by 0x610F04A: QMainWindow::event(QEvent*) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== by 0x5FE0B9B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== Address 0xd530558 is 40 bytes inside a block of size 48 free'd ==16635== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==16635== by 0xB395127: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16635== by 0xB3951AB: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16635== by 0xB3951E8: ??? (in /home/wine/newstart/build_script/install-linux/plugins/platforms/libqxcb.so) ==16635== by 0x52F7D32: QBackingStore::~QBackingStore() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Gui.so.5.3.2) ==16635== by 0x60340F1: QWidgetPrivate::deleteTLSysExtra() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== by 0x603572F: QWidget::destroy(bool, bool) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== by 0x601DB50: QWidget::~QWidget() (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== by 0x404480: PlotWindow::~PlotWindow() (in /home/wine/newstart/build_script/build_dir-linux/epa_build/Source/comprehensive_test_disposeable/shared/build_tree/examples/c++/qt_example) ==16635== by 0x69A60B7: QObject::event(QEvent*) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Core.so.5.3.2) ==16635== by 0x6018AB0: QWidget::event(QEvent*) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== by 0x610F04A: QMainWindow::event(QEvent*) (in /home/wine/newstart/build_script/install-linux/lib/libQt5Widgets.so.5.3.2) ==16635== ==16635== ==16635== HEAP SUMMARY: ==16635== in use at exit: 152,566 bytes in 1,606 blocks ==16635== total heap usage: 42,607 allocs, 41,001 frees, 11,215,207 bytes allocated ==16635== ==16635== LEAK SUMMARY: ==16635== definitely lost: 370 bytes in 8 blocks ==16635== indirectly lost: 61,271 bytes in 1,340 blocks ==16635== possibly lost: 0 bytes in 0 blocks ==16635== still reachable: 90,925 bytes in 258 blocks ==16635== suppressed: 0 bytes in 0 blocks ==16635== Rerun with --leak-check=full to see details of leaked memory ==16635== ==16635== For counts of detected and suppressed errors, rerun with: -v ==16635== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 5 from 5) For the above qt_example case, the invalid read was generated by immediately exiting with alt-F4. If I pushed the buttons on the GUI corresponding to plotting something first no additional errors were generated beyond what you get with exit alone. If I pushed the button that activated the cursor, all was well until I attempted to exit that mode with by hitting the OK button which generated additional invalid read errors beyond what you get with exit alone. I think valgrind would report a serious issue like invalid read regardless of command-line options so I think the best summary of the situation is valgrind reports invalid reads with epa_built Qt 5.3.1 and 5.3.2 and does not report such issues with Ubuntu-built (and patched) Qt5 5.3.0. So thanks to your report my working hypothesis now is that the configuration of the epa_built Qt5 is somehow to blame here even though there are no warnings about the configuration options that I use in the Qt5 build log. My next step is I am going to download the Qt5 build configuration used by Debian testing and/or Ubuntu to see if I can spot some key configuration option that epa_build is missing for Qt5.3.x. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel