nanogui: Segmentation Fault


Previous by date: 23 May 2006 13:26:04 +0100 Re: GrCopyArea is blocking on X11, Martin Hansen
Next by date: 23 May 2006 13:26:04 +0100 unrecognised emulation mode, Tan Ying Liang
Previous in thread: 23 May 2006 13:26:04 +0100 Re: segmentation fault, Greg Haerr
Next in thread: 23 May 2006 13:26:04 +0100 Re: Segmentation fault, Greg Haerr

Subject: Segmentation fault
From: "rajan Singh" ####@####.####
Date: 23 May 2006 13:26:04 +0100
Message-Id: <7afad4a10605230525k32feb47ai2cbf210a03d8a7a5@mail.gmail.com>

the following code is generating Segmentation fault at the nano-x server,
please help.
The Fault occurs at GrReadArea(...)

        size_t nDataSize = 0;

        GrGetWindowInfo(GR_ROOT_WINDOW_ID, &info);

        nDataSize = sizeof(GR_PIXELVAL) * info.width * info.height;

        data = reinterpret_cast<GR_PIXELVAL*>(new char[nDataSize]);

        if (data == NULL)
        {
                cout << "failed to malloc mem for buffer\n";
        }

        // Fault occurs here
        GrReadArea(GR_ROOT_WINDOW_ID, info.x, info.y, info.width,
info.height, data);

-- 
Rajan Singh Raghuvanshi

Previous by date: 23 May 2006 13:26:04 +0100 Re: GrCopyArea is blocking on X11, Martin Hansen
Next by date: 23 May 2006 13:26:04 +0100 unrecognised emulation mode, Tan Ying Liang
Previous in thread: 23 May 2006 13:26:04 +0100 Re: segmentation fault, Greg Haerr
Next in thread: 23 May 2006 13:26:04 +0100 Re: Segmentation fault, Greg Haerr


Powered by ezmlm-browse 0.20.