Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Qt designer program exited with code -1073741515
Forum Updated to NodeBB v4.3 + New Features

[Solved] Qt designer program exited with code -1073741515

Scheduled Pinned Locked Moved General and Desktop
11 Posts 5 Posters 12.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Eastborn
    wrote on last edited by
    #1

    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 += webkit

    TARGET = QTWebUI
    TEMPLATE = app

    SOURCES += main.cpp
    mainwebwindow.cpp
    qskclasses.cpp

    HEADERS += mainwebwindow.h
    qskclasses.h

    FORMS += 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 sources

    CONFIG -= app_bundle
    CONFIG += x86

    TARGET = videocalls
    DEFINES += SKYPEKIT_SURFACE_RENDERING
    DEFINES += SSL_LIB_CYASSL

    win32 {
    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/pthread

    LIBS += $${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/win

    LIBS += $${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&#40;&#41;;
    }
    

    }
    @

    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_OBJECT

    public:
    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
    @

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Eastborn
      wrote on last edited by
      #2

      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_OBJECT

      public:
      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;
      }

      @

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on last edited by
        #3

        So, when you run it in a debugger, where in your code does it show the error is occurring?

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        1 Reply Last reply
        0
        • E Offline
          E Offline
          Eastborn
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            Is your main.cpp compiled without error/warning as you have posted above?

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • E Offline
              E Offline
              Eastborn
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                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(&#41;;
                }
                

                }
                @
                [/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.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • E Offline
                  E Offline
                  Eastborn
                  wrote on last edited by
                  #8

                  i got it fixed, it were dlls that were missing in the debug folder...

                  sorry to bother anyone here
                  and thanks for your support

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #9

                    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.

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      soheil1365
                      wrote on last edited by
                      #10

                      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 is

                      Starting 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

                      1 Reply Last reply
                      0
                      • V Offline
                        V Offline
                        vivekmalik2466
                        wrote on last edited by
                        #11

                        you have to put the necessary third party library dll files beside your exe file.

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved