
Mon, 08/28/2006 - 19:15
Forums:
Hello,
I'm just trying to define a V3d_Light in order to use it with a V3d_Viewer.
Handle(V3d_Light) myLight;
myLight->SetColor(Quantity_NOC_WHITE);
The SetColor results in a segmentation fault, gdb returns :
Program received signal SIGSEGV, Segmentation fault.
0xb4faaacc in V3d_Light::SetColor (this=0xfefd0000, aColor=@0xfefd0000) at ../../../inc/Handle_Visual3d_Light.hxx:78
78 {
Am i doing something wrong ?
Mon, 08/28/2006 - 22:43
Handle(V3d_Light) myLight; <-- that gives you a pointer, but not an object
myLight->SetColor(Quantity_NOC_WHITE); <-- since myLight references no object, you get a segfault
Tue, 08/29/2006 - 04:19
Thanks Jan.