GeocoderManager addSearchTask: -> EXC_BAD_INSTRUCTION on iPhone SDK

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

GeocoderManager addSearchTask: -> EXC_BAD_INSTRUCTION on iPhone SDK

Georg Sisow
Hello,

I have still the problem that my app crashes if I call addSearchTask.  
I have wrote about this problem some time ago. I was away from this  
project for some time and now come back and updated the api to 160 but  
its still the same. What is wrong with it?

     Georg Sisow
_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: GeocoderManager addSearchTask: -> EXC_BAD_INSTRUCTION on iPhone SDK

Dmytro Golub
Hi Georg,

Could you please give me more details? Did you try build examples from SVN or setup your own project? Could you please send me a peace of code where you init/call manager's methods?


Best regards,
Dmytro


On Thu, May 27, 2010 at 8:39 PM, Georg Sisow <[hidden email]> wrote:
Hello,

I have still the problem that my app crashes if I call addSearchTask.
I have wrote about this problem some time ago. I was away from this
project for some time and now come back and updated the api to 160 but
its still the same. What is wrong with it?

    Georg Sisow
_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev


_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: GeocoderManager addSearchTask: -> EXC_BAD_INSTRUCTION on iPhone SDK

Georg Sisow
Hi,

I use my own project but it is as simple as in the example. 

In the main class I do:

- (void)viewDidLoad {

geocoder = [[[GeocoderManager alloc
                initWithApikey:@"..." 
                searchFor:nil] autorelease];

.
.
.

[details_view_controller setGeocodeService:geocoder];

}

In the other class I have:

- (void) setGeocodeService:(GeocoderManager *)geocoder_service
{
geocoder = geocoder_service;
geocoder.delegate = self;
[geocoder retain];
}

- (void)viewDidLoad {

.
.
.
   [geocoder addSearchTask:start_address];
.
.
.

}

Georg Sisow

Am 28.05.2010 um 09:08 schrieb Dmytro Golub:

Hi Georg,

Could you please give me more details? Did you try build examples from SVN or setup your own project? Could you please send me a peace of code where you init/call manager's methods?


Best regards,
Dmytro



_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: GeocoderManager addSearchTask: -> EXC_BAD_INSTRUCTION on iPhone SDK

Dmytro Golub
Hi,


Can you confirm that

- (void)viewDidLoad  of the other class is called after - (void) setGeocodeService:(GeocoderManager *)geocoder_service method?
Why do you create geocoder as an autorelease object and than make retain for it?


Best regards,
Dmytro



On Fri, May 28, 2010 at 3:02 PM, Georg Sisow <[hidden email]> wrote:
Hi,

I use my own project but it is as simple as in the example. 

In the main class I do:

- (void)viewDidLoad {

geocoder = [[[GeocoderManager alloc
                initWithApikey:@"..." 
                searchFor:nil] autorelease];

.
.
.

[details_view_controller setGeocodeService:geocoder];

}

In the other class I have:

- (void) setGeocodeService:(GeocoderManager *)geocoder_service
{
geocoder = geocoder_service;
geocoder.delegate = self;
[geocoder retain];
}

- (void)viewDidLoad {

.
.
.
   [geocoder addSearchTask:start_address];
.
.
.

}

Georg Sisow

Am 28.05.2010 um 09:08 schrieb Dmytro Golub:

Hi Georg,

Could you please give me more details? Did you try build examples from SVN or setup your own project? Could you please send me a peace of code where you init/call manager's methods?


Best regards,
Dmytro




_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: GeocoderManager addSearchTask: -> EXC_BAD_INSTRUCTION on iPhone SDK

Georg Sisow
Yes, of cause is viewDidLoad called after setGeocoderService. The retain call should be properly speaking not necessary but without it I end in EXC_BAD_ACCESS exception. (and without this retain are apiKey and delegate inside geocoder invalid)

   Georg Sisow


Am 28.05.2010 um 15:56 schrieb Dmytro Golub:

Hi,


Can you confirm that

- (void)viewDidLoad  of the other class is called after - (void) setGeocodeService:(GeocoderManager *)geocoder_service method?
Why do you create geocoder as an autorelease object and than make retain for it?


Best regards,
Dmytro



On Fri, May 28, 2010 at 3:02 PM, Georg Sisow <[hidden email]> wrote:
Hi,

I use my own project but it is as simple as in the example. 

In the main class I do:

- (void)viewDidLoad {

geocoder = [[[GeocoderManager alloc
                initWithApikey:@"..." 
                searchFor:nil] autorelease];

.
.
.

[details_view_controller setGeocodeService:geocoder];

}

In the other class I have:

- (void) setGeocodeService:(GeocoderManager *)geocoder_service
{
geocoder = geocoder_service;
geocoder.delegate = self;
[geocoder retain];
}

- (void)viewDidLoad {

.
.
.
   [geocoder addSearchTask:start_address];
.
.
.

}

Georg Sisow

Am 28.05.2010 um 09:08 schrieb Dmytro Golub:

Hi Georg,

Could you please give me more details? Did you try build examples from SVN or setup your own project? Could you please send me a peace of code where you init/call manager's methods?


Best regards,
Dmytro





_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev