Lalit Seth - 2014-06-26

Hi,

I am getting sigsegv when creating CxImage pointer for BMP files. The same does works when I use JPG file. Below is the code and bt from gdb. Any help will be appreciated. On 32 bit it does works.

GCC info

g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Code

#include<iostream>
#include <ximage.h>

int main()
{
        std::cout << "START" << std::endl;
        CxImage *pFontImage;
        char FileName[128];

        sprintf(FileName,"%s", "./blackbuck.bmp");

        pFontImage = new CxImage(FileName, CXIMAGE_FORMAT_BMP);
        if(!pFontImage) std::cout << "Cannot open image file" << std::endl;

        std::cout << "END" << std::endl;
        return 0;
}

GDB bt

Program received signal SIGSEGV, Segmentation fault.
0x000000000041cee4 in _tiffReadProcEx(void*, void*, int) ()
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6.x86_64 libgcc-4.4.7-4.el6.x86_64 libstdc++-4.4.7-4.el6.x86_64
(gdb) bt
#0  0x000000000041cee4 in _tiffReadProcEx(void*, void*, int) ()
#1  0x0000000000495330 in TIFFClientOpen ()
#2  0x000000000041d0a9 in _TIFFFdOpen(int, char const*, char const*) ()
#3  0x0000000000413793 in CxImageTIF::Decode(CxFile*) ()
#4  0x000000000040395c in CxImage::Decode(CxFile*, unsigned long) ()
#5  0x0000000000403c78 in CxImage::Decode(_IO_FILE*, unsigned long) ()
#6  0x0000000000403dc3 in CxImage::Load(char const*, unsigned long) ()
#7  0x0000000000402190 in main () at cximagetest.cpp:13