Bug 32760 - Could not create an native instance of the type 'GameplayKit.GKComponentSystem': the native class hasn't been loaded.
Summary: Could not create an native instance of the type 'GameplayKit.GKComponentSyste...
Alias: None
Product: iOS
Classification: Xamarin
Component: Pre-release ()
Version: XI 8.99 (iOS9 previews)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
: 32839 ()
Depends on:
Reported: 2015-08-04 14:20 UTC by Aaron Sky
Modified: 2015-08-06 20:17 UTC (History)
3 users (show)

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

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 Aaron Sky 2015-08-04 14:20:34 UTC
I am getting the above System.Exception on instantiation of a new GKComponentSystem object. I am using XI, XM, XS and Xcode 7 Beta 4 on simulator. I get the same exception on a physical iPhone 5S running iOS 9.0 Beta 4. 

Application Output: https://gist.github.com/aaronsky/ccf6b0772cf4cf8666b4
Comment 1 Sebastien Pouliot 2015-08-04 14:33:16 UTC
Weird, we have unit tests that reach the same code (without this issue).

Please attach your sample project.
Comment 2 Aaron Sky 2015-08-04 14:37:38 UTC
This project was built without the changes in macios-mac-xcode7/55c68c1a3d1d0739cde0ec3e395625ff411db620

Comment 3 Sebastien Pouliot 2015-08-04 15:06:23 UTC
Build fails because your project references absolute paths, e.g.

Comment 4 Sebastien Pouliot 2015-08-04 15:21:47 UTC
Can you set the simulator build to it's default, which is use "Dont link" ?

I think you could hit a case where we're adding GameplayKit.framework (by default) but not in every case where simlauncher is rebuilt.
Comment 5 Sebastien Pouliot 2015-08-04 16:22:38 UTC
Something was _off_ since re-opening the solution shows "Don't link. I can duplicate the issue now.

It seems it's simlauncher that does not have a reference to GameplayKit.framework - but that does not explain your issue with the iPhone 5S.
Comment 6 Sebastien Pouliot 2015-08-04 16:58:55 UTC
So what I get on my Phone is identical to what I get on the simulator (w/ Link SDK enabled), it's a NullReferenceException on 

			DefaultParticleRate = (float)Particles.ParticleBirthRate;

Can you try to get me a symbolicated crash report from the device ?
Comment 7 Aaron Sky 2015-08-04 17:00:20 UTC
I'm investigating the issues I was having on device and I'm getting to the same point. No longer failing on GKComponentSystem, but on Particles.FromFile. It's an embedded resource issue that I'm currently fixing.
Comment 8 Sebastien Pouliot 2015-08-05 09:07:19 UTC
Ok, let me know if you ever see this on device again (it should not be possible).

The simulator case was fixed yesterday. Pick up (from wrench) 377e9dbfbbd59a4572cb37077417399b2f68ae6f (or later) commit and it should be fine.
Comment 9 Sebastien Pouliot 2015-08-06 20:17:57 UTC
*** Bug 32839 has been marked as a duplicate of this bug. ***