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
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: added PIM and now app exits slow

If it's something with the cover, it may mirror what I've discovered using pure QML.

In my manualExit(), I have this code:

Application.setCover(null); // avoids an error on exiting

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!
Please use plain text.
Developer
ekke
Posts: 1,460
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: added PIM and now app exits slow


peter9477 wrote:
If it's something with the cover, it may mirror what I've discovered using pure QML.

In my manualExit(), I have this code:

Application.setCover(null); // avoids an error on exiting

tried in QML where I process my Notification-cleaning code

Application.setCover(null)

or

Application.cover = null

doesn't help

in C++ cannot set

Application::instance()->setCover(null) - needs an AbstractCover

 

thx again for your tips

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: added PIM and now app exits slow

In C++ you should be able to do instance()->resetCover(). Even in QML now.. I think I came up with the property approach (.cover = null) before they added Q_SLOT to the various methods to expose them to QML.

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!
Please use plain text.
Developer
Zmey
Posts: 1,511
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: added PIM and now app exits slow

null should be uppercase:

 

setCover(NULL) or setCover(0)

 

resetCover() is probably a shortcut for setCover(NULL), but it's documentation seems to be incomplete. It's not explicitly stated that resetCover() will destroy the object if it belongs to Application, but it seems logical for it to do this also.

 


Andrey Fidrya, @zmeyc on twitter
Please use plain text.
Developer
ekke
Posts: 1,460
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: added PIM and now app exits slow

resetCover() works

destroys the cover

 

but didn't help

 

also tried at first to destroy the cover and then use the QTimer to delay exit

nothing helps

 

thx again for all your help on this sunday

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
ekke
Posts: 1,460
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: added PIM and now app exits slow

thx Zmey - of course you're also right

in C++ it's 0 or NULL ;-)

 

... resetCover() destroyed the Cover as I've seen from slog2

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
Zmey
Posts: 1,511
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: added PIM and now app exits slow

Does it stop crashing after removing the lib from the project?

Could you try adding pim notebook permission and/or lib to an empty project to exclude the possibility of this being an internal system bug?

Andrey Fidrya, @zmeyc on twitter
Please use plain text.
Developer
ekke
Posts: 1,460
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: added PIM and now app exits slow


Zmey wrote:
Does it stop crashing after removing the lib from the project?

Could you try adding pim notebook permission and/or lib to an empty project to exclude the possibility of this being an internal system bug?

just did this and now I noticed that it must happened some time before adding pim notebook. seems that I didn't recognized before.

so next days I have to go back in my commits to see when it happens exactly. thx to Git this is easy possible to do, but time-consuming. and this should only be a small sample project ;-)

 

now I have to move to another project for some customer work - then come back to this one - I'll let you know

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
ekke
Posts: 1,460
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: added PIM and now app exits slow

closing this thread

we should discuss this here:

 

http://supportforums.blackberry.com/t5/Cascades-Development/error-free-malloc-object-that-is-not-all...

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.