PDA

View Full Version : Crashing on exiting



duave
31st March 2011, 07:08
Hey guys,

I was wondering what might be causing this error I'm having - basically when I put any kind of variable in my class header file it crashes the program when I exit..

Example:
My current header file contains
#ifndef TIMINGSETTINGS_H
#define TIMINGSETTINGS_H

#include <QDialog>

namespace Ui {
class TimingSettings;
}

class TimingSettings : public QDialog
{
Q_OBJECT

public:
explicit TimingSettings(QWidget *parent = 0);
~TimingSettings();
void AllowClearTimeChange();

private:
Ui::TimingSettings *ui;

private slots:
void CheckClearTime();
void ChangePurgeTime();
void ChangeReportingTime();
void CheckClearCheckBox();
};

#endif // TIMINGSETTINGS_H


----------
It blows up on exiting if I change it like the following (adding the int testVariable):
#ifndef TIMINGSETTINGS_H
#define TIMINGSETTINGS_H

#include <QDialog>

namespace Ui {
class TimingSettings;
}

class TimingSettings : public QDialog
{
Q_OBJECT

public:
explicit TimingSettings(QWidget *parent = 0);
~TimingSettings();
void AllowClearTimeChange();
int testVariable;

private:
Ui::TimingSettings *ui;

private slots:
void CheckClearTime();
void ChangePurgeTime();
void ChangeReportingTime();
void CheckClearCheckBox();
};

#endif // TIMINGSETTINGS_H


Any tips on what might be causing this? I don't do anything with the variable - just the declaration alone causes the crashing..

Thanks in advance!

high_flyer
31st March 2011, 08:45
We can't tell from the header, show the implementation.

wysota
31st March 2011, 13:16
I'd suggest rebuilding the project from scratch. Other than that I agree with high_flyer.

Gokulnathvc
31st March 2011, 13:30
Improve the question.. Add more codes

duave
31st March 2011, 15:39
Ahh, rebuilding it fixed it - thanks wysota.