Bug 6705 - accepting a GKSession crashs the app on acceptor-side
Summary: accepting a GKSession crashs the app on acceptor-side
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 5.3.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-08-27 11:03 UTC by Benedikt Hübschen
Modified: 2013-12-05 18:33 UTC (History)
2 users (show)

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

sample project (1.15 MB, application/zip)
2012-08-27 11:03 UTC, Benedikt Hübschen

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:

Description Benedikt Hübschen 2012-08-27 11:03:56 UTC
Created attachment 2415 [details]
sample project

OSX 10.7.4

Xcode 4.3.3 (4E3002)

Mono JIT compiler version 2.10.7 (mobile-master/f5b62ed Tue Jul 24 17:17:42 EDT 2012)

Mono JIT compiler version 2.10.7 (mobile-master/a477de4 Wed Jul 11 19:16:14 EDT 2012)


Tested on:

iPhone 4 with iOS6 Beta 4
iPhone 4 with iOS 5.1.1
iPhone 3GS with iOS 4.1

2012-08-26 21:19:42.636 calc_input[1690:707] BTM: attempting to connect to service 0x00000800 on device "iPhone von Benedikt Huebschen" 58:1F:AA:A4:4E:17

  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
  at calc_input.Application.Main (string[]) [0x00000] in /Users/systemiya-apple/Projects/calc_input/calc_input/Main.cs:17
  at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	0   calc_input                          0x001c9a0c mono_handle_native_sigsegv + 280
	1   calc_input                          0x001b37e8 mono_sigsegv_signal_handler + 268
	2   libsystem_c.dylib                   0x34da97ed _sigtramp + 48
	3   GameKit                             0x3382a17b -[GKPeerPickerController peerPickerViewController:didConnectPeer:toSession:] + 62
	4   GameKit                             0x3382d9b5 -[GKPeerPickerViewController session:peer:didChangeState:] + 372
	5   GameKitServices                     0x33b9907d -[GKSessionInternal(_private) tellDelegate_didConnectPeer:] + 644
	6   CoreFoundation                      0x30c191fb -[NSObject performSelector:withObject:] + 42
	7   Foundation                          0x315d6747 __NSThreadPerformPerform + 350
	8   CoreFoundation                      0x30c8ead3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
	9   CoreFoundation                      0x30c8e29f __CFRunLoopDoSources0 + 214
	10  CoreFoundation                      0x30c8d045 __CFRunLoopRun + 652
	11  CoreFoundation                      0x30c104a5 CFRunLoopRunSpecific + 300
	12  CoreFoundation                      0x30c1036d CFRunLoopRunInMode + 104
	13  GraphicsServices                    0x32c8a439 GSEventRunModal + 136
	14  UIKit                               0x30373cd5 UIApplicationMain + 1080
	15  calc_input                          0x000209d8 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 240
	16  calc_input                          0x001ab230 calc_input_Application_Main_string__ + 152
	17  calc_input                          0x000f8b54 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
	18  calc_input                          0x001b5844 mono_jit_runtime_invoke + 1644
	19  calc_input                          0x00253f68 mono_runtime_invoke + 128
	20  calc_input                          0x00257fd8 mono_runtime_exec_main + 436
	21  calc_input                          0x0025cb14 mono_runtime_run_main + 756
	22  calc_input                          0x001ba37c mono_jit_exec + 140
	23  calc_input                          0x0029d1c0 main + 2036
	24  calc_input                          0x00002198 start + 40

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 2012-08-27 11:24:20 UTC
What are the steps to crash ?

I tried the sample and clicking on "Cancel" does crash (but not like the above). That case is due to using a local variable (which can be GC'ed when it gets out of FinishedLaunching's scope) instead of a local field. E.g.

	public partial class AppDelegate : UIApplicationDelegate
		GKPeerPickerController peerPickerController;

Your other problem could be similar too.
Comment 2 PJ 2013-11-19 17:03:56 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 3 PJ 2013-12-05 18:33:56 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.