From: Alan W. I. <Ala...@gm...> - 2018-11-21 08:13:41
|
On 2018-11-21 07:48-0000 Arjen Markus wrote: > Hi Alan, > >> -----Original Message----- >> From: Alan W. Irwin [mailto:Ala...@gm...] >> Sent: Tuesday, November 20, 2018 10:21 AM >> >> Hi Arjen: >> >> That indeed looks like a good starting point for the failing test case. But >> fundamental debugging principles support the idea that another starting point that >> uses plhist with success should be a big help to find out what is wrong with the >> failing call to plhist. >> >> So I have the same question for you that I asked Sergey. If you try using the code >> from example 5 do you get the same rendered result as displayed at >> <http://plplot.org/examples.php?demo=05>, i.e., plhist success? Once you have a >> succeeding test case and failing test case with plhist, then finding what the trouble >> is with the failing test case should be completely straightforward. >> > I can confirm that the plot I get with x05c is very simular to that picture. > > However, I encountered a very strange and very unwelcome problem: > When I added a few print statements to the plhist routine to find out what is going on, I had a coredump - I assume that is due to my print statements, though I just checked and did not see anything much that could cause that. To make sure no stray bits and pieces influenced this, I tried to rebuild the whole library and then, out of the blue!, CMake produced errors and failed to generate the makefiles. It complained for instance about files with a .cxx extension being unknown and no Fortran compiler being found. > > I have now started the comprehensive test script and that works fine! I am unhappily surprised about this. I will try to find out what on Earth is going on/wrong, but it may not be before tomorrow that I can really dig into this. Your result suggested to me the possibility that plhist had a memory management issue so I checked that possibility with valgrind, and the result was perfect, i.e., software@merlin> valgrind examples/c/x05c -dev svg -o test.svg ==5140== Memcheck, a memory error detector ==5140== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==5140== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info ==5140== Command: examples/c/x05c -dev svg -o test.svg ==5140== ==5140== ==5140== HEAP SUMMARY: ==5140== in use at exit: 0 bytes in 0 blocks ==5140== total heap usage: 604 allocs, 604 frees, 221,518 bytes allocated ==5140== ==5140== All heap blocks were freed -- no leaks are possible ==5140== ==5140== For counts of detected and suppressed errors, rerun with: -v ==5140== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) So from these results I think our plhist source code should be fine. Of course, the perfect valgrind results here mean I have no clue at all why you are running into intermittent trouble with plhist there. Sorry I cannot help more, but I wish you the best of luck in figuring out the issue on your platform. Alan __________________________ Alan W. Irwin 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 __________________________ |