SEGV error when running an application on arm



  • Hi,

    I am trying to run a little application on my target (simply a window, no button, no text, just a window) but when i try to run it like :
    ./app -qws

    Nothing appear on screen and i get a "SEGV" message on the terminal.
    After searching for this kind of error i often read that i could happen because a program try to have acces to a part of the memory who either don't exist on which it don't have the right to use. (i chmod 777 the program to give it all rights)

    I know the compiler is working because i can generate a little .c file which will make a print 'hello world' on the terminal but now i would like to use the screen with my board

    In Qt creator the files are :
    mainwindow.h :

    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H
    #include <QMainWindow>
    namespace Ui {
    class MainWindow;
    }
    class MainWindow : public QMainWindow
    {
        Q_OBJECT
    public:
        explicit MainWindow(QWidget *parent = 0);
        ~MainWindow();
    private:
        Ui::MainWindow *ui;
    };
    #endif // MAINWINDOW_H
    

    A main.cpp:

    #include "mainwindow.h"
    #include <QApplication>
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        MainWindow w;
        w.show();
        return a.exec();
    }
    

    and a mainwindow.cpp

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    MainWindow::MainWindow(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
    }
    MainWindow::~MainWindow()
    {
        delete ui;
    }
    
    

    [edit: koahnig] code tags adjusted


  • Lifetime Qt Champion

    Hi,

    Did you try running your application through the debugger ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.