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: 206
Registered: ‎05-15-2012
My Device: None
My Carrier: Telus

Application freezing and crashing

Hey, can somebody confirm this application loads, freezes, then crashes?

 

http://appworld.blackberry.com/webstore/content/20385905/

 

I need to pull it ASAP if that is the case.

 

Does anybody know why this application loads, freezes, then crashes? The signed release bar runs fine on a device when sideloaded.

----------------------
Check out my app, Alien Flow for reddit

And of course, like my post if you found it helpful or informative!
Highlighted
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Application freezing and crashing

[ Edited ]

On my Dev Alpha it loads, fetches the content, shows the images then freezes and crashes right after that (all this takes a few seconds).

 

The scrolling works while it's loading content, but after images appear it freezes.


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 206
Registered: ‎05-15-2012
My Device: None
My Carrier: Telus

Re: Application freezing and crashing

[ Edited ]

All right, thanks. That was the same experience I was having. The entire application works, actually, if you can interact with it fast enough -_-

 

I have no idea where to start with this one... like I said, the actual .bar that is approved and released runs fine on my device when I install it from the Momentics IDE.

----------------------
Check out my app, Alien Flow for reddit

And of course, like my post if you found it helpful or informative!
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Application freezing and crashing

Also confirmed.

I'd suggest starting by checking with a devmode version *after* uninstalling the previous one, to ensure it's not working only because you left old data in its sandbox.

Also start adding some logging, so you can at least narrow down the areas which may or may not be involved in the issue. If you add your own logging to a file in shared/misc, you could make use of it even in a signed version (if only a signed one fails). Just make sure to remove/disable that when you release again.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 206
Registered: ‎05-15-2012
My Device: None
My Carrier: Telus

Re: Application freezing and crashing

[ Edited ]

The signed version of the application works fine. I can build and export a signed version of my application and install it on my device, then use it without issue. The same thing goes for debug builds. Clean install or otherwise, I should mention.

 

Does BlackBerry also add their own signature to the .bar they receive in some way ? I'm not sure how I will test this without the application being live, since I can't download a version of the app that fails except from BlackBerry World.

----------------------
Check out my app, Alien Flow for reddit

And of course, like my post if you found it helpful or informative!
Developer
Posts: 206
Registered: ‎05-15-2012
My Device: None
My Carrier: Telus

Re: Application freezing and crashing

[ Edited ]

I believe I've identified my error based on this output of my release build:

 

Connecting.234Inside existing purcahse response.Response was not null.Existing purchases response error. Code(3) Text(The application must be installed using AppWorld in order to access the payment system.)

 

So my existing purchases success signal is never emitted. Looking at the slot that that signal is connected to there is clearly a seg fault where I try to access a non-existent array index -_-

 

Worth noting that installing a signed release bar from app world and installing a signed release bar from Momentics IDE are COMPLETELY different in terms of the payment service, apparently.

 

Also maybe worth noting is based on the fact that they accepted my application they are likely testing via side loading.

 

Edit: Just to clarify, you will never be able to reproduce this error on a build of your application that is not up for sale on app world. Here's why, with code!

void PaymentServiceControl::getExisting(bool refresh)
{
   const ExistingPurchasesReply *reply = m_paymentManager->requestExistingPurchases(refresh);
   connect(reply, SIGNAL(finished()), SLOT(existingPurchasesResponse()));
}

 So the finished signal is emmitted as expected, and you have this code as existPurchasesResponse:

void PaymentServiceControl::existingPurchasesResponse()
{
    bb::platform::ExistingPurchasesReply *reply = qobject_cast<bb::platform::ExistingPurchasesReply*>(sender());
    Q_ASSERT(reply);
    ...
    if (reply->isError()) {
    ...

the reply variable will always be an error on any build of your application that was not downloaded from BlackBerry World. It does not matter that the .bar file you submitted to BlackBerry World should be identical to the .bar file that you downloaded from BlackBerry World once your application is approved. These two .bar's will be treated differently by the PaymentManager. My issue was that I was emitting a SIGNAL in the else statement when reply->isError() was false. However, this never occured before in any run of my application until my app was on BlackBerry World. This untested code happened to have a bug in it, as I never realized it was completely untested.

----------------------
Check out my app, Alien Flow for reddit

And of course, like my post if you found it helpful or informative!