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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 142
Registered: ‎04-25-2009
My Device: Z30
My Carrier: AT&T

Please help! App freezes until a breakpoint is added??

I've got a really bizzarre problem.

 

On a simulator:

When I "run" my app, it works. Works well.

When I "debug" my app, it freezes at a certain point. Until, I place a breakpoint in my main.qml file, and then it just starts working again.

 

On device:

When I run the app, acts as it does when debugging with the simulator. Except of course, I can't set a breakpoint.

 

The app opens with a login page, interface done with C++. User enters credentials, and it authorizes with an API, and then it proceeds to load my main.qml file. So login process interface is in C++ and then all the rest is QML.

 

When debugging, it freezes right when trying to load the QML after successful login authorization. Then it just sits there. No hints as to what is happening from the console or an ssh session.

But then, I decided for some reason to place a breakpoint in my main.qml file, the one that was stuck loading. I placed it while the app was frozen, not before running. And then, after a couple seconds, the app proceeded to load the QML and all was well.

 

Anybody have even the slightest clue as to what is happening??

 

Here is the code that is loading the QML after successful login. Keep in mind, all my code is working when I just "run" the app. But debugging seems to reveal an issue.

 

QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(
				this);
		qml->setContextProperty("app", this);
		AbstractPane *root = qml->createRootObject<AbstractPane>();
		Application::instance()->setScene(root);

Using sdk 10.1.0.2420.

 

Thanks,

T

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Please help! App freezes until a breakpoint is added??

Did you try clicking "Continue" button in debug menu? When runned in debug mode the app automatically pauses on first line.

Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 142
Registered: ‎04-25-2009
My Device: Z30
My Carrier: AT&T

Re: Please help! App freezes until a breakpoint is added??

Yeah I've been doing this for a while Smiley Happy I wish it was just that simple 

Developer
Posts: 107
Registered: ‎06-12-2012
My Device: Dev Alpha C, Playbook
My Carrier: Loop

Re: Please help! App freezes until a breakpoint is added??

does your app use any third party libraries?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
Developer
Posts: 142
Registered: ‎04-25-2009
My Device: Z30
My Carrier: AT&T

Re: Please help! App freezes until a breakpoint is added??

Nope. 

Developer
Posts: 107
Registered: ‎06-12-2012
My Device: Dev Alpha C, Playbook
My Carrier: Loop

Re: Please help! App freezes until a breakpoint is added??

Try disabling certain functionalities in your app, this way you might be able to zero in on the part which is causing the problem.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
Developer
Posts: 142
Registered: ‎04-25-2009
My Device: Z30
My Carrier: AT&T

Re: Please help! App freezes until a breakpoint is added??

Like I said, it freezes right on the first line of the code snippet in my original post. So, not sure what exactly I can do to narrow down the problem.

Highlighted
Developer
Posts: 107
Registered: ‎06-12-2012
My Device: Dev Alpha C, Playbook
My Carrier: Loop

Re: Please help! App freezes until a breakpoint is added??

I would suggest then to disable all other code snippets except the first line and its dependents and try once running it. If it still has issue s post the said first line of code.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.