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. The process was ended forcefully on Ubuntu but work well on MacOS
Forum Updated to NodeBB v4.3 + New Features

The process was ended forcefully on Ubuntu but work well on MacOS

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 835 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.
  • G Offline
    G Offline
    Geng.Y
    wrote on last edited by
    #1
    Starting /home/geng/Documents/build-SolarSystem-Desktop-Debug/SolarSystem...
    The program has unexpectedly finished.
    The process was ended forcefully.
    /home/geng/Documents/build-SolarSystem-Desktop-Debug/SolarSystem crashed.
    

    I just developed the program on MacOS and now transfer it to Ubuntu 18.04. After everything is set, there is no error but the program always unexpectedly finished. Could you help me figure out this? I have attached the .pro file. Thank you!

    #-------------------------------------------------
    #
    # Project created by QtCreator 2018-11-20T13:38:53
    #
    #-------------------------------------------------
    
    QT       += core gui opengl
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = SolarSystem
    TEMPLATE = app
    
    # The following define makes your compiler emit warnings if you use
    # any feature of Qt which has 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 GL_SILENCE_DEPRECATION
    
    # 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
    INCLUDEPATH += $$PWD/src
    CONFIG += c++11
    
    SOURCES += \
            src/main.cpp \
            src/mainwindow.cpp \
            src/renderingwidget.cpp \
            src/AstronmicalObject.cpp \
            src/SolarSystem.cpp \
            src/paramform.cpp
    
    HEADERS += \
            src/mainwindow.h \
            src/renderingwidget.h \
            src/AstronmicalObject.h \
            src/SolarSystem.h \
        src/paramform.h
    
    
    FORMS += \
            mainwindow.ui \
            src/paramform.ui
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    #mac: LIBS += -framework GLUT
    #else:unix|win32: LIBS += -lGLUT
    LIBS += -lglut -lGLU
    
    RESOURCES += \
        qsrc.qrc
    
    
    K 1 Reply Last reply
    0
    • G Geng.Y
      Starting /home/geng/Documents/build-SolarSystem-Desktop-Debug/SolarSystem...
      The program has unexpectedly finished.
      The process was ended forcefully.
      /home/geng/Documents/build-SolarSystem-Desktop-Debug/SolarSystem crashed.
      

      I just developed the program on MacOS and now transfer it to Ubuntu 18.04. After everything is set, there is no error but the program always unexpectedly finished. Could you help me figure out this? I have attached the .pro file. Thank you!

      #-------------------------------------------------
      #
      # Project created by QtCreator 2018-11-20T13:38:53
      #
      #-------------------------------------------------
      
      QT       += core gui opengl
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      TARGET = SolarSystem
      TEMPLATE = app
      
      # The following define makes your compiler emit warnings if you use
      # any feature of Qt which has 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 GL_SILENCE_DEPRECATION
      
      # 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
      INCLUDEPATH += $$PWD/src
      CONFIG += c++11
      
      SOURCES += \
              src/main.cpp \
              src/mainwindow.cpp \
              src/renderingwidget.cpp \
              src/AstronmicalObject.cpp \
              src/SolarSystem.cpp \
              src/paramform.cpp
      
      HEADERS += \
              src/mainwindow.h \
              src/renderingwidget.h \
              src/AstronmicalObject.h \
              src/SolarSystem.h \
          src/paramform.h
      
      
      FORMS += \
              mainwindow.ui \
              src/paramform.ui
      
      # Default rules for deployment.
      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target
      
      #mac: LIBS += -framework GLUT
      #else:unix|win32: LIBS += -lGLUT
      LIBS += -lglut -lGLU
      
      RESOURCES += \
          qsrc.qrc
      
      
      K Offline
      K Offline
      koahnig
      wrote on last edited by koahnig
      #2

      @Geng.Y

      The best approach would be to compile with debug option and start the debugger. There you will see if you can reach the first statements or if it is already during startup.

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

      1 Reply Last reply
      2
      • G Offline
        G Offline
        Geng.Y
        wrote on last edited by
        #3

        Thank you, I have tried and fixed that. This is caused by null pointer. Though I still don't know why the function works well on MacOS.

        JKSHJ 1 Reply Last reply
        0
        • G Geng.Y

          Thank you, I have tried and fixed that. This is caused by null pointer. Though I still don't know why the function works well on MacOS.

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by JKSH
          #4

          @Geng.Y said in The process was ended forcefully on Ubuntu but work well on MacOS:

          This is caused by null pointer. Though I still don't know why the function works well on MacOS.

          It's just a coincidence. Even though it seems to work at first, it can crash in the future.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          3

          • Login

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