Bug 2305 - MKReverseGeocoderDelegate crashing
Summary: MKReverseGeocoderDelegate crashing
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-12-01 23:35 UTC by Ian
Modified: 2011-12-22 11:20 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
sample code - will happen sometimes, not every time. (1.43 KB, text/plain)
2011-12-01 23:35 UTC, Ian
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description Ian 2011-12-01 23:35:25 UTC
Created attachment 984 [details]
sample code - will happen sometimes, not every time.

I get the follow crash using the MKReverseGeocoderDelegate "sometimes".

I have attached sammple code to demo the error.


at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x0009f, 0xffffffff>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29
  at MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:34
  at AlternativeFuelingStationLocator.Application.Main (string[]) [0x00000] in /Users/vink/Dropbox/Dev/iOS/UNIVERSAL/DOE/AlternativeFuelingStationLocator/AlternativeFuelingStationLocator/Main.cs:16
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>

Native stacktrace:

	0   AlternativeFuelingStationLocator    0x000e1018 mono_handle_native_sigsegv + 408
	1   AlternativeFuelingStationLocator    0x00011d9f mono_sigsegv_signal_handler + 351
	2   libsystem_c.dylib                   0x9ad7759b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   MapKit                              0x01e3b4cf MKMapRectRemainder + 101422
	5   GeoServices                         0x0617f3b8 GEOTileKeyContainsKey + 166198
	6   GMM                                 0x092a3f3d GEOTileKeyFromGMMTilePath + 31777
	7   ProtocolBuffer                      0x061dfcf1 ProtocolBuffer + 19697
	8   Foundation                          0x0192aa59 ___NSURLConnectionDidFinishLoading_block_invoke_0 + 40
	9   Foundation                          0x01928e94 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 40
	10  Foundation                          0x01929eb7 -[NSURLConnectionInternalConnection invokeForDelegate:] + 39
	11  Foundation                          0x01928e4f -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 201
	12  Foundation                          0x01928fd5 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 76
	13  Foundation                          0x0186df6a _NSURLConnectionDidFinishLoading + 43
	14  CFNetwork                           0x00c68bbd _ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE + 241
	15  CFNetwork                           0x00d355ea _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 584
	16  CFNetwork                           0x00c5f298 _ZN19URLConnectionClient13processEventsEv + 174
	17  CFNetwork                           0x00d3516b _ZThn52_N25URLConnectionInstanceData24multiplexerClientPerformEv + 21
	18  CFNetwork                           0x00c5f137 _ZN17MultiplexerSource7performEv + 259
	19  CoreFoundation                      0x012ab97f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
	20  CoreFoundation                      0x0120eb73 __CFRunLoopDoSources0 + 243
	21  CoreFoundation                      0x0120e454 __CFRunLoopRun + 1012
	22  CoreFoundation                      0x0120ddb4 CFRunLoopRunSpecific + 212
	23  CoreFoundation                      0x0120dccb CFRunLoopRunInMode + 123
	24  GraphicsServices                    0x0489f879 GSEventRunModal + 207
	25  GraphicsServices                    0x0489f93e GSEventRun + 114
	26  UIKit                               0x022a6a9b UIApplicationMain + 1175
	27  ???                                 0x0e0b6fcd 0x0 + 235630541
	28  ???                                 0x0e0b6c18 0x0 + 235629592
	29  ???                                 0x0e0b6184 0x0 + 235626884
	30  ???                                 0x0e0b5fdc 0x0 + 235626460
	31  ???                                 0x0e0b612e 0x0 + 235626798
	32  AlternativeFuelingStationLocator    0x00011aef mono_jit_runtime_invoke + 1407
	33  AlternativeFuelingStationLocator    0x0022011a mono_runtime_invoke + 170
	34  AlternativeFuelingStationLocator    0x00222e51 mono_runtime_exec_main + 705
	35  AlternativeFuelingStationLocator    0x00222061 mono_runtime_run_main + 929
	36  AlternativeFuelingStationLocator    0x000ad6df mono_jit_exec + 239
	37  AlternativeFuelingStationLocator    0x002f41ca main + 5194
	38  AlternativeFuelingStationLocator    0x00003345 start + 53

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 1 Sebastien Pouliot 2011-12-02 17:26:33 UTC
ref: http://stackoverflow.com/questions/8362296/monotouch-requestreversegeocode-crashing
seems fixed (last comment)
Comment 2 Sebastien Pouliot 2011-12-22 11:20:54 UTC
The `coder` variable was not referenced outside the method that calls Start on it. That made it collectable by the GC while it still existed in the native side. Moving it to a class field was the right solution.