nanogui: Segmentation Fault
Subject:
Re: [nanogui] Segmentation fault
From:
"Greg Haerr" ####@####.####
Date:
29 May 2006 01:34:11 +0100
Message-Id: <130d01c682b7$1e4bada0$6401a8c0@winXP>
My best guess would be to set nDataSize to a large number,
and see whether that changes anything. You might
try tracking down the code in nanox/srvnet.c that returns
the server data back to the client, as well as the nanox/client.c
code on the client side.
Regards,
Greg
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