[Solved, Fixed] QML app in BB10 simulator



  • Note: This problem is fixed in "BlackBerry 10 Native SDK January Refresh" (read about update here: http://devblog.blackberry.com/2013/01/native-sdk-january-refresh/)

    Hello,

    I have QML application that works correctly on Symbian, PlayBook and Desktop and now I have problem with BB10. I don't have Alpha device so I can "reproduce" it only on simulator. I say "reproduce" because on simulator I see crash. Crash can be reproduced with sample app from this page: http://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10

    Compile and run app. Change simulator from portrait to landscape (by dragging mouse from right bottom corner to center) - crash. Play around more and you will see more bad behavior.

    That's problem for me because my app does not pass certification and on real physical device it works even worse (while does not crash as far as I understand). As workaround I can disable landscape mode in my app (while not perfect but acceptable in my situation).

    I'm using Gold simulator and SDK.

    Edit: yet another little detail. The same app compiled for PlayBook was accepted for BB10 some time ago. The difference between accepted and not accepted BB10 app is Qt version (4.7.? vs. 4.8.4). Therefore I believe that's Qt bug most probably but I don't have tools to verify or debug that.



  • Did you get any console errors when it crashed?

    I was playing around with a QML app on the gold SDK last night, and it was crashing after a few seconds with:
    QBBWindow: invalid buffer count. Expected = 2, got = 1
    Using viewer.show(); instead of viewer.showExpanded(); seemed to reduce the number of crashes, but haven't had much more time to troubleshoot.



  • How to see console errors?

    I have tried configure Qt Creator but I have failed to make it working with simulator. I have ssh connection to simulator up and running but it looks it is not enough enough for debugging. Ideally I would love to get console output without Qt Creator but how to do that?



  • That's a good question, I was using Qt Creator, with the Dev Alpha device.

    At the bottom of this page, there is a setting to change to get Qt Creator to work with the simulator:
    http://qt-project.org/wiki/Setting-up-Qt-Creator-for-BlackBerry-and-QNX



  • That page doesn't exactly explain how to setup Qt Creator to work with the simulator. At the end one needs a few more magic tricks to make it work.



  • qmake spec are correct in my case. I simply can't connect to device during deployment step. I will look into that more - maybe I have missed some step.



    1. Figured out what's wrong with my Qt Creator: I have created device but not checked simulator.

    2. I get the same error as Slocan "QBBWindow: invalid buffer count. Expected = 2, got = 1"

    2.a. I found that it is quite recently added error: http://qt.gitorious.org/qt/qt/commit/2d487381e8537024bbb10b03d324cea6b6060185?format=patch

    1. Yes show() hides crash but now my app is not expanded properly in Simulator. I wonder how different real device is from Simulator - I don't have real device therefore I don't know.

    If there is something else I could do to help solve this problem (apart fixing actual problem) let me know.



  • The bug which crashes the application on orientation change with the message
    "QBBWindow: invalid buffer count. Expected = 2, got = 1"
    is already fixed internal and will be available with the next NDK version.

    This affects the simulator and the Dev Alpha devices.



  • Thank you, wbremer. That's good news.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.