Welcome!

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

Reply
Developer
Posts: 165
Registered: ‎10-04-2010
My Device: P'9982 & Z10
My Carrier: alfa Lebanon

I can only run my app a couple of times on the Simulator before I get a 'Syncing and starting...' error (icon faded)

i'm still working on developing my app. It runs alrght on the simulator, however every couple of times I get the below error:

 

'Syncing and starting the application' has encountered a problem

Terminate Failed

 

After that, I have to force restart the simulator form the VMware menu. Again, it runs once or a couple of times and then I have to repeat the process. When that happens, the app's icon becomes faded (like it's starting/closing) and stays like that. So I can't even press it to start it manually.

 

I read somewhere that it could be that the time on the simulator is different, I tried changing it and it didn't help. When I restart the simulator the time is changed again anyways.

 

Any idea what could be causing that?

Wadi
Developer
Posts: 291
Registered: ‎10-15-2012
My Device: bb10 developer
My Carrier: Orange

Re: I can only run my app a couple of times on the Simulator before I get a 'Syncing and starting...' error (icon faded)

The faded-out application icon is the giveaway -

your app isn't terminating properly, so you've got a bug that you need to fix. Probably your app is crashing somewhere.

Debug your app and then exit it - the debugger will normally trap which line the error occurs on and you can use the callstack to trace the error back to the offending line of code in your program
Developer
Posts: 165
Registered: ‎10-04-2010
My Device: P'9982 & Z10
My Carrier: alfa Lebanon

Re: I can only run my app a couple of times on the Simulator before I get a 'Syncing and starting...' error (icon faded)

Thanks for the reply.

 

I think it's in the main.qml, because if I empty everything in it and leave a simple label it terminates fine. I'm not sure how to debug the QML?

 

When I debug, this is what shows in the console when I close the app:

MsgNak received - resending
Remote target is little-endian
warning: Corrupted shared library list: 0x0 != 0x86e9800
warning: .dynamic section for "/Applications/bbndk/target_10_0_9_1673/qnx6/x86/usr/lib/libcertmgr_client.so.1" is not at the expected address (wrong library or version mismatch?)
warning: Corrupted shared library list: 0x0 != 0x86e9800
warning: Corrupted shared library list: 0x0 != 0x86e9800
[New pid 8028290 tid 2]
[New pid 8028290 tid 3]
warning: Corrupted shared library list: 0x0 != 0x86e9800
warning: Could not load shared library symbols for libHwEGL.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Corrupted shared library list: 0x0 != 0x86e9800
warning: Could not load shared library symbols for 3 libraries, e.g. libegl_gallium.so.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Traceback (most recent call last):
  File "/Applications/bbndk/target_10_0_9_1673/qnx6/x86/lib/libstdc++.so.6.0.16-gdb.py", line 59, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named libstdcxx.v6.printers
[New pid 8028290 tid 4]
[New pid 8028290 tid 5]
[New pid 8028290 tid 6]
[New pid 8028290 tid 7]
[New pid 8028290 tid 8]
warning: Corrupted shared library list: 0x0 != 0x86e9800
warning: Could not load shared library symbols for libHwGLESv2.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Corrupted shared library list: 0x0 != 0x86e9800
warning: Could not load shared library symbols for libqmldbg_tcp.so.
Do you need "set solib-search-path" or "set sysroot"?
[New pid 8028290 tid 9]
[New pid 8028290 tid 10]
[New pid 8028290 tid 11]
[New pid 8028290 tid 12]
[New pid 8028290 tid 13]
[New pid 8028290 tid 14]
warning: Corrupted shared library list: 0x0 != 0x86e9800
warning: Could not load shared library symbols for img_codec_png.so.
Do you need "set solib-search-path" or "set sysroot"?
[New pid 8028290 tid 15]
[New pid 8028290 tid 16]
[New pid 8028290 tid 17]
[New pid 8028290 tid 18]

 I'm not sure if this helps or is even related to the problem, nor what that library is.

Wadi
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: I can only run my app a couple of times on the Simulator before I get a 'Syncing and starting...' error (icon faded)

There is no errors in what you've posted. You can ignore this output.

Here is nice article on debugging https://developer.blackberry.com/cascades/documentation/getting_started/tools/debugging.html hope it'll help you.

 

If you see your app's icon shaded out you can expand your target in TargetsNavigator window right click on your app's process and select 'Send Signal'. SIGTERM usually kills your app nicely so you don't have to restart simulator/device.

Developer
Posts: 165
Registered: ‎10-04-2010
My Device: P'9982 & Z10
My Carrier: alfa Lebanon

Re: I can only run my app a couple of times on the Simulator before I get a 'Syncing and starting...' error (icon faded)

[ Edited ]

I checked the link and it mentions Javascript but I couldn't really gather anything about how to detect problems with QML.

I'm finding that debugging with Cascades is not very easy :/

 

I managed to narrow the problem to this piece of code:

attachedObjects: [
            EditSheet {
                // A sheet is used to add new items to the list, which is the same sheet used to edit items
                id: addNew
                onSaveReminderItem: {
                    reminderModel.addReminderItem(text, radius);
                    reminderList.scrollToPosition(ScrollPosition.Top, ScrollAnimation.Default);
                }
            },
            ComponentDefinition {
                // A Component definition of the Page used to display more details on the Bucket item.
                id: reminderPage
                source: "ReminderPage.qml"
            }
        ]

 If I comment that part, the app terminates properly. But even if I don't comment them, the app works fine and I can use those two elements in my app... it's just that for some reason they're stopping the app from terminating.

Wadi
Developer
Posts: 165
Registered: ‎10-04-2010
My Device: P'9982 & Z10
My Carrier: alfa Lebanon

Re: I can only run my app a couple of times on the Simulator before I get a 'Syncing and starting...' error (icon faded)

UPDATE: since I updated my simulator to 10.0.10.261 my app terminates.

Is this just because the new version is better at killing bad threads?

Wadi