PDA

View Full Version : Application crashing



addu
21st May 2009, 15:41
Hi

i am using Twitter api in my application..

I used only login api ...

My project is complied succesfully ...

When i am running , my application is crashed...


please help me

see my code..

Example.cpp




#include <QtGui>
#include "login.h"
#include "ui_login.h"
#include <QDebug>
Login::Login(QWidget *parent)
: QWidget(parent), ui(new Ui::LoginClass)
{
ui->setupUi(this);
ui->pushButton->setText("Login");
m_twitLib = new QTwitLib();
}

Login::~Login()
{
delete ui;
}

void Login::on_pushButton_clicked()
{
m_twitLib->Login(ui->lineEdit->text(),ui->lineEdit_2->text());
qDebug() << "ghuirgdfhngjesbfxcbnvfds";
}
void Login::OnError(QString error)
{
ui->textEdit->append("ERROR "+error);
} //================================================== ===================
void Login::OnMessageReceived(QString message)
{
ui->textEdit->append("MESSAGE "+message);
} //================================================== ===================
void Login::OnStatusReceived(SERVER::RESP response)
{
ui->textEdit->append("STATUS REC "+QString::number(response));
}

.

Example.h


#ifndef LOGIN_H
#define LOGIN_H
#include "QTwitLib.h"

#include <QtGui/QWidget>

namespace Ui
{
class LoginClass;
}

class Login : public QWidget
{
Q_OBJECT

public:
Login(QWidget *parent = 0);
~Login();
void OnError(QString error);
void OnMessageReceived(QString message);
void OnStatusReceived(SERVER::RESP response);
//void OnResponseReceived(Returnables::Response *);

private:
//void MakeConnections();
//void DisplayList(QLinkedList<Returnables::StatusElement*> list, QString header);

Ui::LoginClass *ui;
QTwitLib *m_twitLib;

private slots:
void on_pushButton_clicked();
};

#endif // LOGIN_H

Here



if i comment the m_twitLib ->Login ,it is showing ...otherwise it is not showing...

if you need full code... i will post it


please help me
Thanks

wysota
21st May 2009, 22:27
Please post a backtrace from the debugger.

addu
22nd May 2009, 05:33
Hi

i have included my debug details.... it showing login.ui is unfound...

faldzip
22nd May 2009, 08:03
it's compiler output and has nothing to do with debug backtrace. Just use debugger and you will see where the crash appeared.

addu
22nd May 2009, 08:16
Hi

Already i haven so many debugger statements...

complier is not entering even main .cpp ..



How do solve thisa issue...


Please help me

Thanks

spirit
22nd May 2009, 08:23
attach compilable example.

faldzip
22nd May 2009, 09:08
Hi

Already i haven so many debugger statements...

complier is not entering even main .cpp ..



How do solve thisa issue...


Please help me

Thanks
So it crashes or it doesn't compile? And do you know the difference between debugger and compiler?

addu
22nd May 2009, 09:39
No, please tell me the difference...

wysota
22nd May 2009, 09:52
http://en.wikipedia.org/wiki/Compiler
http://en.wikipedia.org/wiki/Debugger
http://www.gnu.org/s/libc/manual/html_node/Backtraces.html
https://wiki.ubuntu.com/Backtrace
http://en.wikipedia.org/wiki/Call_stack

faldzip
22nd May 2009, 10:37
No, please tell me the difference...
No, please use www.google.com (http://www.google.com) to get required knowledge to write, debug and deploy an application in C++.