Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Drop this code in FinishedLaunching:
var player = GKLocalPlayer.LocalPlayer;
Console.WriteLine ("We never got here, sir.");
The Xamarin.Mac app will crash with "Segmentation fault: 11", no C# stacktrace supplied.
Here is GKLocalPlayer.h:
@interface GKLocalPlayer (GKAdditions)
// Obtain the GKLocalPlayer object.
// The player is only available for offline play until logged in.
// A temporary player is created if no account is set up.
+ (GKLocalPlayer *)localPlayer;
I was having the same issue when I attempted to add GameKit myself for MonoMac.
We now have a fix, preparing.
Quick workaround while we publish an update:
MonoTouch.ObjCRuntime.Dlfcn.dlopen (Constants.GameKitLibrary, 0);
I forgot to mention: put taht code in your Main method.
Workaround is working, thanks, I'm getting the Game Center popup now.
I'll be watching for an update, thanks!
I updated to Xamarin.Mac 1.0.11 and was able to remove the workaround and see this fixed on my Macbook Air.
However, it doesn't work on my brand new iMac--even the workaround doesn't work. I get the exact same error as before.
I'm thinking it might be due to something with my new system. I'm adding an attachment of info about my iMac.
Created attachment 3105 [details]
Info about my iMac
a. What does
Console.WriteLine (File.Exists (Constants.GameKitLibrary));
b. if true, what does
Console.WriteLine (MonoTouch.ObjCRuntime.Dlfcn.dlopen (Constants.GameKitLibrary, 0));
c. finally, from a terminal window, what does returns ?
c. /System/Library/Frameworks/GameKit.framework/GameKit: Mach-O 64-bit dynamically linked shared library x86_64
Does that help?
yes. 'c' tells us the framework is 64 bits only on that machine, when it's 32/64 bits on everything else I've seen so far (including my own, not new, iMac running ML 10.8.2).
Created attachment 3109 [details]
Crash log from Console.app
Ok, so new iMacs are x64 only for certain Frameworks?
Weird, I wonder how many other issues will popup from this.
AFAIK it's the first (public) framework to drop* 32bits support. And it's hard to see why ? since that will break any existing 32bits application using such framework(s).
* unless that missing 32bits support is an Apple bug
Can I change my app to AnyCPU? or is that generally not a good idea yet?
I threw this out there: http://stackoverflow.com/questions/13954333/imac-missing-x86-version-of-gamekit
Here is the other frameworks:
Jonathans-iMac:src jonathanpeppers$ file /System/Library/Frameworks/IOBluetooth.framework/Versions/A/Frameworks/CoreBluetooth.framework/CoreBluetooth
/System/Library/Frameworks/IOBluetooth.framework/Versions/A/Frameworks/CoreBluetooth.framework/CoreBluetooth: Mach-O universal binary with 2 architectures
/System/Library/Frameworks/IOBluetooth.framework/Versions/A/Frameworks/CoreBluetooth.framework/CoreBluetooth (for architecture i386): Mach-O dynamically linked shared library i386
/System/Library/Frameworks/IOBluetooth.framework/Versions/A/Frameworks/CoreBluetooth.framework/CoreBluetooth (for architecture x86_64) Mach-O 64-bit dynamically linked shared library x86_64
Jonathans-iMac:src jonathanpeppers$ file /System/Library/Frameworks/SceneKit.framework/SceneKit
/System/Library/Frameworks/SceneKit.framework/SceneKit: Mach-O universal binary with 2 architectures
/System/Library/Frameworks/SceneKit.framework/SceneKit (for architecture i386): Mach-O dynamically linked shared library i386
/System/Library/Frameworks/SceneKit.framework/SceneKit (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
Jonathans-iMac:src jonathanpeppers$ file /System/Library/Frameworks/StoreKit.framework/StoreKit
/System/Library/Frameworks/StoreKit.framework/StoreKit: Mach-O universal binary with 2 architectures
/System/Library/Frameworks/StoreKit.framework/StoreKit (for architecture i386): Mach-O dynamically linked shared library i386
/System/Library/Frameworks/StoreKit.framework/StoreKit (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
Jonathans-iMac:src jonathanpeppers$ file /System/Library/Frameworks/Accounts.framework/Accounts
/System/Library/Frameworks/Accounts.framework/Accounts: Mach-O 64-bit dynamically linked shared library x86_64
Jonathans-iMac:src jonathanpeppers$ file /System/Library/Frameworks/EventKit.framework/EventKit
/System/Library/Frameworks/EventKit.framework/EventKit: Mach-O 64-bit dynamically linked shared library x86_64
Jonathans-iMac:src jonathanpeppers$ file /System/Library/Frameworks/Social.framework/Social
/System/Library/Frameworks/Social.framework/Social: Mach-O 64-bit dynamically linked shared library x86_64
Jonathan, I asked someone else who just got a new iMac to run the same test and the 32bits version of GameKit is available to him .
Could you have installed other software on your iMac that could have changed your system ? We recently found out that MacKeeper can remove "unused" architectures from some libraries.
No, my iMac has very little on it:
Xcode & command line tools
Xamarin stuff - Mono for Android, MonoTouch, Xamarin.Mac
GitHub for Mac
Cisco Anyconnect VPN client
Sublime Text 2
Some kind of driver/sync software for Motorola Android devices
So, I'm not sure what would have removed it. I don't have Parallels or homebrew on this machine yet.
The binary in the combo update now comes with both architectures, so it should fix this issue.
I tested GKPlayer.LocalPlayer on the current stable branch of Xamarin.Mac and was able to call it and move on successfully with no crash.