Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6385005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:50:43+00:00 2026-05-25T02:50:43+00:00

I am facing this error, I want to know where I am wrong. Exception

  • 0

I am facing this error, I want to know where I am wrong.

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)  
Exception Codes: KERN_INVALID_ADDRESS at 0x80000008  
Crashed Thread:  0  

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0  libobjc.A.dylib  0x34499c98 objc_msgSend + 16
1  CoreLocation     0x34456f78 -[CLLocationManager onClientEventRegistered:] + 384
2  CoreLocation     0x34457f42 -[CLLocationManager onClientEvent:supportInfo:] +    46
3  CoreLocation     0x34455a64 OnClientEvent + 16
4  CoreLocation     0x3445178a CLClientInvokeCallback(__CLClient*, CLClientEvent, __CFDictionary const*) + 46
5   CoreLocation                    0x344528cc CLClientHandleDaemonDataRegistration(__CLClient*, CLDaemonCommToClientRegistration const*, __CFDictionary const*) + 700
6   CoreLocation                    0x34453d50 CLClientHandleDaemonData(__CFMessagePort*, long, __CFData const*, void*) + 220
7   CoreFoundation                  0x3094e706 __CFMessagePortPerform + 242
8   CoreFoundation                  0x30957a90 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
9   CoreFoundation                  0x30959838 __CFRunLoopDoSource1 + 160
10  CoreFoundation                  0x3095a606 __CFRunLoopRun + 514
11  CoreFoundation                  0x308eaebc CFRunLoopRunSpecific + 224
12  CoreFoundation                  0x308eadc4 CFRunLoopRunInMode + 52
13  GraphicsServices                0x30269418 GSEventRunModal + 108
14  GraphicsServices                0x302694c4 GSEventRun + 56
15  UIKit                           0x30a10d62 -[UIApplication _run] + 398
16  UIKit                           0x30a0e800 UIApplicationMain + 664
17  ProjectOne                      0x00002918 main (main.m:14)
18  ProjectOne                      0x000028cc start + 32

My code :

Start Location :  
-(void)startLocationTracing
 {              
self.TlocationManager = [[CLLocationManager alloc] init];//allocate memeory to locationmanager
self.TlocationManager.desiredAccuracy = kCLLocationAccuracyBest; //Be as accurate as possible   
self.TlocationManager.distanceFilter =  kCLLocationAccuracyBest;                        
self.TlocationManager.delegate = self;      
[self.TlocationManager startUpdatingLocation];  
}

Delegate Method :

- (void)locationManager:(CLLocationManager *)manager 
didUpdateToLocation:(CLLocation *)newLocation
       fromLocation:(CLLocation *)oldLocation 
{


lat = [NSString stringWithFormat:@"%3.5f",
           newLocation.coordinate.latitude];
lng = [NSString stringWithFormat:@"%3.5f", 
            newLocation.coordinate.longitude];



CLLocation *loc_old = [[CLLocation alloc] initWithLatitude:oldLocation.coordinate.latitude longitude:oldLocation.coordinate.longitude];
CLLocation *loc_new = [[CLLocation alloc] initWithLatitude:newLocation.coordinate.latitude longitude:newLocation.coordinate.longitude];

//get the current distance from the old distance
CLLocationDistance dist = [loc_old distanceFromLocation:loc_new];

// test the age of the location measurement to determine if the measurement is cached
// in most cases you will not want to rely on cached measurement
NSTimeInterval locationAge = -[newLocation.timestamp timeIntervalSinceNow];
if (locationAge > 5.0) 
{

    NSLog(@":::::::Location age is greate then 5.0 ::::::::");
    [loc_old release];
    [loc_new release];
    return;

}
float dist_ = (float)dist;//distance in float
NSLog(@"%f", dist_);

[loc_old release];
[loc_new release];



NSString *str_LastLat = [NSString stringWithFormat:@"%@", [[NSUserDefaults standardUserDefaults] valueForKey:@"LastLat"]];
NSString *str_LastLong = [NSString stringWithFormat:@"%@", [[NSUserDefaults standardUserDefaults] valueForKey:@"LastLong"]];


if(([str_LastLat isEqualToString:lat]) && ([str_LastLong isEqualToString:lng]))
{
    //if same lat and long arrives then do not save in the database

    NSLog(@"old and new location are same");

}
else 
{

    if((newLocation.horizontalAccuracy > 0 ) || (newLocation.verticalAccuracy > 0) ){


        [self stopTracingLocations];//to stop location services after the data is sent to 

        objGlobal = [[Global alloc] init];                  
        [objGlobal postLocateValue:lat :lng type:@"TRACING"];  // WCF HIT
        [objGlobal release];

    }

}
}



Stop Location :

-(void)stopTracingLocations
{

[self.TlocationManager stopUpdatingLocation];
self.TlocationManager.delegate = nil;       
if(self.TlocationManager){
    [self.TlocationManager release];
}

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:50:44+00:00Added an answer on May 25, 2026 at 2:50 am

    Well it could be due to the fact you are leaking/assining incorectly”

    -(void)startLocationTracing {              
       self.TlocationManager = [[[CLLocationManager alloc] init] autorelease];//allocate memeory to locationmanager
       self.TlocationManager.desiredAccuracy = kCLLocationAccuracyBest; //Be as accurate as   possible   
       self.TlocationManager.distanceFilter =  kCLLocationAccuracyBest;                        
       self.TlocationManager.delegate = self;      
       [self.TlocationManager startUpdatingLocation];  
    }
    
    -(void)stopTracingLocations {
       [self.TlocationManager stopUpdatingLocation];
       self.TlocationManager.delegate = nil;       
       self.TlocationManager = nil;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing this error, Cannot create unknown Type '{clr- namespace:ActivityLibrary1;assembly=ActivityLibrary1}MyActivity1' while trying to
We are facing langOutOfMemory error, when we run an ant script, basically this script
I'm facing this problem again and again, but can't find any solution (except mine,
I was facing this unique problem of generating a bit-mask based on the input
I am facing a really tough time doing this. I haven't done much on
A horizontal compass looks something like this if you are facing due East (90
Hi I started building apps with this technology and I am facing a weird
I'm facing a problem with IE6. I took the toggle function from this website
I am facing a problem while creating a static cursor in DB2. This is
I have created a static library following this link . But I am facing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.