3D mesh rendering segmentation fault

Submitted by Pierluigi Passaro on May 24, 2014, 4:58 p.m. | Patch ID: 72683


Message ID 5380CFB6.7050105@phoenixsoftware.it
State Not Applicable, archived
Delegated to: Otavio Salvador
Headers show

Commit Message

Pierluigi Passaro May 24, 2014, 4:58 p.m.
Hi all,

On 22/05/2014 18:40, Otavio Salvador wrote:
> Hello,
> On Thu, May 22, 2014 at 6:55 AM, Pierluigi Passaro
> <pierluigi.passaro@phoenixsoftware.it> wrote:
>> Hi all,
>> I compiled daisy branch of meta-qt5 against daisy branch of meta-fsl-arm for
>> a SabreSD with iMX6 Dual Lite.
>> I need to import and render standard 3D mesh file formats as PLY, STL, OFF,
>> OBJ, 3DS, ...
>> When I try the load_model qt3d demo, the application crash for a
>> segmentation fault: attached you can find the gdb trace.
>> Do you have any suggestion on how to approach the problem?
> This seems to be a GPU driver issue. I am adding Lauren to Cc so she
> can comment if it is a known issue or not.
I'm still playing with the 3D mesh rendering and I have found a 
workaround to avoid the crash.
Attached you can find a patch that change the effect related to the 
"material" used for rendering the mesh.
I'm not smart enough with QT rendering framework to analyze how this 
patch can avoid the crash, but I hope could help someone to give me a 
suggestion on how to solve the original issue.

Best Regards

Patch hide | download patch | download mbox

diff --git a/examples/qt3d/load_model/load_model.cpp b/examples/qt3d/load_model/load_model.cpp
index 4b65da0..17b55c2 100644
--- a/examples/qt3d/load_model/load_model.cpp
+++ b/examples/qt3d/load_model/load_model.cpp
@@ -125,7 +125,7 @@  void FixNodesRecursive(int matIndex, QGLSceneNode* pNode)
     if (pNode) {
-        pNode->setEffect(QGL::FlatReplaceTexture2D);
+        pNode->setEffect(QGL::LitMaterial);
         foreach (QGLSceneNode* pCh, pNode->children()) {
             FixNodesRecursive(matIndex, pCh);
@@ -149,7 +149,7 @@  void LoadModelView::loadModels()
         QGLSceneNode* pTeapotSceneRoot = m_pTeapotScene->mainNode();
         int matIndex = pTeapotSceneRoot->palette()->addMaterial(mat);
-        pTeapotSceneRoot->setEffect(QGL::FlatReplaceTexture2D);
+        pTeapotSceneRoot->setEffect(QGL::LitMaterial);
@@ -168,7 +168,7 @@  void LoadModelView::loadModels()
         QGLSceneNode* pLanderSceneRoot = m_pLanderScene->mainNode();
         int matIndex = pLanderSceneRoot->palette()->addMaterial(mat);
-        pLanderSceneRoot->setEffect(QGL::FlatReplaceTexture2D);
+        pLanderSceneRoot->setEffect(QGL::LitMaterial);