lanmanck
12th September 2009, 05:50
i run my program on x86 perfectly.
when i move to ARM (S3c2440), it often prompts "Segmentation fault".(not illegal pointer)
and it is very very strange:
1、sometimes i should declear a variable as a global, not a member:
xxx.h
public:
int iii; //it report "Segmentation fault"
when i put it in xxx.cpp as a global variable:
static int iii;
it works!
2、sometimes i can't init a member in construction function:
Myclass::myclass()
{
bbb=0; //it report "Segmentation fault"
}
but sometimes i can declare it as a global,and init it.
3、sometime i cannot call QTClass's member function "setValue"(or others)
4、etc。。。
strangely, these situation do not happen on X86.
why?????
is there something i should do on arm platform, or my configuration is not correct?
when i move to ARM (S3c2440), it often prompts "Segmentation fault".(not illegal pointer)
and it is very very strange:
1、sometimes i should declear a variable as a global, not a member:
xxx.h
public:
int iii; //it report "Segmentation fault"
when i put it in xxx.cpp as a global variable:
static int iii;
it works!
2、sometimes i can't init a member in construction function:
Myclass::myclass()
{
bbb=0; //it report "Segmentation fault"
}
but sometimes i can declare it as a global,and init it.
3、sometime i cannot call QTClass's member function "setValue"(or others)
4、etc。。。
strangely, these situation do not happen on X86.
why?????
is there something i should do on arm platform, or my configuration is not correct?