Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. SEGV error when running an application on arm

SEGV error when running an application on arm

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 485 Views 2 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.
  • W Offline
    W Offline
    wowy
    wrote on last edited by koahnig
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you try running your application through the debugger ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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