Hi Alan
it is easy to put this in a more standard qt way where plot win is not
defined as a pointer and  put win.show
replacing
//   a.setActiveWindow( win );
 //   win->setVisible( true );
before the return a.exec()

the fun thing is  that in this case the program always crashes when one
closes the window. It crashes when the destructor
of PlotWindow::~PlotWindow() is called.
it crashes there even if you empty the destructor. so I would conclude
something very wrong with the extqt driver. I'll promise to have a look,
and probably completely replace it by something different as I do not like
it, unlike the others that are nice.
Unfortunately I have a data workshop in Stockholm in the second week of
February and until there I have a huge amount of things to do.

cheers,

P.s i do Have interactive plplot apps in qt but I always render a png image
in a qgraphicsview widget. The png is built by plplot at exactly the same
pixels available in the window. and then I have a clock that replots
(rebuilding the image whenever the window size changes) I found long time
ago that this is much more faster than to have a vector format because the
rendering of that format into screen is much more slower than putting
plplot producing a new image for the new geometrie window, especially if
you don't use hardware acceleration.





On Sat, Dec 29, 2018 at 11:30 AM Alan W. Irwin <alan.w.irwin1...@gmail.com>
wrote:

> On 2018-12-29 09:17-0000 António Rodrigues Tomé wrote:
>
> > Unfortunately  I was not able to make qt-example seg fault in my system
> so
> > could not found out what was the problem.
>
> I could only trigger the segfaults in a busy environment, i.e., the
> interactive part of comprehensive testing with all sorts of other
> interactive tests going at the same time.  So I am not surprised you
> found it difficult to reproduce this issue.  However, if you try a valgrind
> run on qt_example, you should find like I did that there is
> a memory leak associated with win
> because the combination
>
> QApplication a( argc, argv );
> PlotWindow   * win = new PlotWindow( Argc, Argv );
> a.setActiveWindow( win );
> win->setVisible( true );
> [...]
> return a.exec();
>
> leaves some memory associated with win undeleted.  Note, cleanly
> deleting win is difficult (or at least I have had no success trying to
> do that without creating more segfaults) because of win's use by "a"
> above and the necessity (at least according to Qapplication
> documentation) that the exec method call be the last thing done in a main
> routine.
>
> Anyhow, if you can find some way to modify the above code so there is
> no memory leak associated with win, then that might solve the
> intermittent segfault on exit issue shown by qt_example.
>
> 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
> __________________________
>
>
> __________________________
> 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
> __________________________
>


-- 

António Rodrigues Tomé
Universidade da Beira Interior
Instituto D. Luís (lab associado)
email address:
art...@gmail.com
art...@ubi.pt
http://www.researcherid.com/rid/A-5681-2013
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to