App goes in core dump if the physics = true is istantiated at startup in heavy scenes #114

Open
opened 2015-06-30 18:25:34 +00:00 by rpadovani · 5 comments
rpadovani commented 2015-06-30 18:25:34 +00:00 (Migrated from github.com)

In very heavy scenes (sorry, not able to provide a useful code right now) if physics: true the app produces a core dump.

The same code works if I use Component.onCompleted: physics = true.

Here the backtrack:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fc3f68d7230 in QList<ContactEvent>::QList(QList<ContactEvent> const&) ()
   from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so
(gdb) bt
#0  0x00007fc3f68d7230 in QList<ContactEvent>::QList(QList<ContactEvent> const&) ()
   from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so
#1  0x00007fc3f68d7013 in Box2DWorld::SayGoodbye(b2Fixture*) ()
   from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so
#2  0x00007fc3f68bf851 in b2World::DestroyBody(b2Body*) ()
   from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so
#3  0x00007fc3f68d8f2d in Box2DBody::setWorld(Box2DWorld*) ()
   from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so
#4  0x00007fc3f68f5f3c in Box2DBody::qt_metacall(QMetaObject::Call, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so
#5  0x00007fc40e526944 in QQmlVMEMetaObject::metaCall(QMetaObject::Call, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#6  0x00007fc40e541b7f in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7  0x00007fc40e5435fb in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#8  0x00007fc40e543d31 in QQmlPropertyPrivate::writeBinding(QObject*, QQmlPropertyData const&, QQmlContextData*, QQmlJavaScriptExpression*, QV4::ValueRef, bool, QFlags<QQmlPropertyPrivate::WriteFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#9  0x00007fc40e5b851c in QQmlBinding::update(QFlags<QQmlPropertyPrivate::WriteFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#10 0x00007fc40e5b8c7e in QQmlBinding::expressionChanged(QQmlJavaScriptExpression*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#11 0x00007fc40e592497 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#12 0x00007fc40e52f10c in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#13 0x00007fc40f324141 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007fc3f68e238b in Scene::initializeEntities(QQuickItem*) ()
   from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so
#15 0x00007fc3f68e2604 in Scene::componentComplete() ()
   from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so
#16 0x00007fc40e5c19c7 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#17 0x00007fc40e545bab in QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#18 0x00007fc40e545c67 in QQmlComponentPrivate::completeCreate() ()
   from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#19 0x00007fc40e547d70 in QQmlComponent::create(QQmlContext*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#20 0x00007fc40fcf51ab in QQuickView::continueExecute() ()
   from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#21 0x00007fc40fcf55fd in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#22 0x0000000000400d2f in main ()

I'll try to provide other useful informations asap

In very heavy scenes (sorry, not able to provide a useful code right now) if `physics: true` the app produces a core dump. The same code works if I use `Component.onCompleted: physics = true`. Here the backtrack: ``` Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007fc3f68d7230 in QList<ContactEvent>::QList(QList<ContactEvent> const&) () from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so (gdb) bt #0 0x00007fc3f68d7230 in QList<ContactEvent>::QList(QList<ContactEvent> const&) () from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so #1 0x00007fc3f68d7013 in Box2DWorld::SayGoodbye(b2Fixture*) () from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so #2 0x00007fc3f68bf851 in b2World::DestroyBody(b2Body*) () from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so #3 0x00007fc3f68d8f2d in Box2DBody::setWorld(Box2DWorld*) () from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so #4 0x00007fc3f68f5f3c in Box2DBody::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so #5 0x00007fc40e526944 in QQmlVMEMetaObject::metaCall(QMetaObject::Call, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #6 0x00007fc40e541b7f in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #7 0x00007fc40e5435fb in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #8 0x00007fc40e543d31 in QQmlPropertyPrivate::writeBinding(QObject*, QQmlPropertyData const&, QQmlContextData*, QQmlJavaScriptExpression*, QV4::ValueRef, bool, QFlags<QQmlPropertyPrivate::WriteFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #9 0x00007fc40e5b851c in QQmlBinding::update(QFlags<QQmlPropertyPrivate::WriteFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #10 0x00007fc40e5b8c7e in QQmlBinding::expressionChanged(QQmlJavaScriptExpression*) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #11 0x00007fc40e592497 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #12 0x00007fc40e52f10c in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #13 0x00007fc40f324141 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #14 0x00007fc3f68e238b in Scene::initializeEntities(QQuickItem*) () from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so #15 0x00007fc3f68e2604 in Scene::componentComplete() () from /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so #16 0x00007fc40e5c19c7 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #17 0x00007fc40e545bab in QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #18 0x00007fc40e545c67 in QQmlComponentPrivate::completeCreate() () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #19 0x00007fc40e547d70 in QQmlComponent::create(QQmlContext*) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #20 0x00007fc40fcf51ab in QQuickView::continueExecute() () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5 #21 0x00007fc40fcf55fd in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5 #22 0x0000000000400d2f in main () ``` I'll try to provide other useful informations asap
mdkcore0 commented 2015-07-01 01:33:47 +00:00 (Migrated from github.com)

