M
Marc R.
Hi there,
consider the following code:
#include "stdafx.h"
int main(int argc, char* argv[]) {
const int Xres = 600;
const int Yres = 600;
std:air<float,float> dispFNabla[Yres][Xres];
std:air<float,float> dispFNabla2[Yres][Xres];
std:air<float,float> dispFNabla3[Yres][Xres];
std:air<float,float> dispFNabla4[Yres][Xres];
std:air<float,float> dispFNabla5[Yres][Xres];
std:air<float,float> dispFNabla6[Yres][Xres];
std:air<float,float> dispFNabla7[Yres][Xres];
std:air<float,float> depthFNablaZ[Yres][Xres];
float depthHessZ[Yres][Xres][4];
return 0;
}
Why in the world could it generate a segmentation fault? :
(gdb) run
Starting program: /local/home/neo/BT/P/MicroDepth
Failed to read a valid object file image from memory.
Program received signal SIGSEGV, Segmentation fault.
0x08048e0c in main () at src/MicroDepth.cxx:6
6 std:air<float,float> dispFNabla[Yres][Xres];
(gdb) print dispFNabla
$1 = {{{first = 0, second = 0} <repeats 600 times>} <repeats 599
times>, {{
first = 0, second = 0} <repeats 277 times>, {first =
-2.67723372e-05,
second = -1.70868349}, {first = -2.89307955e-05,
second = -2.45322353e-05}, {first = -2.6772359e-05,
<snip>
second = 1.40129846e-45}...}}
(gdb) print dispFNabla2
$2 = {{{first = 0, second = 0} <repeats 600 times>} <repeats 600
times>}
(gdb) print dispFNabla3
Cannot access memory at address 0xbf66030c
(gdb) print dispFNabla4
Cannot access memory at address 0xbf3a110c
Regards,
Marc
consider the following code:
#include "stdafx.h"
int main(int argc, char* argv[]) {
const int Xres = 600;
const int Yres = 600;
std:air<float,float> dispFNabla[Yres][Xres];
std:air<float,float> dispFNabla2[Yres][Xres];
std:air<float,float> dispFNabla3[Yres][Xres];
std:air<float,float> dispFNabla4[Yres][Xres];
std:air<float,float> dispFNabla5[Yres][Xres];
std:air<float,float> dispFNabla6[Yres][Xres];
std:air<float,float> dispFNabla7[Yres][Xres];
std:air<float,float> depthFNablaZ[Yres][Xres];
float depthHessZ[Yres][Xres][4];
return 0;
}
Why in the world could it generate a segmentation fault? :
(gdb) run
Starting program: /local/home/neo/BT/P/MicroDepth
Failed to read a valid object file image from memory.
Program received signal SIGSEGV, Segmentation fault.
0x08048e0c in main () at src/MicroDepth.cxx:6
6 std:air<float,float> dispFNabla[Yres][Xres];
(gdb) print dispFNabla
$1 = {{{first = 0, second = 0} <repeats 600 times>} <repeats 599
times>, {{
first = 0, second = 0} <repeats 277 times>, {first =
-2.67723372e-05,
second = -1.70868349}, {first = -2.89307955e-05,
second = -2.45322353e-05}, {first = -2.6772359e-05,
<snip>
second = 1.40129846e-45}...}}
(gdb) print dispFNabla2
$2 = {{{first = 0, second = 0} <repeats 600 times>} <repeats 600
times>}
(gdb) print dispFNabla3
Cannot access memory at address 0xbf66030c
(gdb) print dispFNabla4
Cannot access memory at address 0xbf3a110c
Regards,
Marc