Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › crash when using one wall with anchors

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4629

    Felgo User

    Below simple scene to reproduce the problem:

     

    import QtQuick 1.1
    import Box2D 1.0
    import VPlay 1.0
    
    GameWindow {
      id: window
      width: 480*2
      height: 320*2
    
      Scene {
        id: scene
        width: 480
        height: 320
    
        Item {
          id: level
          // OLD, not working prior to v1.4: 
    	  //anchors.fill: parent
    	  
          //FIX: 
    	  width: parent.width
    	  height: parent.height
    
          Rectangle {
            anchors.fill: parent
          }
    
          EntityBase {
            entityType: "wall"
    
            BoxCollider {
              bodyType: Body.Static
            }
            Rectangle {
              color: "black"
              anchors.fill: parent
            }
            height: 1
            anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
          }
    
          Item {
            x: width*3
            y: parent.height/2
          }
    
        }
    
        PhysicsWorld {
          id: physicsWorld
          z: 1
          updatesPerSecondForPhysics: 60
          velocityIterations: 5
          positionIterations: 5
        }
      }
    
      EntityManager {
        id: entityManager
        entityContainer: level
      }
    }

    Here is the debug log:

    Setting default orientation to 2 (0=portrait, 1=landscape, 2=auto, 3=sensorPortrait, 4=sensorLandscape)
    VPlayApplication: log messages are enabled by default, because it is a debug build
    VPlayApplication: …adding this import path for VPlay engine: “:/qml”
    VPlayApplication: adding pluginPathGeneric as importPath: “/Users/vlad/bin/../Resources/plugins/generic”
    VPlayApplication: adding PLATFORM_PLUGIN_PATH as importPath: “/Users/vlad/bin/../Resources/plugins/macx”
    VPlayApplication: importPathList: (“:/qml”, “/opt/local/v-play/Desktop/FelgoSDK/plugins/macx”, “/opt/local/v-play/Desktop/FelgoSDK/plugins/generic”, “/Users/vlad/bin”, “/opt/local/v-play/Desktop/Qt/4.8.1/gcc/imports”)
    VPlayApplication: pluginPathList: (“/opt/local/v-play/Desktop/FelgoSDK/plugins/macx”, “/opt/local/v-play/Desktop/FelgoSDK/plugins/generic”, “/Users/vlad/Downloads”, “/Users/vlad/Downloads”, “.”)
    VPlayApplication:startApplication()
    VPlayApplication: rootContext of qmlViewer:  QDeclarativeContext(0x104367c40)
    VPlayApplication: using CocosDenshion for audio
    …before cocosApplication.run()
    VPlayAppDelegate::applicationDidFinishLaunching()
    create EngineScene from delegate
    call of EngineScene::scene()
    call of Scene:init()
    Cocos2DWrapper::setTargetScene() called
    Cocos2DWrapper: windowSizeChanged: shift the cocosScene-layer up by its winSize width: 960 , height: 640
    Cocos2DWrapper: windowSizeChanged: new windowSize:  QPointF(960, 640) , displaySize: QPointF(960, 640)
    Box2DWorld: set gravity to QPointF(0, 0)
    QDeclarativeExpression: Expression “(function $displayFpsEnabled() { return system.debugBuild })” depends on non-NOTIFYable properties:
    System::debugBuild
    QDeclarativeExpression: Expression “(function $resolutionChangingWithKeysEnabled() { return system.desktopPlatform })” depends on non-NOTIFYable properties:
    System::desktopPlatform
    Scene: returning 1 for the xScaleForScene, but sceneGameWindow was invalid! this is the scene: Scene_QMLTYPE_6(0x102db56e0)
    Scene: xScaleForScene changed to 1
    Scene: calculate x of scene based on sceneAlignmentX center
    Scene: calculate y of scene based on sceneAlignmentY center
    Scene: yScaleForScene changed to 1
    QDeclarativeExpression: Expression “(function $visible() { return system.debugBuild })” depends on non-NOTIFYable properties:
    System::debugBuild
    GameWindowItem: found GameWindowItem – register it as contextProperty for rootContext
    QDeclarativeExpression: Expression “(function $visible() { return system.debugBuild })” depends on non-NOTIFYable properties:
    System::debugBuild
    Scene: onSceneGameWindowChanged changed to GameWindow_QMLTYPE_4(0x102d30870, “gameWindow”)
    Scene: xScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
    Scene: yScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
    Scene: onScaleModeChanged: xScaleForScene( 1 ) is different than from GameWindow ( 0 )
    GameWindow: xScaleForActiveScene changed to 1
    set the __scaleImageSuffixList to:…
    # 0 : -sd
    Scene: xScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
    Scene: xScaleForScene changed to 2
    changing xScaleForActiveScene to 2 from scene Scene_QMLTYPE_6(0x102db56e0)
    GameWindow: xScaleForActiveScene changed to 2
    set the __scaleImageSuffixList to:…
    # 0 : -hd
    # 1 : -sd
    Scene: calculate x of scene based on sceneAlignmentX center
    Scene: calculate y of scene based on sceneAlignmentY center
    Scene: yScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
    Scene: yScaleForScene changed to 2
    Scene: calculate y of scene based on sceneAlignmentY center
    Scene: yScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
    Scene: calculate y of scene based on sceneAlignmentY center
    Scene: calculate x of scene based on sceneAlignmentX center
    Scene: xScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
    QDeclarativeExpression: Expression “(function $resolutionChangingWithKeysEnabled() { return system.desktopPlatform })” depends on non-NOTIFYable properties:
    System::desktopPlatform
    QDeclarativeExpression: Expression “(function $displayFpsEnabled() { return system.debugBuild })” depends on non-NOTIFYable properties:
    System::debugBuild
    VisualItemPropertyObserver componentComplete for item EntityBase_QMLTYPE_8 (this = 0x102dbb350 , parent = 0x102dba830 , geometry = QRectF(0,-1 0x1) , z = 0 )
    Box2DWorld::componentComplete()
    QDeclarativeExpression: Expression “(function $visible() { return system.debugBuild })” depends on non-NOTIFYable properties:
    System::debugBuild
    Scene: yScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
    Scene: calculate y of scene based on sceneAlignmentY center
    Scene: calculate x of scene based on sceneAlignmentX center
    Scene: xScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
    QDeclarativeExpression: Expression “(function $resolutionChangingWithKeysEnabled() { return system.desktopPlatform })” depends on non-NOTIFYable properties:
    System::desktopPlatform
    QDeclarativeExpression: Expression “(function $displayFpsEnabled() { return system.debugBuild })” depends on non-NOTIFYable properties:
    System::debugBuild
    Box2DWorld: set contextProperty physicsWorld to this: PhysicsWorld_QMLTYPE_15 (this = 0x102dc2ad0 , parent = 0x102db56e0 , geometry = QRectF(0,0 480×320) , z = 1 )
    Assertion failed: (count >= 3), function ComputeCentroid, file qml-box2d/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 76.
    cocos2d: cocos2d-1.0.1-x-0.12.0cocos2d: GL_VENDOR:     NVIDIA Corporationcocos2d: GL_RENDERER:   NVIDIA GeForce GT 650M OpenGL Enginecocos2d: GL_VERSION:    2.1 NVIDIA-8.10.44 304.10.65f03cocos2d: GL_MAX_TEXTURE_SIZE: 16384cocos2d: GL_MAX_MODELVIEW_STACK_DEPTH: 32cocos2d: GL supports PVRTC: NOcocos2d: GL supports BGRA8888 textures: NOcocos2d: GL supports NPOT textures: NOcocos2d: GL supports discard_framebuffer: NOcocos2d: compiled with NPOT support: NOcocos2d: compiled with VBO support in TextureAtlas : NOAbort trap: 6

    #4631

    Christian
    Felgo Team

    Hi vseryakov,

    thanks for pointing out this issue! We fixed it in the engine and it will be available tomorrow for Pro customers with the daily build. For the users on the Free plan, it will be available with release 1.4. Please have a look at the blog post about daily builds we will publish later today, to get more info how to activate them.

    As a temporary fix for this problem, you could set the width of your level to parent.width and the height to parent.height, instead of using the anchors.fill: parent.

    NOTE: I modified your QML code to be formatted with indentations and added the //FIX to the relevant code.

    Cheers, Chris

    #4645

    Felgo User

    Thanks.

    Also i noticed i am running SDK 1.1, is it because i am on Free plan?

    #4646

    Christian
    Felgo Team

    Yes you are right! Users on the Free plan get the updates with 2 delayed releases, so as soon as 1.4 comes out, you’ll get access to 1.2.

    Cheers, Chris

    #4689

    Christian
    Felgo Team

    Hi vseryakov,

    we added a new section that covers the updates of the daily build changelog today, which covers your bug fix. You can read about the update here, and the daily build changelog is available here.

    Cheers, Chris

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded