On 2010-12-16 08:40+0100 Arjen Markus wrote:

> Hi Alan,
>
> okay, at the very least this error is consistent, so that should make
> it easier to hunt down. I think I have some opportunity tonight to
> further investigate this and other Windows matters. Will keep you
> posted.

Hi Arjen:

As in all debugging the essential is to simplify as much as possible
while still demonstrating the bug.  Here are some steps of that
simplification process that I have been able to do so far.  It leads
to a rather improbable hypothesis....

First run comprehensive_test.sh so that "can't open" error shows up in the
comprehensive_test.sh build tree, 
/z/home/wine/newstart/plplot_comprehensive_test_disposable1/shared/build_tree.

If after that bad wine result, I set all appropriate environment variables,
cd to examples/tcl in the above tree then run

echo $(pwd)/test1.ps |pltcl x14 -dev psc -o test.ps
Demo of multiple output streams via the psc driver.
Running with the second stream as slave to the first.

Enter graphics output file name: Can't open 
/z/home/wine/newstart/plplot_comprehensive_test_disposable1/shared/build_tree/examples/tcl/test1.ps.
....

I then tried the same thing in the corresponding c example, and got
the same (bad) result.  I then tried

./x10c -dev psc -o $(pwd)/test.ps

and

echo test1.ps| ./x14c -dev psc -o $(pwd)/test.ps

and the long filename specified with -o worked fine!

I then tried interactive input of the long file name, and that
generated the error.

./x10c -dev psc
Enter graphics output file name: 
/z/home/wine/newstart/plplot_comprehensive_test_disposable1/shared/build_tree/examples/c/test.ps
Can't open 
/z/home/wine/newstart/plplot_comprehensive_test_disposable1/shared/build_tree/examples/c/test.ps.
...

This is the simplest instance of the error I have been able to
generate so far.

I then tried many of the same examples under Linux and could not
reproduce the error at all no matter how long I made the full path to
the file, e.g.,

echo $(pwd)/../../../../shared/build_tree/examples/c/test1.ps
/home/software/plplot_svn/HEAD/plplot_cmake_qt/comprehensive_test_disposeable/shared/build_tree/examples/c/../../../../shared/build_tree/examples/c/test1.ps

The bad C results on wine show the error has nothing to do with Tcl
which is a nice simplification, but the corresponding good results on
Linux show it must be some Windows-specific issue. On the other hand,
the good C results using the -o option on wine prove bash and C and
PLplot can handle long filenames on wine with no issues.

Thus, all the symptoms are consistent with the hypothesis that for the
special case where the user must be prompted for a filename, the C
(and Tcl) examples call a PLplot function to open the file in a
peculiar way which has a Windows-specific filename length limitation.
That hypothesis does seem pretty improbable if you think about
it, but as Sherlock Holmes said: "Eliminate all other factors, and the
one which remains must be the truth."

That should be enough experimentation, and it is now time to start
debugging the code to see whether the above hypothesis is true. Fortunately,
MSYS gives you access to the gcc debugger, gdb, which is an excellent
tool for debugging.

More later as this detective story unfolds.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); 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
__________________________

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to