Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Application startup stall on splash screen after adding MapView to QML.

I am trying to add a MapView to my application, but adding it appears to be causing a stall at startup time.


I can replicate this problem using the 'standard' samples as follows.


I use a newly installed Simulator (no other applications present), then create a new application based on the sample ListView (i.e. do File/New->Sample Cascades c++ ....).  Then I just add the following attachedObjects to the main.qml.  In the QML pasted below, the MapView is commented out.  This works (but does nothing since the attached Object is never used!)  But if I put the MapView in, the application stalls on the splash screen. 


The slog2info log says the following:

Dec 05 08:17:52.699 com.example.TestMap.testDev_ple_TestMap96db459_.7843970              default    255  STARTUP: "waiting for events begin"
Dec 05 08:18:22.625 com.example.TestMap.testDev_ple_TestMap96db459_.7843970              default      0  LGM - The call to counters_register in LGMon failed at time = 272625554616 ns with error -5.


Any clues as to why this is happening would be appreciated....


Following is the QML I added. Just to confirm, this is the standard ListView sample application, with just this QML added to main.qml.  No other changes.  And this code came straight from the mapview sample. 



attachedObjects: [


// The sheet that contains the map view


Sheet {


id: mapSheet



Page {


Container {


background: Color.Black



// The address label


Label {


id: addressLabel



horizontalAlignment: HorizontalAlignment.Center



textStyle {


base: SystemDefaults.TextStyles.TitleText


color: Color.White


textAlign: TextAlign.Center






                    // The map view

                    MapView {

                        id: mapView

                        horizontalAlignment: HorizontalAlignment.Fill

                        // Enforce the usage of the 3D rendering engine

                        onCreationCompleted: setRenderEngine("RenderEngine3D")





// The 'Back' button


Button {


horizontalAlignment: HorizontalAlignment.Center



text: qsTr ("Back")



onClicked: mapSheet.close()






Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: Application startup stall on splash screen after adding MapView to QML.

Hi Peter,
Can you try https://github.com/blackberry/Cascades-Samples/tree/master/locationdiagnostics. Please let me know if that works. You might need to pay some attention to the .pro file to see what libs you need to add to yours.