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.
Created attachment 15434 [details]
UIViewController to be swapped in to "Spritekit Game" iOS template
Given a GKAgentDelegate :
public class SimpleDelegate : GKAgentDelegate
public override void AgentDidUpdate(GKAgent agent)
/* Uncomment to cause runtime exception
public override void AgentWillUpdate(GKAgent agent)
triggered via code similar to:
agent = new GKAgent2D ();
agent.Delegate = new SimpleDelegate ();
entity = new GKEntity();
agent.MaxSpeed = 10;
var rammingSpeed = GKGoal.GetGoalToReachTargetSpeed(agent.MaxSpeed);
agent.Behavior = GKBehavior.FromGoal(rammingSpeed, 1.0f);
creates a runtime exception (Argument exception, unknown selector, etc.)
This exception can be avoided by implementing `AgentWillUpdate` in user code.
Create a new iOS "SpriteKit Game" from template
Replace the generated viewcontroller with the attached (fix namespace)
Run to create exception.
Uncomment PositionTrackingAgent.AgentWillUpdate and run again.
Argh. It should read "Uncomment to *avoid* runtime exception"
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[bug39691_PositionTrackingDelegate agentWillUpdate:]: unrecognized selector sent to instance 0x7beba040
Native stack trace:
0 CoreFoundation 0x00960a14 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0898ee02 objc_exception_throw + 50
2 CoreFoundation 0x00969d63 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 libobjc.A.dylib 0x089a3196 -[NSObject forwardInvocation:] + 66
4 CoreFoundation 0x008a7488 ___forwarding___ + 472
5 CoreFoundation 0x008a728e _CF_forwarding_prep_0 + 14
6 GameplayKit 0x0894e24c -[GKAgent2D updateWithDeltaTime:] + 77
7 GameplayKit 0x0893a89b -[GKEntity updateWithDeltaTime:] + 258
It did not see it documented but looks like both selectors needs to be implemented. I get similar results if both are commented or the other one.
* They are declared as @optional in Apple's headers files and I did not see any web docs describing such requirement.
That really looks like an Apple bug and will need an ObjC sample to confirm / file rdar with them. Reducing priority (there's a workaround and it's unlikely _we_ can fix this)
@Alex, once bindings for watchOS 2.2 are completed can you verify (in ObjC) that this issue is an undocumented requirement from Apple ? thanks
Created attachment 15511 [details]
Xamarin.iOS Test Case
Xamarin.iOS Test Case
Created attachment 15512 [details]
Xcode ObjC Test Case
I can reproduce the same issue in this ObjC test case which is a line by line port of the C# one
Native Exception log:
Opened radar://25322551 with apple and it is being tracked in our trello board