Re: [Plplot-devel] segfault bugfix for plbuf.c

2015-01-29 Thread Phil Rosenberg
Plplot-devel@lists.sourceforge.net Subject: Re: [Plplot-devel] segfault bugfix for plbuf.c I test the code by using the xwin driver and resize the plot window. But I think a better way would be to write a test program that makes a plot and then calls plRemakePlot. I will put something together

Re: [Plplot-devel] segfault bugfix for plbuf.c

2015-01-29 Thread Phil Rosenberg
Hi Jim In general plexit calls are bad. In fact it is on my to do list to go through and eradicate them. However, I'm not sure what alternative there is as the rendering cannot continue, because once an unknown command is found there is no way to know how many bytes to skipto find the next

Re: [Plplot-devel] segfault bugfix for plbuf.c

2015-01-29 Thread Jim Dishaw
I agree the plexit call is bad, I put it in primarily for debugging and I've been thinking of alternatives. I'm going to implement your idea. I'm going to add a data type suffix to each command. Arrays will also have a size passed (which is what plbuf currently does). The data type prefix

Re: [Plplot-devel] segfault bugfix for plbuf.c

2015-01-29 Thread Alan W. Irwin
On 2015-01-29 08:06- Phil Rosenberg wrote: As Jim said resizing xwin or the current wxWidgets driver uses the buffer, but that's not great for automated testing. The new wxWidgets driver uses the buffer for all plotting when called from a console application (i.e. for all the examples)

Re: [Plplot-devel] segfault bugfix for plbuf.c

2015-01-28 Thread Alan W. Irwin
To Phil and Jim: Do any of our current examples or device drivers on master branch exercise the plbuf capabilities or if not could one of you implement a test application that exercises each of the plbuf capabilities? I think we need such a test that can be run to make sure that a plbuf change

Re: [Plplot-devel] segfault bugfix for plbuf.c

2015-01-28 Thread Jim Dishaw
I guess it would help if I would attach the patch! plbuf_bugfix.patch Description: Binary data On Jan 28, 2015, at 9:59 PM, Jim Dishaw j...@dishaw.org wrote: While working on the plot metafile, I fixed a segfault issue that Phil was having with his wxWidgets work. I made a patch that

[Plplot-devel] segfault bugfix for plbuf.c

2015-01-28 Thread Jim Dishaw
While working on the plot metafile, I fixed a segfault issue that Phil was having with his wxWidgets work. I made a patch that fixes this issue. I don't know about the need to push this to patch to master. The only jarring behavior is a plexit() call that I put in plbuf_control() to catch

Re: [Plplot-devel] segfault bugfix for plbuf.c

2015-01-28 Thread Jim Dishaw
I test the code by using the xwin driver and resize the plot window. But I think a better way would be to write a test program that makes a plot and then calls plRemakePlot. I will put something together. Phil's wxWidgets work is also a good test case. On Jan 28, 2015, at 11:23 PM, Alan W.