Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:RPositioner::NotifyPositionUpdate returns KErrInUse after few minutes (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Trying to use RPositioner::NotifyPositionUpdate() to receive GPS position fails after a certain number of updates have been made, if update options have been omitted. This known issue has been verified by Nokia Developer.

Article Metadata
Tested with
Devices(s): Nokia N95, Nokia E90 Communicator, Nokia 6110 Navigator
Platform(s): S60 3rd Edition, Feature Pack 1
S60 3rd Edition FP1
Created: alammi (30 Nov 2007)
Last edited: hamishwillee (21 Jun 2012)


Approximately after 4-5 minutes (255 update cycles), RPositioner::NotifyPositionUpdate() completes with error KErrInUse (-14). This happens when the client has not set valid update options with RPositioner::SetUpdateOptions().

This is not the defined return value for this API. After returning KErrInUse the RPositioner has "died" and always returns KErrInUse.

Note that the problem does not appear when using a Bluetooth GPS through the Location Acquisition API, or on the emulator.

How to reproduce

Header file:

  class CMyPositioner : public CActive 
RPositionServer iPositionServer;
RPositioner iPositioner;
TPositionSatelliteInfo iSatelliteInfo;


  _LIT(KRequestor, "MyPositioner");
void CMyPositioner::ConstructL()
User::LeaveIfError( iPositionServer.Connect() );
User::LeaveIfError( iPositioner.Open(iPositionServer) );
User::LeaveIfError( iPositioner.SetRequestor( CRequestor::ERequestorService,
KRequestor) );
CActiveScheduler::Add( this );
void CMyPositioner::StartL()
iPositioner.NotifyPositionUpdate( iSatelliteInfo, iStatus );
void CMyPositioner::RunL()
if (iStatus == KErrNone)
// Got iSatelliteInfo successfully, handle it
// Request next update
iPositioner.NotifyPositionUpdate(iSatelliteInfo, iStatus);
// Fails with KErrInUse (-14) after 255 cycles
_LIT( KDebugMessage, "NotifyPositionUpdate() failed: %d" );
RDebug::Print( KDebugMessage, iStatus.Int() );


Set valid update options with RPositioner::SetUpdateOptions() prior to calling RPositioner::NotifyPositionUpdate():

TPositionUpdateOptions( '''aInterval''',
TTimeIntervalMicroSeconds(0), /* timeout */
TTimeIntervalMicroSeconds(0), /* max age */
iPositioner.NotifyPositionUpdate( iSatelliteInfo, iStatus );

Note that the update interval (aInterval) value must be non-zero.

This page was last modified on 21 June 2012, at 06:12.
22 page views in the last 30 days.