Hi Andrew, Any thoughts on how hard it would be to fix the problem, rather than just minimizing it? Is it possible to wrap this section of code with a directive that would cause it to get executed in a non-threaded fashion?
-Hazen Maimone, Andrew wrote: > Hello all, > > I would like suggest a patch to xwin.c to addresses a problem I am having. > The problem is a synchronization issue between the plplot core and xwindows > driver when multiple streams/windows are present. The events thread in > xwin.c saves and restores the current stream to handle expose/resize events, > but this can cause crashes if plplot changes the active stream (in the main > program thread) in between the save/restore. I have modified the events_thread > function to only save and restore the stream if necessary, rather than for all > events to minimize the likelihood of this problem occurring. > > Best regards, > Andrew > > > diff xwin.svn xwin.c > 1327,1328c1327,1328 > < /* As ResizeEH() ends up calling plRemakePlot(), that > < * indirectly uses the current stream, one needs to > --- >> /* As ExposeEH() may or ResizeEH() will end up calling >> plRemakePlot(), >> * that indirectly uses the current stream, one needs to > 1332,1333d1331 > < oplsc = plsc; > < plsc = lpls; > 1336a1335,1338 >> if( !dev->write_to_pixmap ) { >> oplsc = plsc; >> plsc = lpls; >> } > 1337a1340,1342 >> if( !dev->write_to_pixmap ) { >> plsc = oplsc; >> } > 1339a1345,1346 >> oplsc = plsc; >> plsc = lpls; > 1340a1348 >> plsc = oplsc; > 1343c1351 > < plsc = oplsc; > --- > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Plplot-devel mailing list > Plplot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/plplot-devel ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel