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
Highlighted
New Developer
Posts: 9
Registered: ‎01-12-2013
My Device: Z10 LE, PlayBook, Q10
My Carrier: Vodafone AU, Telstra
Accepted Solution

Release Build crashes on Startup; Debug runs fine

When deploying my app (Device-Debug package) the app works correctly. No issues at all. However, when exporting the app to publish to App World, I sideloaded it to make sure everything worked. I get prompted to allow app permissions, which I do, yet the app crashes instantly. 

 

The screen shifts to the Multitasking screen breifly and returns to the app launcher screen, if no apps are open. If an app is open, it will open the app in the top left of the grid.

 

Fixes I've tried:

  • Ensure .pro file has App Name without spaces. eg. APP_NAME = MYAPP instead of MY APP
  • Change the device-release configuration to use libAppName.so.1.0.0.1 instead of AppName.so
  • Check that app has appropriate file permissions (As far as I know, my app doesn't since It just populates labels using device APIs and doesn't store anything)

Any other suggestions?

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Release Build crashes on Startup; Debug runs fine

Memory leak, null pointer.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
New Developer
Posts: 9
Registered: ‎01-12-2013
My Device: Z10 LE, PlayBook, Q10
My Carrier: Vodafone AU, Telstra

Re: Release Build crashes on Startup; Debug runs fine

If it is a memory leak or null pointer, that should show up on device-debug device log right?

 

I'm not having any errors. That is what is strange. I'm not executing any functions, literally just displaying system API output in labels.

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Release Build crashes on Startup; Debug runs fine

i would suggest to check if you initialize all variables and pointers. the debug mode might be more lenient with these issues.
----------------------------------------------------------
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.
@SimonHain on twitter
New Developer
Posts: 9
Registered: ‎01-12-2013
My Device: Z10 LE, PlayBook, Q10
My Carrier: Vodafone AU, Telstra

Re: Release Build crashes on Startup; Debug runs fine

How would I be able to check they're initialized? The way I understand, the QML loads the data when it is created
Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Release Build crashes on Startup; Debug runs fine

i was talking about the c++/Qt part. If you use only QML that does not apply.
----------------------------------------------------------
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.
@SimonHain on twitter
New Developer
Posts: 9
Registered: ‎01-12-2013
My Device: Z10 LE, PlayBook, Q10
My Carrier: Vodafone AU, Telstra

Re: Release Build crashes on Startup; Debug runs fine

Only C++ code I use is to register QML Types, rest of API Calls is done from the QML

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Release Build crashes on Startup; Debug runs fine

One common mistake that leads to something like this is if your app tries to write to the app/native folder instead of to data/ . Only in development mode is the tree with the app's code in it (and assets/) actually writeable. In release mode (signed app) it's all read-only and the app should write only to data/ (or possibly tmp/, and shared/ when it's relevant).

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!
Regular Contributor
Posts: 85
Registered: ‎12-12-2011
My Device: PlayBook, Z10
My Carrier: None

Re: Release Build crashes on Startup; Debug runs fine

I had similar issue with the first app I ported from iOS to BB, after some debugging (using many fprintf), I found I was assigning a C string more characters of what it could store (debug mode allowed that), so you may want to check that too just in case..

If your app crashes consistently doing the same steps, that will help deugging you to narrow where the problem might be starting from the crash point going backwards..

BovioSoft Games
Developer
Posts: 52
Registered: ‎04-22-2012
My Device: Z10
My Carrier: Mobilicity

Re: Release Build crashes on Startup; Debug runs fine

Im having the same issue. Have you found a solution ?