Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#228 TriD garbled axis text

unreproducible
closed-invalid
David Mertens
other (94)
1
2010-07-02
2010-02-04
David Mertens
No

I'm using PDL::Graphics::TriD to graph some data and although the actual plotting looks right, the numbers for the tic marks is garbled. See the attached screen shots. This particular screen shot is taken from the 3d demo and is very reliable.

Platform: Ubuntu 9.10
Perl version: 5.10.0
output of perldl -V:
-----------------------------%<-----------------------------
perlDL shell v1.352
PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
'COPYING' in the PDL distribution. This is free software and you
are welcome to redistribute it under certain conditions, see
the same file for details.

Summary of my PDL configuration

VERSION: PDL v2.4.6_001 (supports bad values)

$%PDL::Config = {
'BADVAL_PER_PDL' => '0',
'WITH_PROJ' => undef,
'FFTW_TYPE' => 'double',
'FFTW_LIBS' => [
'/lib',
'/usr/lib',
'/usr/local/lib'
],
'WITH_FFTW' => 'true',
'GSL_LIBS' => undef,
'GL_BUILD' => '0',
'WITH_IO_BROWSER' => '1',
'PROJ_INC' => undef,
'WHERE_PLPLOT_INCLUDE' => undef,
'WITH_KARMA' => '0',
'WHERE_KARMA' => undef,
'HTML_DOCS' => '1',
'WHERE_PLPLOT_LIBS' => undef,
'WITH_3D' => undef,
'FFTW_INC' => [
'/usr/include/',
'/usr/local/include'
],
'WITH_POSIX_THREADS' => '1',
'POGL_VERSION' => '0.62',
'HIDE_TRYLINK' => '1',
'WITH_HDF' => undef,
'HDF_INC' => undef,
'POGL_WINDOW_TYPE' => 'glut',
'WITH_BADVAL' => '1',
'WITH_GD' => undef,
'FITS_LEGACY' => '1',
'WITH_SLATEC' => undef,
'BADVAL_USENAN' => '0',
'TEMPDIR' => '/tmp',
'PROJ_LIBS' => undef,
'USE_POGL' => '1',
'GD_LIBS' => undef,
'GSL_INC' => undef,
'GD_INC' => undef,
'WITH_GSL' => 'true',
'OPTIMIZE' => undef,
'HDF_LIBS' => undef,
'MALLOCDBG' => {},
'WITH_MINUIT' => undef,
'WITH_PLPLOT' => '1',
'MINUIT_LIB' => undef
};
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.24-23-server, archname=i486-linux-gnu-thread-multi
uname='linux vernadsky 2.6.24-23-server #1 smp wed apr 1 22:22:14 utc 2009 i686 gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.10.0 -Dsitearch=/usr/local/lib/perl/5.10.0 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib -Dlibperl=libperl.so.5.10.0 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -g',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='4.4.1', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/lib64
libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=/lib/libc-2.10.1.so, so=so, useshrplib=true, libperl=libperl.so.5.10.0
gnulibc_version='2.10.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib'
-----------------------------%<-----------------------------
perl -V
-----------------------------%<-----------------------------
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.24-23-server, archname=i486-linux-gnu-thread-multi
uname='linux vernadsky 2.6.24-23-server #1 smp wed apr 1 22:22:14 utc 2009 i686 gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.10.0 -Dsitearch=/usr/local/lib/perl/5.10.0 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib -Dlibperl=libperl.so.5.10.0 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -g',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='4.4.1', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/lib64
libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=/lib/libc-2.10.1.so, so=so, useshrplib=true, libperl=libperl.so.5.10.0
gnulibc_version='2.10.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib'

Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
Built under linux
Compiled at Oct 1 2009 22:19:26
@INC:
/etc/perl
/usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.10
/usr/share/perl/5.10
/usr/local/lib/site_perl
.
-----------------------------%<-----------------------------

