On 2018-12-20 18:56-0000 António Rodrigues Tomé wrote:

Hi Alan
I do not completely understand the need of using a mutex in the qt driver
however
without any change in the actual driver approach it is easy to allow the
driver to work well within a qt app and also in any other c or c++ program
if in the file qt.cpp function  bool initQtApp( bool isGUI )
we add after the ++appCounter; line (line 90)
the instruction
   if(appCounter == 1 && qApp != NULL) ++appCounter;
this will prevent the call
delete qApp;
when one closes the driver within a qt application, that would crash teh
application,  and it does  not conflict with the actual behavior of the qt
driver it onnly takes account for the fact that there is a qApp that was
not started by the driver.

Hi António:

For your information all our Qt-related code got contributed by Alban
Rochel from the QSAS group back in 2009.  And Alban move on to other
work soon after so no current PLplot developer completely understands
that code.  This problem is made worse in my own case because my C++
and Qt skills are not that great.  Also note that my recent tests of
qt_example and pyqt5_example for the Qt5 case have not gone well with
qt_example segfaulting on exit on one occasion and pyqt5_example
hanging on exit on one occasion.

Despite these issues, the Qt-related components generally produce
extremely high-quality results so any help you can give us with this
code to make it more reliable would be much appreciated subject to the
constraint that comprehensive testing of your changes has to work as
well as my previous comprehensive tests.

So from the point of view of a non-expert for this code, I would
suggest if you think the mutex is no longer needed because of your
change, then go ahead an remove it to see whether that combined change
passes all tests you care to make including ideally running the
comprehensive test script as documented in
doc/wiki_source/Testing_PLplot.

Also, descriptions of code changes (as you attempted to do above) are
not really the best way to present your suggested changes to us.  So
instead, I suggest you follow the "git format-patch" cookbook in
README.developers in order to do that.  And don't hesitate to ask here
if you have any trouble following that specific procedure or any other
git advice we give there.

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
__________________________


_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to