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
helex
Posts: 291
Registered: ‎02-14-2012
My Device: Nokia N950 / BB Playbook

Re: LocationMapInvoker crasing my app

I have currently a similar issue.

 

I changed my Mapping Page from dynamically loading to static (because of the segfault issue of MapView) and if I have the LocationMapInvoker included in the Page as attached Object the App crashes (hangs) if I pop this Page with the LocationMapInvoker. But not always, this is a very strange behavior.

 

The RouteMapInvoker seems to have the same issue, but not as often as the LocationMapInvoker. Without those it crashes only sometimes... perhaps still because of the MapView at the same Page. :smileyfrustrated:


Got the first poster this running in the meantime?

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

Re: LocationMapInvoker crasing my app

hmmmm

 

while my tests with custom maps I recognized that best behaviour was always dynamically create and destroy the Pages containing the MapView.

 

so at the moment I haven't changed to static MapView to workaround the other bug

I'm using custom maps in a closed-beta-app only yet and customer knows to restart the app if Map hangs

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

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

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
dhicock
Posts: 74
Registered: ‎05-31-2013
My Device: BlackBerry Z30

Re: LocationMapInvoker crasing my app

Sorry for the late reply. I didn't see your messages until I came into the office.

 

I tried loading it into a new workspace, and it still hung up.

 

I am going to see if I can figure out what is happening. I'll update if I find anything.

 

If you guys have any more ideas, please don't hesitate to put them here. I'll try anything at this point.



Like this answer? Give it a
Visit my blog for programming help, guides and common issues.
Please use plain text.
New Developer
GeilPMagico
Posts: 17
Registered: ‎11-08-2012
My Device: Z10 Limited Edition

Re: LocationMapInvoker crasing my app

[ Edited ]

Hello,
in the official documentation is missing a step.

 

This for LocationMapInvoker

qmlRegisterType<bb::platform::LocationMapInvoker>("bb.platform", 1, 0, "LocationMapInvoker");
    bb::data&colon;:DataSource::registerQmlTypes();

 

And this for RouteMapInvoker

qmlRegisterType<bb::platform::RouteMapInvoker>("bb.platform", 1, 0, "RouteMapInvoker");
    bb::data&colon;:DataSource::registerQmlTypes();
Please use plain text.
Developer
ekke
Posts: 1,538
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: LocationMapInvoker crasing my app

yesterday I had something similar: added LocationMapInvoker and app crashes at startup with 'type not found'

 

was my fault: copy/paste to wrong position in my app.cpp:

pasted the

qmlRegisterType<bb::platform::LocationMapInvoker>("bb.platform", 1, 0,
			"LocationMapInvoker");

 after the creation of main

QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);

 and then of course the app fails.

 

all types must be registered before the QMLDocument will be created, because all Types of attached objects must be known before.

 

perhaps this was the reason of your problem ?

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

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

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