The process was ended forcefully on Ubuntu but work well on MacOS
Unsolved
General and Desktop
-
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
-
@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.