happen on which platform? desktop? mobile?

can you provide a minimal code that the problem occurs with you??

thanks

happen on which platform? desktop? mobile? can you provide a minimal code that the problem occurs with you?? thanks
kenvandine commented 2015-07-01 02:15:00 +00:00 (Migrated from github.com)

Looks like amd64 Ubuntu. Are you using the Ubuntu packages or built from
git? Code sample would be helpful.
On Jun 30, 2015 9:33 PM, "Rodrigo Oliveira" notifications@github.com
wrote:

happen on which platform? desktop? mobile?

can you provide a minimal code that the problem occurs with you??

thanks


Reply to this email directly or view it on GitHub
https://github.com/Bacon2D/Bacon2D/issues/114#issuecomment-117387193.

Looks like amd64 Ubuntu. Are you using the Ubuntu packages or built from git? Code sample would be helpful. On Jun 30, 2015 9:33 PM, "Rodrigo Oliveira" notifications@github.com wrote: > happen on which platform? desktop? mobile? > > can you provide a minimal code that the problem occurs with you?? > > thanks > > — > Reply to this email directly or view it on GitHub > https://github.com/Bacon2D/Bacon2D/issues/114#issuecomment-117387193.
rpadovani commented 2015-07-01 12:48:14 +00:00 (Migrated from github.com)

Sorry for missing details.

I'm on Ubuntu 15.04 and I installed the package from the repo.

I created a little demo of the bug, but I'm not sure it's the same, because also with Component.oCompleted trick it crashes.

Also, it requires two scenes, one with physics: true and the other with an entity.

Just using qmlscene bug.qml it crashes

import QtQuick 2.3
import Bacon2D 1.0

Game {
    gameName: "bug.rpadovani"
    height: 100
    width: 100

    Scene {
        anchors.fill: parent
        physics: true
    }

    Scene {
        anchors.fill: parent
        PhysicsEntity {
            fixtures: [
                Edge {
                    vertices: [
                        Qt.point(0, 0),
                        Qt.point(2, 1)
                    ]
                }
            ]
        }
    }
}

Unfortunately for this example gdb is useless 'cause doesn't give informations.
Anyway, the app where first I found the problem is hosted here: https://launchpad.net/falldown
You need to edit falldown/scenes/MainScene.qml to reproduce it

Sorry for missing details. I'm on Ubuntu 15.04 and I installed the package from the repo. I created a little demo of the bug, but I'm not sure it's the same, because also with Component.oCompleted trick it crashes. Also, it requires two scenes, one with physics: true and the other with an entity. Just using `qmlscene bug.qml` it crashes ``` import QtQuick 2.3 import Bacon2D 1.0 Game { gameName: "bug.rpadovani" height: 100 width: 100 Scene { anchors.fill: parent physics: true } Scene { anchors.fill: parent PhysicsEntity { fixtures: [ Edge { vertices: [ Qt.point(0, 0), Qt.point(2, 1) ] } ] } } } ``` Unfortunately for this example gdb is useless 'cause doesn't give informations. Anyway, the app where first I found the problem is hosted here: https://launchpad.net/falldown You need to edit `falldown/scenes/MainScene.qml` to reproduce it
mdkcore0 commented 2015-07-07 14:15:06 +00:00 (Migrated from github.com)

I reproduced it here, pretty strange. Will try to analyze it soon, thanks!

I reproduced it here, pretty strange. Will try to analyze it soon, thanks!
mdkcore0 commented 2015-07-07 14:20:48 +00:00 (Migrated from github.com)

Just a quick check, maybe this problem occur because there are no currentScene being set on Game, changing bug.qml to the below ran without problems:

import QtQuick 2.3
import Bacon2D 1.0

Game {
    gameName: "bug.rpadovani"
    height: 100
    width: 100
    currentScene: Scene {
        anchors.fill: parent
        physics: true
    }

    Scene {
        anchors.fill: parent
        PhysicsEntity {
            fixtures: [
                Edge {
                    vertices: [
                        Qt.point(0, 0),
                        Qt.point(2, 1)
                    ]
                }
            ]
        }
    }
}

can you test with your game to check if it works?

Anyway we should do some verification on it while initializing Game.

Just a quick check, maybe this problem occur because there are no currentScene being set on Game, changing bug.qml to the below ran without problems: ``` import QtQuick 2.3 import Bacon2D 1.0 Game { gameName: "bug.rpadovani" height: 100 width: 100 currentScene: Scene { anchors.fill: parent physics: true } Scene { anchors.fill: parent PhysicsEntity { fixtures: [ Edge { vertices: [ Qt.point(0, 0), Qt.point(2, 1) ] } ] } } } ``` can you test with your game to check if it works? Anyway we should do some verification on it while initializing Game.
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mdkcore/Bacon2D#114
No description provided.