(why on earth did this email take 8 days to appear on the list? I posted it on 
Mar 7, and it appeared today!)


On Mar 15, 2011, at 3:18 PM, Derek Lamb wrote:

> Hi Puneet,
> 
> I do not use PDL::IO::GD, so I can't help too much.  Can you post a simple 
> test case that fails on 64-bit but succeeds on 32-bit?  I could at least run 
> it on my machine here and make sure I also get a segfault.  Did it pass make 
> test when you installed PDL?


Yes, it passed the test. Here is the simplest possible script with a gd oo 
interface that fails on my computer (64-bit) but works on my server (32-bit). 
The version of Perl and PDL are both identical on both machines, both custom 
installed by me.

        use PDL::Lite;
        use PDL::Primitive;
        use PDL::IO::GD;
        
        my $pdl = (random(400, 400) * 7)->floor;
        
        my $lut = pdl (
            [  0,   0,   0],    # black for borders
            [136, 136, 136],    # grey for transparent
            [ 26, 150,  65],    # dark green
            [166, 217, 106],    # light green
            [255, 255, 191],    # yellow
            [253, 174,  97],    # orange
            [215,  25,  28],    # red
        );
        
        gd_reg(); # works
        gd_oo();  # segfaults
        
        # Using OO
        sub gd_oo {
            PDL::IO::GD->new(
                {pdl => $pdl, lut => $lut}
            )->write_Png( 'test_oo.gif' );
        }
        
        # Using non-OO
        sub gd_reg { write_png($pdl, $lut, 'test_reg.gif'); }



> 
> I know that PDL::FFTW does not pass make test on my 64-bit machine--there is 
> a patch available for that, but the solution had to do with the return value 
> of some C routines (int vs void *).  Check the bug tracker for a synopsis and 
> link--perhaps there's something similar going on with GD.
> 
> cheers,
> Derek
> 
> 
> On Mar 7, 2011, at 12:32 PM, Mr. Puneet Kishor wrote:
> 
>> Is there anyone on this list who is successfully using the OO interface to 
>> PDL::IO::GD on an Intel Mac with 64-bit Snow Leopard?
>> 
>> Every time I try to use the OO interface to PDL::IO::GD, I get a segfault. I 
>> believe this is only a problem on my MacBook which has 64-bit Snow Leopard 
>> (Mac OS X 10.6.x). I am using my own installation of Perl 5.12.1 which was 
>> installed successful under /usr/local/.
>> 
>> Judd Taylor, the author of PDL::IO::GD, has very kindly helped me 
>> troubleshoot the issue, but I haven't really found a resolution. As such, a 
>> fair amount of my work involving generating images quickly is stuck. I want 
>> to determine whether it is the particular combination of hardware/operating 
>> system, or whether it is some silliness on my part.
>> 
>> Fwiw, the OO interface to PDL::IO::GD works just fine on my Xserve, but that 
>> has the 32-bit Mac OS X 10.5.x installed on it.
>> 
>> Puneet.
>> _______________________________________________
>> Perldl mailing list
>> [email protected]
>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
> 


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to