On 2016-11-14 20:51-0500 Hazen Babcock wrote: > > Hello, > > All the file based Qt devices are failing for me in ctest. This is an > example error message: > > test 17 > Start 17: examples_pngqt > > 17: Test command: /bin/bash "-c" > "EXAMPLES_DIR=/home/hbabcock/Code/plplot-build/examples > SRC_EXAMPLES_DIR=/home/hbabcock/Code/plplot/examples > OUTPUT_DIR=/home/hbabcock/Code/plplot-build/ctest_examples_output_dir > VC_CTEST_DIRECTORY= ./plplot-test.sh --verbose --front-end=c --device=pngqt" > 17: Test timeout computed to be: 1500 > 17: Testing front-end c > 17: x00c > 17: x01c > 17: x02c > 17: ./test_c.sh: line 32: 16690 Segmentation fault (core dumped) > $DEBUG_CMD "$cdir"/x${index}${lang} -dev $device -o > "${OUTPUT_DIR}"/x${index}${lang}%n.$dsuffix $options 2> test.error >| > "${OUTPUT_DIR}"/x${index}${lang}_${dsuffix}.txt > 17/24 Test #17: examples_pngqt ...................***Failed 0.61 sec > > > The equivalent(?) command line seems to work fine: > $ ./x03c -dev pngqt -o ex3.png > > This is on a linux system. > Linux Dell-XPS-8100 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 > UTC 2016 x86_64 x86_64 x86_64 GNU/Linux > > gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 >
Hi Hazen: Is this segfault occurring for Qt5 or Qt4? If the former, my advice is to try Qt4 instead. That is the short response, and now here is the (much) longer one. My current testing hasn't detected this segfault, but that doesn't mean much since that is the nature of memory management issues; they sometimes segfault and they sometimes do not. By the way, the "x02c" prompt occurs at the start of that portion of the test (see plplot_test/test_c.sh.in) so that is the example that segfaulted, not x03c. So you might or might not see a segfault with ./x02c -dev pngqt -o ex2.png However, a valgrind run on that here (for the Qt5 case) does show memory management issues (invalid reads) that do not lead to segfaults for me but which lead to segfaults (like you have seen) for others. Furthermore, similar valgrind runs on x00c, x01c and x03c shows no such memory management issues. I will take a look at that memory management incompatiblity between the qt devices and example 2 _if_ that issue also shows up for Qt4, but if this is a Qt5-only issue I won't bother with it because I attribute (see below) Qt5-only memory management issues to the immaturity of Qt5 compared to Qt4. An example of this Qt5-only possibility I was dealing with just today is my current testing shows qt_example generates valgrind reports about invalid reads for Qt5 but not Qt4. I looked deeply at that until I realized that Qt5 memory management issue was generated by the following bog-standard Qt5 code (taken right out of Qt5 documentation) QMessageBox msgBox; msgBox.setText( buf ); msgBox.exec(); to implement that message box used to report interactive selection coordinates. (That memory management issue appeared when the OK button was pressed on the message box.) I also discovered our pyqt5 example intermittently segfaulted while clicking the OK button on that message box while our pyqt4 example does not. In sum, I attribute all these symptoms and any further Qt5 memory management issues that do not appear for Qt4 to the continuing immaturity of Qt5 (at least the Debian Jessie Qt version 5.3.2 I have access to) and I presume all these Qt5-only symptoms are nothing to do with the PLplot code and will go away once Qt5 memory management is properly debugged. Note, an additional complicating factor here is I am just finishing up some substantial build-system changes for Qt5 and some smaller changes for Qt4, and some of my previous commits on this topic may have screwed up linking which could also introduce memory management issues. Anyhow, when I make the final commit on this topic, I plan to check all qt-related results with "ldd -r" to make sure there are no linking issues left. Furthermore, I plan to run some systematic valgrind tests for the pngqt case for both Qt4 and Qt5 to see whatever examples (if any) still have both Qt4 and Qt5 memory management problems. 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 __________________________ ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel