codemonkey
19th January 2010, 08:59
I get a really strange segmentation fault and I've got no idea why I keep getting it.
If I would strip down the code (and move everything from .cpp file to .h file) , all that would remain is
class App:public QObject{
Q_OBJECT
public:
App(){}
void foo(){m_authenticated = false;}
private:
bool m_authenticated;
}
(it is too much code to post here so I hope this will be enough, else I will put the code on the net somewhere to download)
Now the problem is that the call to foo gives me a segmentation fault exactly when I try to access m_authenticated. I have no clue why. Do you? (I've tried the same thing with an int, and it fails. it also fails if it is declared public).
Any guesses or suggestions on how to debug?
If I would strip down the code (and move everything from .cpp file to .h file) , all that would remain is
class App:public QObject{
Q_OBJECT
public:
App(){}
void foo(){m_authenticated = false;}
private:
bool m_authenticated;
}
(it is too much code to post here so I hope this will be enough, else I will put the code on the net somewhere to download)
Now the problem is that the call to foo gives me a segmentation fault exactly when I try to access m_authenticated. I have no clue why. Do you? (I've tried the same thing with an int, and it fails. it also fails if it is declared public).
Any guesses or suggestions on how to debug?