debugging issue

Hello forum,

I am using gdb to debug my ray tracer and one point i am getting the following information from the debugger:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Program received signal SIGSEGV, Segmentation fault.
0x2efd85ba in ?? ()
(gdb) backtrace
#0  0x2efd85ba in ?? ()
#1  0x0804e0d9 in AreaLight::calculateSampleDirection (this=0x80c4d60, 
    intersection=..., sampleVector=...) at arealight.cpp:139
#2  0x08055c6d in Intersection::getShadowRay (this=0xbfffedfc, light=0x80c4d60)
    at intersection.cpp:152
#3  0x08069d07 in PathTracer::computeDirectIllumination (this=0xbffff220, 
    intersection=...) at pathtracer.cpp:179
#4  0x0806a95f in PathTracer::computeRadiance (this=0xbffff220, 
    intersection=..., depth=5) at pathtracer.cpp:141
#5  0x0806abbf in PathTracer::trace (this=0xbffff220, ray=..., E=1)
    at pathtracer.cpp:127
#6  0x0806ae60 in PathTracer::tracePixel (this=0xbffff220, x=0, y=7)
    at pathtracer.cpp:95
#7  0x0806af94 in PathTracer::computeImage() [clone ._omp_fn.0] ()
    at pathtracer.cpp:53
#8  0x0806b1c6 in PathTracer::computeImage (this=0xbffff220)
    at pathtracer.cpp:47
#9  0x0804c397 in main (argc=1, argv=0xbffff304) at main.cpp:504


As you can see that the place that i am getting segmentation fault is not saying what is the problem at #0

Any hint?


Regards
Sajjad
Compile with debug information.
Checkout the #1 frame to know what it calls.
The problem at #0 is where the segFault actually occurs. Because you cannot see anything about it, whatever that is does not have debugging information. It is probably not your code.

You are passing into that code something bad. Go up one level to your code. See what you're doing there. Something is bad in file arealight.cpp at line 139.
Topic archived. No new replies allowed.