From: Alan W. I. <ir...@be...> - 2015-03-16 19:12:28
|
On 2015-03-16 12:41+0100 Peter Holtermann wrote: > Dear all, > > > I have recently started to try plplot to plot realtime data. I have > extensively used matplotlib but found it for realtime much to slow. So I > tried plplot and I got pretty fast nice results using plplot. > I have anyhow a segfault problem with my python code and I do not fully > understand why. > > > What I experienced when e.g. applying the examples is that a resizing of > the window does resizes the axes only when the window is resized > according to the axes aspect ratio. So a resizing of the window in e.g. > only the x-direction does not resize the plplot axes. > > > What I found to work is that after a window resize you cleanup your > existing plplot widgets ( calling plend(), plfreeqtdev() ) and start all > over. This works quite well, but I get random segfaults. Attached is my > python code, it should work out of the box. > > > Any help is appreciated! Hi Peter: Thanks for your interest in PLplot. I am glad to hear it is faster than matplotlib, but sorry to hear that you are running into segfaults for your test of our pyqt4 binding. We take memory management errors (which often produce segfaults) seriously. However, it may be a long process to sort out this issue, but to help get that debug process started, I and others do test our pyqt4 binding via examples/python/pyqt4_example.py (e.g., by using the cmake option -DBUILD_TEST=ON, and after cmake is completed running make test_pyqt4_example in the build tree or as part of some larger test such as make test_interactive in the build tree. We run such tests routinely as part of due diligence leading up to releases, and so far nobody has reported segfaults with that example. Of course, that is a "for what it is worth" comment because memory management errors sometimes don't lead to segfaults or any other obvious symptom, and also because pyqt4_example.py is a simpler test for our pyqt4 binding than your test case. Nevetheless, you should do that same test yourself just to make sure you can replicate our good test result for this case. Your post caught my eye because you mentioned resizing. That typically uses plbuf capabilities, and a number of bug fixes have just been completed for plbuf. So just now for the git master tip version of PLplot I ran the test_pyqt4_example target above and did a lot of resizing of the resulting GUI without segfault (or other) issues, and you might want to try the same thing. Also, I suggest you try that test and also your own example using the git master tip version of PLplot just in case the recent plbuf fixes have solved the segfault problem for you. And more about that master tip version in my next post. 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 __________________________ |