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: 305
Registered: ‎02-14-2012
My Device: BlackBerry Passport / Nokia N950
My Carrier: -

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. Smiley Frustrated


Got the first poster this running in the meantime?

Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
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 native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Developer
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.
Highlighted
New Developer
Posts: 17
Registered: ‎11-08-2012
My Device: Z10 Limited Edition
My Carrier: H3G - Italy

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();
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
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 native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner