Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Scene3D cause application crash after upgrading project from Qt5.9 to Qt5.15
Forum Updated to NodeBB v4.3 + New Features

Scene3D cause application crash after upgrading project from Qt5.9 to Qt5.15

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 393 Views
  • 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.
  • L Offline
    L Offline
    Linfeng Mu
    wrote on last edited by
    #1

    I have been working on upgrading a Qt Quick project from Qt5.9 to Qt5.15 in Ubuntu22.04. The project can be compiled and run in Qt5.15, but it will crash after being started. it shows error as below:
    enter image description here

    After some testing on the code, I found it is Scene3D that caused the application crashing: if I comment the component using Scene3D, the application works fine. The Scene3D related code are used to read .obj file and display some 3D model

        Scene3D{
            anchors.fill: parent
            Entity {
                id: sceneRoot
                Camera {
                    id: camera
                    projectionType: CameraLens.OrthographicProjection   
                    nearPlane : 0.1 
                    farPlane : 1000.0
                    position: Qt.vector3d( 150, 0, 1 ) 
                    upVector: Qt.vector3d( 0, 1.0, 0 )    
                }
    
                components: [
                    RenderSettings{
                        activeFrameGraph: ForwardRenderer{
                            clearColor:  Qt.rgba(0,0.5,1,0);
                            camera: camera
                        }
                    },
    
                    InputSettings{}
                ]
    
                //ground
                Mesh {
                    id: meshG
                    source: "file:///home/chin/teachbox/joint-model/ground.obj"
                }
    
                Transform{
                    id:torTransformG
                    property real hAngle:0.0
                    translation: Qt.vector3d(1,-60,1) //(x,y,z)
                }
    
                PhongAlphaMaterial {
                    id: materialG
                    ambient:"#F1F1F1"
                    alpha: 1.0
                }
    
                Entity {
                    id: entityG
                    components: [meshG, materialG,torTransformG]
                }
    
                ....  // there are more entities like above
    
           }
       }
    
    
    

    I also tried to extract Scene3D related code to a seperated project, those codes worked fine, the application will not crash.

    So What the real root of such problem and how could I sovle it?

    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