[Solved] Qt designer program exited with code -1073741515
-
Hey everyone,
i am stuck with this problem for a full week now,
when i got the qt engine to include the header of a class of mine i thought i fixed it but now it exists unexpectedly..i know it is not a dll error because i added them correctly (also include skypekit for future work)
but i wanted a class that could connect with the UI independently, this is the QSKSignalDispatcher(its very small for now)
but after i got it to work with the compiler of qt it doesnt work anymore...
sorry if i am unclear, but i am new to the whole forum thing and i am also a beginner in c++
Eastborn
.pro file
@#-------------------------------------------------Project created by QtCreator 2012-02-20T11:37:24
#-------------------------------------------------
QT += core gui
QT += webkitTARGET = QTWebUI
TEMPLATE = appSOURCES += main.cpp
mainwebwindow.cpp
qskclasses.cppHEADERS += mainwebwindow.h
qskclasses.hFORMS += mainwebwindow.ui
target.path = $$[QT_INSTALL_EXAMPLES]/webkit/QTWebUI
sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro form.html images
sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/QTWebUI
INSTALLS += target sourcesCONFIG -= app_bundle
CONFIG += x86TARGET = videocalls
DEFINES += SKYPEKIT_SURFACE_RENDERING
DEFINES += SSL_LIB_CYASSLwin32 {
DEFINES += _WIN32
}!win32 {
DEFINES += VIDEO_TRANSPORT_SYSV
DEFINES += VIDEO_TRANSPORT_POSIX
}DISTROROOT = ../../../Skypekit/
WINLIBPATH = "blabla/Microsoft SDKs/Windows/v7.0A/Lib/"INCLUDEPATH += $${DISTROROOT}interfaces/skype/cpp_embedded/src/api
$${DISTROROOT}interfaces/skype/cpp_embedded/src/ipc
$${DISTROROOT}interfaces/skype/cpp_embedded/src/types
$${DISTROROOT}interfaces/skype/cpp_embedded/src/platform/threading
$${DISTROROOT}ipc/cpp
$${DISTROROOT}ipc/cpp/platform/se
$${DISTROROOT}ipc/cpp/ssl/cyassl/include
$${DISTROROOT}ipc/cpp/ssl/cyassl/ctaocrypt/include
$${DISTROROOT}ipc/cpp/ssl/cyassl/include/openssl
$${DISTROROOT}ipc/cpp/VideoBuffers
$${DISTROROOT}examples/cpp/tutorial/keypair!win32 {
INCLUDEPATH += $${DISTROROOT}interfaces/skype/cpp_embedded/src/platform/threading/pthreadLIBS += $${DISTROROOT}interfaces/skype/cpp_embedded/build/libskypekit-cppwrapper_2_lib.a LIBS += $${DISTROROOT}interfaces/skype/cpp_embedded/build/libskypekit-cyassl_lib.a
}
win32 {
INCLUDEPATH += $${DISTROROOT}interfaces/skype/cpp_embedded/src/platform/threading/winLIBS += $${WINLIBPATH}WS2_32.Lib LIBS += $${WINLIBPATH}Advapi32.lib LIBS += $${DISTROROOT}interfaces/skype/cpp_embedded/build/skypekit-cyassl_lib.lib LIBS += $${DISTROROOT}interfaces/skype/cpp_embedded/build/skypekit-cppwrapper_2_lib.lib
}
@main.cpp
@#include <QtGui/QApplication>
#include "mainwebwindow.h"
#include "qskclasses.h"MainWebWindow* mainForm = 0;
QSKSignalDispatcher* dispatcher = 0;int main(int argc, char *argv[])
{
QApplication a(argc, argv);mainForm = new MainWebWindow(); dispatcher = new QSKSignalDispatcher(mainForm); dispatcher->ConnectToUI(); mainForm->show(); #ifdef WIN32 QString runtimePath = "..//..//..//Skypekit//bin//windows-x86-skypekit.exe"; #endif #ifdef __APPLE__ QString runtimePath = "..//..//..//Skypekit//bin//windows-x86-skypekit.exe"; #endif #ifdef __linux__ QString runtimePath = "..//..//..//Skypekit//bin//windows-x86-skypekit.exe"; #endif QProcess runtime; if (!runtime.startDetached(runtimePath)) { qDebug() <<"ERROR: Unable to execute " + runtimePath; } else { return a.exec(); }
}
@mainwebwindow.h
@#ifndef MAINWEBWINDOW_H
#define MAINWEBWINDOW_H#include <QMainWindow>
#include <QWebPage>
#include <QWebFrame>
#include <QWebElement>
#include <QDebug>
#include <QIcon>
#include <QPixmap>
#include <QImage>
#include <QProcess>namespace Ui {
class MainWebWindow;
}class MainWebWindow : public QMainWindow
{
Q_OBJECTpublic:
virtual void resizeEvent(QResizeEvent *evt);
explicit MainWebWindow(QWidget *parent = 0);
~MainWebWindow();public slots:
void on_LogMessage(QString S);
void initialPage(bool good);
void setValue(int progress);
void populateJavaScriptWindowObject();
bool submit();private:
Ui::MainWebWindow *ui;
};#endif // MAINWEBWINDOW_H
@ -
mainwebwindow.cpp
@#include "mainwebwindow.h"
#include "ui_mainwebwindow.h"MainWebWindow::MainWebWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWebWindow)
{
ui->setupUi(this);ui->statusBar->setStatusTip("Loading..."); ui->statusBar->showMessage("Loading...",1000); connect(ui->mainView, SIGNAL(loadFinished(bool)), this, SLOT(initialPage(bool))); connect(ui->mainView, SIGNAL(loadProgress(int)), this, SLOT(setValue(int))); ui->mainView->setUrl(QUrl(QString("http://www.showrush.com/client/index.php"))); ui->mainView->setContextMenuPolicy(Qt::PreventContextMenu); connect(ui->mainView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(populateJavaScriptWindowObject()));
}
MainWebWindow::~MainWebWindow()
{
delete ui;
}void MainWebWindow::resizeEvent(QResizeEvent *) {
ui->mainView->move(0,0);
ui->mainView->resize(ui->centralWidget->width(),ui->centralWidget->height());
}void MainWebWindow::initialPage(bool good) {
good = true;
ui->statusBar->setStatusTip("Done");
ui->statusBar->showMessage("Done",5000);
this->setWindowTitle(ui->mainView->title());
}void MainWebWindow::setValue(int progress) {
ui->statusBar->setStatusTip("Loading...\t"+QString().setNum(progress)+"%");
ui->statusBar->showMessage("Loading...\t"+QString().setNum(progress)+"%",1000);
}
void MainWebWindow::populateJavaScriptWindowObject() {
ui->mainView->page()->mainFrame()->addToJavaScriptWindowObject("login", this);
}bool MainWebWindow::submit() {
QWebFrame *frame = ui->mainView->page()->mainFrame();QWebElement username = frame->findFirstElement("#username"); QWebElement password = frame->findFirstElement("#password"); QWebElement submit = frame->findFirstElement("#submit"); return false;
}
void MainWebWindow::on_LogMessage(QString S){
qDebug() << "log: "<<S;
}
@qskclasses.h
@#ifndef QSKCLASSES_H
#define QSKCLASSES_H//class MainWebWindow;
#include "mainwebwindow.h"
class QSKSignalDispatcher : public QObject
{
Q_OBJECTpublic:
void ConnectToUI();
explicit QSKSignalDispatcher(MainWebWindow *window);
void log(QString S);
~QSKSignalDispatcher();signals:
void SendToLogSignal (QString);private:
MainWebWindow *mainFrame;};
#endif // QSKCLASSES_H
@qskclasses.cpp
@#include "qskclasses.h"
#include <QObject>void QSKSignalDispatcher::ConnectToUI()
{
// Connecting signals from SkypeKit side (dispatcher) to GUI side (mainForm)
QObject::connect (
this, SIGNAL (SendToLogSignal(QString)),
this->mainFrame, SLOT (on_LogMessage(QString))
);
};QSKSignalDispatcher::QSKSignalDispatcher(MainWebWindow *window) : QObject()
{
this->mainFrame = window;
this->log("SignalDispatcher created");
}void QSKSignalDispatcher::log(QString S) {
emit SendToLogSignal(S);
}QSKSignalDispatcher::~QSKSignalDispatcher()
{
delete this;
}@
-
So, when you run it in a debugger, where in your code does it show the error is occurring?
-
i tried doing qDebug() << "startup" at the start of the main.cpp but it wasnt shown in the console when i debug it it just quits when i start it up.
-
Is your main.cpp compiled without error/warning as you have posted above?
-
yes it is compile error-free and not even warnings, i did have one when i wanted to implement skype but that was because fopen() was unsafe, but i dont have this code in anymore and it is completely error/warning free
-
Well, in starting your thread you have posted:
[quote author="Eastborn" date="1329839165"]
main.cpp
@#include <QtGui/QApplication>
#include "mainwebwindow.h"
#include "qskclasses.h"MainWebWindow* mainForm = 0;
QSKSignalDispatcher* dispatcher = 0;int main(int argc, char *argv[])
{
QApplication a(argc, argv);mainForm = new MainWebWindow(); dispatcher = new QSKSignalDispatcher(mainForm); dispatcher->ConnectToUI(); mainForm->show(); #ifdef WIN32 QString runtimePath = "..//..//..//Skypekit//bin//windows-x86-skypekit.exe"; #endif #ifdef __APPLE__ QString runtimePath = "..//..//..//Skypekit//bin//windows-x86-skypekit.exe"; #endif #ifdef __linux__ QString runtimePath = "..//..//..//Skypekit//bin//windows-x86-skypekit.exe"; #endif QProcess runtime; if (!runtime.startDetached(runtimePath)) { qDebug() <<"ERROR: Unable to execute " + runtimePath; } else { return a.exec(); }
}
@
[/quote]Not all return pathes are providing a return value. So, I would expect at least a warning, when it is not an error.
So, the information posted may be inconsistent.
From your post I understand that you are not even been able to see the output. You may want to check also that your main is the main you are thinking it is.Anyhow, I would suggest to eliminate functionality by commenting out. You have to vary until you find the source of problem.
-
i got it fixed, it were dlls that were missing in the debug folder...
sorry to bother anyone here
and thanks for your support -
You are welcome
All people go through such experiences. ;-)
Please remember marking your thread with [solved] in the title next time. I have done it for you.
-
sorry my friends
I have this problem too
I build my application in Qt creator but I cannot run it.
Can you help me in detail because I am new comer in Qt and opencv ...which dll and where should I add to oveercome this problem? thanks a lot in advance...
Error isStarting F:\Qts\Test1\Test1-build-desktop-Qt_4_8_1_for_Desktop_-MinGW__Qt_SDK__Debug\debug\Test1.exe...
The program has unexpectedly finished.
F:\Qts\Test1\Test1-build-desktop-Qt_4_8_1_for_Desktop-_MinGW__Qt_SDK__Debug\debug\Test1.exe exited with code -1073741819 -
you have to put the necessary third party library dll files beside your exe file.