Discussion

  • David Mertens
    David Mertens
    2010-02-04

    Screen shot of the messed up text.

     
    Attachments
  • David Mertens
    David Mertens
    2010-02-04

    Another screen shot after a rotation.

     
    Attachments
  • Chris Marshall
    Chris Marshall
    2010-02-04

    Thanks for the report, David.

    Looking at your system it appears that there is a mix of 32bit and 64bit libraries so perhaps the problem lies there. Do you have any artifacts in the test.pl program from the Perl OpenGL module? It looks like something is being mis-rendered but there are any number of possible causes. I've never seen the symptoms shown on my 32bit cygwin and win32.

    Some other thoughts:
    (1) what version of TriD are you using (POGL based or X11 legacy?)
    (2) if POGL, what version of FreeGLUT are you using?
    (3) do you get the same with the stable PDL-2.4.6?

    --Chris
    (

     
  • Chris Marshall
    Chris Marshall
    2010-02-04

    Also, if you could get a minimal code to reproduce the problem it would help you/me to debug further. Demo's don't work because there is too much infrastructure to easily use the perl debugger. Try starting with code similar to the Examples/TriD ones.

    --Chris

     
  • Chris Marshall
    Chris Marshall
    2010-02-10

    I've added this to the Known_problems for PDL-2.4.6_001 for reference. Waiting on further reports to debug further.

    --Chris

     
  • Chris Marshall
    Chris Marshall
    2010-02-10

    • summary: TriD fubarred axis text --> TriD garbled axis text
     
  • Chris Marshall
    Chris Marshall
    2010-02-21

    • assigned_to: nobody --> run4flat
     
  • Chris Marshall
    Chris Marshall
    2010-02-21

    David-

    I've assigned this item to you. Please let me know if there is anything further I
    can do to help you resolve this bug. Were you able to reproduce the problem?

    --Chris

     
  • David Mertens
    David Mertens
    2010-02-21

    Yeah, I'm sorry I never got back to you about this problem. I have not tried to do any 3d plotting on that machine since posting the problem. I will come back to it when I pick that back up, though it may be a while.

     
  • David Mertens
    David Mertens
    2010-02-22

    I'm slowly looking into this. Chris pointed out earlier that I have some 64-bit stuff mixed into all of my libs and this could cause trouble. Most of the 64-bit related stuff is set to 'undef', except the _FILE_OFFSET_BITS compiler flag and the presence of /usr/lib64/. Since my machine is 32-bit, the presence of that 64-bit library is strange, but the only library in there is the fakeroot library and I don't think that's causing the trouble. The _FILE_OFFSET_BITS flag has to do with large file support and does not make any of the libraries or compilation use 64 bit stuff.

     
  • David Mertens
    David Mertens
    2010-02-22

    OK, so here's a short perl script taken from the demo that reproduces the exact image errors as before:
    -----------------------------%<-----------------------------
    use PDL;
    use PDL::Graphics::TriD;

    # Number of subdivisions for lines / surfaces.
    $size = 25;

    $cz = (xvals zeroes $size+1) / $size; # interval 0..1
    $cx = sin($cz*12.6); # Corkscrew
    $cy = cos($cz*12.6);
    line3d [$cx,$cy,$cz]; # Draw a line
    -----------------------------%<-----------------------------
    I've been hunting but I couldn't find where the error lies. I think my next step is to try to get a C-program that uses OpenGL and try to reproduce the curve, to see (a) if it's a problem with my GL and (2) to get a better idea of where in the TriD code the problem may lurk.

     
  • Chris Marshall
    Chris Marshall
    2010-04-12

    Any progress with this? I'm trying to close out any outstanding OpenGL related issues before the next official PDL release.

     
  • David Mertens
    David Mertens
    2010-04-12

    There's an issue here somewhere, but I don't have time to figure it out at the moment and I can't reproduce it on other machines. I don't think this is a show stopper, especially since I can't reproduce it on other machines.

     
  • David Mertens
    David Mertens
    2010-04-12

    • priority: 5 --> 3
    • milestone: --> unreproducible
    • status: open --> open-postponed
     
  • David Mertens
    David Mertens
    2010-04-17

    I decided to spend some time working on this bug this weekend. The problem is on my work machine and I'm at home, so I logged-in using ssh -X from my laptop (on which the text is properly displayed). When I tried running the 3d demo, IT WORKED FINE. It looks like my problem is very low level, almost certainly not an issue with PDL or POGL.

    To test this, I need to write a small program in C that I can compile and run on my work machine to see if the problem persists entirely apart from the Perl bindings. If so, I will mark this bug as invalid and then I will probably start working with the OpenGL people to resolve the issue.

     
  • David Mertens
    David Mertens
    2010-04-17

    • status: open-postponed --> open
     
  • David Mertens
    David Mertens
    2010-04-17

    As far as I can tell, PDL's graphing implementation uses rasterized/bitmapped fonts. This is handy because they draw quickly and they don't get rotated when you rotate the graph, which is usually what you want. For a discussion, see http://www.opengl.org/resources/features/fontsurvey/

    Next I need to figure out a good simple test program in C that I can run on my laptop and my desktop and see if there is a difference. My hunch is that there is a problem loading the font into memory or something like that.

     
  • Chris Marshall
    Chris Marshall
    2010-04-17

    Here is an even more minimal code to diagnose with:

    use PDL;
    use PDL::Graphics::TriD;
    $cx = pdl(0,1);
    $PDL::debug_trid = 1;
    line3d [ $cx, $cx, $cx ];

    I suggest running this under the debugger and step through
    to ID the routines used to place the labels. Then you can
    use that code to make a C example... My guess is you might
    need to look at the display call from twiddle to see what is
    being shown as the label text....

    --Chris

     
  • Chris Marshall
    Chris Marshall
    2010-06-03

    I've lowered the priority of this to Lowest and changed the Resolution field to Remind. Does this problem still exist on your work machine. If you cannot reproduce it then I recommend closing this ticket until you can generate a reproducible failure of PDL.

     
  • Chris Marshall
    Chris Marshall
    2010-06-03

    • priority: 3 --> 1
    • status: open --> open-remind
     
  • David Mertens
    David Mertens
    2010-07-02

    This is a problem with my GLUT, not with PDL. I just found this out because I was playing with GLUI and ran into the exact same problem.

     
  • David Mertens
    David Mertens
    2010-07-02

    • status: open-remind --> closed-invalid