Yeah, I think you are correct about an example. I don't really use plreplot - I
think mostly because when I first started using Plplot I noticed the lack of
font support, but that was before I started digging into the code. I presume it
gets well used by the interactive drivers. It certainly does in wxWidgets and I
would use it in my code if it worked properly.
Something I wondered, do you think it would be overkill to add the size in
bytes to each buffer entry? That way if Plplot found an entry it did not
support it could ignore it safely?
Cheers for the answer re vc++, it is good to know there is someone else on the
list using the same tools as me. I have tried using gdb in eclipse on Linux
before and it almost does the same job, but I just don't quite find eclipse
overall as slick as vc++. I don't think gdb does edit and continue like the
vc++ debugger either, but anyway I didn't intend to start a compiler comparison
conversation.
Phil
-----Original Message-----
From: "Arjen Markus" <arjen.mar...@deltares.nl>
Sent: 15/08/2014 15:49
To: "phil rosenberg" <philip_rosenb...@yahoo.com>; "laurent Berger"
<laurent.ber...@univ-lemans.fr>; "plplot-devel@lists.sourceforge.net"
<plplot-devel@lists.sourceforge.net>
Subject: RE: [Plplot-devel] About svg
Hi Phil,
Forgot your last question:
For regular builds I use the nmake utility but if I need to trace some nasty
bug then I do indeed rely on the IDE and the debugger – but quite often the
venerable print method also works ;).
Regards,
Arjen
From: phil rosenberg [mailto:philip_rosenb...@yahoo.com]
Sent: Friday, August 15, 2014 4:40 PM
To: Arjen Markus; laurent Berger; plplot-devel@lists.sourceforge.net
Subject: Re: [Plplot-devel] About svg
Hi Arjen
I had a look at this as well this morning and found the same thing, I thought I
sent an email out, but I just found that email waiting in my drafts folder -
oops. At least we found the same problem :-)
I agree that the line rd_data( pls, &(pls->width), sizeof(pls->width); would
be best as it makes things robust to later changes. Might be worth making
similar changes to other reads.
Yes as you say once we have a confirmed workflow the solution can be pushed up
to the repo.
I also noticed some other potential problems though. Firstly in a really simple
example that I used to debug - just a call to plinit, then plwidth then
plreplot, a number of unrecognised commands were found when the buffer was
read, which presumably shouldn't be the case. I thought these were caused by
the bad read of the width, causing misalignment of the read pointer, but it
turned out at least some remain after the fix.
I also noticed that font changes don't seem to be logged in the buffer. I'm not
sure if there is anything else that is missing, but perhaps we should look?
Following on from this - does anyone use the buffer to write to file? I have
vague recollections that there is an option to do so. If so then we might be
causing ourselves issues. If the font is added to the buffer then older
versions of the library that trys to read a more modern version of a file will
see an unrecognised entry, not know how many bytes to read and will end up with
a misaligned read pointer affecting the reading of the remainder of the file.
The same would be true of the fixed width parameter. However I guess even now
the options of PLFLT as a float or double mean the file would be ambiguous.
By the way Arjen, just out of curiosity - you use VC++ and Windows, is that
right? If so do you just use nmake or do you use the full VC++ IDE and debugger?
Phil
From: Arjen Markus <arjen.mar...@deltares.nl>
To: Phil Rosenberg <philip_rosenb...@yahoo.com>; laurent Berger
<laurent.ber...@univ-lemans.fr>; "plplot-devel@lists.sourceforge.net"
<plplot-devel@lists.sourceforge.net>
Sent: Friday, 15 August 2014, 10:42
Subject: RE: [Plplot-devel] About svg
Hi Phil,
With some additional analysis from Laurent we were able to track down the
cause:
The routine rd_data() in plbuf.c is reading a U_CHAR value, whereas the width
has been changed to a floating-point number. Changing the type solves the
problem:
switch ( op )
{
case PLSTATE_WIDTH: {
PLFLT width;
rd_data( pls, &width, sizeof ( PLFLT ) );
[The entire original message is not included.]
------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel