<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Qt3D crash when using ids in the component list]]></title><description><![CDATA[<p dir="auto">The following QML document, when loaded by a simple C++ program using <code>QQmlApplicationEngine</code>, crashes.</p>
<pre><code>import QtQuick
import QtQuick.Scene3D
import Qt3D.Core
import Qt3D.Render
import Qt3D.Extras

Window {
    width: 640
    height: 480
    title: "hello, world!"
    visible: true
    Scene3D {
        anchors.fill: parent
        Entity {
            RenderSettings {
                id: renderSettings
                Viewport {
                    normalizedRect: Qt.rect(0, 0, 1, 1)
                    RenderSurfaceSelector {
                        ClearBuffers {
                            buffers: ClearBuffers.ColorDepthBuffer
                            clearColor: Qt.rgba(1, 0, 1, 1)
                            CameraSelector {
                                camera: Camera {}
                            }
                        }
                    }
                }
            }
            components: [renderSettings]
        }
    }
}
</code></pre>
<p dir="auto">The crash does not occur when running in a debugger. Running with an address sanitizer shows an access violation triggered by a call to <code>QJSValuePrivate::encode(struct QV4::Value const &amp;)</code>.</p>
<p dir="auto">If I place the <code>RenderSettings</code> declaration in the <code>components</code> array directly instead of using an id it works fine. Is this a Qt bug, or is there something I’m misunderstanding?</p>
<p dir="auto">On a slightly related note, why is it not possible to use a mix of both ids and inline declarations in the array (trying the <code>components: [ Component {}, componentId ]</code> syntax gives an error)?</p>
<p dir="auto">Edit: this is using Qt 6.4 on Windows, with either GCC MinGW or MSVC</p>
]]></description><link>https://forum.qt.io/topic/141351/qt3d-crash-when-using-ids-in-the-component-list</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 01:00:47 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/141351.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Dec 2022 14:46:30 GMT</pubDate><ttl>60</ttl></channel></rss>