Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Raspian Stretch + Qt 5.7.1: Hello World crashes
Forum Updated to NodeBB v4.3 + New Features

Raspian Stretch + Qt 5.7.1: Hello World crashes

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 2 Posters 682 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.
  • T Offline
    T Offline
    timertick_t
    wrote on last edited by
    #1

    Hi guys,
    I have a Raspberry Pi 3 model B with a brandnew stretch and Qt 5.7.1.
    When I compile a "Hello world" immediately after reboot "Hello world" works. After theat it always crashes:

    Starting /home/pi/schrott/build-untitled_1-Desktop-Release/untitled_1...
    qt5ct: using qt5ct plugin
    qt5ct: D-Bus global menu: no
    The program has unexpectedly finished.
    /home/pi/schrott/build-untitled_1-Desktop-Release/untitled_1 crashed. 
    

    Any idea?

    raven-worxR 1 Reply Last reply
    0
    • T timertick_t

      Hi guys,
      I have a Raspberry Pi 3 model B with a brandnew stretch and Qt 5.7.1.
      When I compile a "Hello world" immediately after reboot "Hello world" works. After theat it always crashes:

      Starting /home/pi/schrott/build-untitled_1-Desktop-Release/untitled_1...
      qt5ct: using qt5ct plugin
      qt5ct: D-Bus global menu: no
      The program has unexpectedly finished.
      /home/pi/schrott/build-untitled_1-Desktop-Release/untitled_1 crashed. 
      

      Any idea?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @timertick_t
      build debug and use gdb to at least get a stacktrace.
      And some lines of code of yours would also help.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • T Offline
        T Offline
        timertick_t
        wrote on last edited by
        #3

        @raven-worx said in Raspian Stretch + Qt 5.7.1: Hello World crashes:

        stacktrace

        Thank you for your help.
        Let me first say that I tried many newer Qt install versions on my Raspberry for which most of them never really worked. So maybe smething goes south during the installation process already.

        It's a standard out of the box hello world like:
        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;
        }
        

        main.cpp:

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

        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
        

        untitled.pro:

        #-------------------------------------------------
        #
        # Project created by QtCreator 2019-03-24T15:40:21
        #
        #-------------------------------------------------
        
        QT       += core gui
        
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
        
        TARGET = untitled_1
        TEMPLATE = app
        
        # The following define makes your compiler emit warnings if you use
        # any feature of Qt which as been marked as deprecated (the exact warnings
        # depend on your compiler). Please consult the documentation of the
        # deprecated API in order to know how to port your code away from it.
        DEFINES += QT_DEPRECATED_WARNINGS
        
        # You can also make your code fail to compile if you use deprecated APIs.
        # In order to do so, uncomment the following line.
        # You can also select to disable deprecated APIs only up to a certain version of Qt.
        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
        
        
        SOURCES += main.cpp\
                mainwindow.cpp
        
        HEADERS  += mainwindow.h
        
        FORMS    += mainwindow.ui
        

        I have set a brakepoint in mainwindow.cpp, line 6.

            ui(new Ui::MainWindow)
        

        Debugger console gives me:

        Debugging starts
        &"warning: GDB: Failed to set controlling terminal: Unpassender IOCTL (I/O-Control) f\303\274r das Ger\303\244t\n"
        Unable to find dynamic linker breakpoint function.
        GDB will be unable to debug shared library initializers
        and track explicitly loaded dynamic code.Could not load shared library symbols for 32 libraries, e.g. /usr/lib/arm-linux-gnueabihf/libarmmem.so.
        Use the "info sharedlibrary" command to see the complete listing.
        Do you need "set solib-search-path" or "set sysroot"?
        qt5ct: using qt5ct plugin
        

        The debugger is unchartered waters for me. No idea what really happens at the moment.

        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