Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS example crash on real hardware with error "-[RSTView animator]: unrecognized selector sent to instance" #32

Closed
marysaka opened this issue Jul 14, 2022 · 9 comments

Comments

@marysaka
Copy link

This was tested against a790eb9 with the example on the repo

It appears to me that RSTView is registered in multiple places of the codebase, those could possibly conflict I suppose?

Cargo.toml:

cacao = { git = "https://github.com/ryanmcgrath/cacao", features = [ "uikit", "autolayout" ], default-features = false }

Device syslog for the process:

Jul 14 11:23:48 testing_ios_rust(RunningBoardServices)[43732] <Notice>: Initializing connection
Jul 14 11:23:48 testing_ios_rust(RunningBoardServices)[43732] <Notice>: Removing all cached process handles
Jul 14 11:23:48 testing_ios_rust(RunningBoardServices)[43732] <Notice>: Sending handshake request attempt #1 to server
Jul 14 11:23:48 testing_ios_rust(UIKitCore)[43732] <Notice>: Deactivation reason added: 10; deactivation reasons: 0 -> 1024; animating application lifecycle event: 0
Jul 14 11:23:48 testing_ios_rust(RunningBoardServices)[43732] <Notice>: Creating connection to com.apple.runningboard
Jul 14 11:23:48 testing_ios_rust(libMobileGestalt.dylib)[43732] <Notice>: Cache loaded with 4896 pre-cached in CacheData and 52 items in CacheExtra.
Jul 14 11:23:48 testing_ios_rust(BoardServices)[43732] <Notice>: activating monitor for service com.apple.frontboard.open
Jul 14 11:23:48 testing_ios_rust(BoardServices)[43732] <Notice>: activating monitor for service com.apple.frontboard.workspace-service
Jul 14 11:23:48 testing_ios_rust(FrontBoardServices)[43732] <Notice>: FBSWorkspace connecting to endpoint : <private>
Jul 14 11:23:48 testing_ios_rust(FrontBoardServices)[43732] <Notice>: FBSWorkspace registering source: <private>
Jul 14 11:23:48 testing_ios_rust(FrontBoardServices)[43732] <Notice>: FBSWorkspace connected to endpoint : <private>
Jul 14 11:23:48 testing_ios_rust(RunningBoardServices)[43732] <Notice>: Added observer for process assertions expiration warning: <_RBSExpirationWarningClient: 0x28042d4c0>
Jul 14 11:23:48 testing_ios_rust(RunningBoardServices)[43732] <Notice>: Handshake succeeded
Jul 14 11:23:48 testing_ios_rust(RunningBoardServices)[43732] <Notice>: Identity resolved as application<zone.mary.testing.testing-ios-rust>
Jul 14 11:23:48 testing_ios_rust(libAccessibility.dylib)[43732] <Notice>: Read CategoryName: per-app = 1, category name = (null)
Jul 14 11:23:48 testing_ios_rust(libAccessibility.dylib)[43732] <Notice>: Read CategoryName: per-app = 0, category name = (null)
Jul 14 11:23:48 testing_ios_rust(XCTTargetBootstrap)[43732] <Notice>: Registering for test daemon availability notify post.
Jul 14 11:23:48 testing_ios_rust(XCTTargetBootstrap)[43732] <Notice>: notify_get_state check indicated test daemon not ready.
Jul 14 11:23:48 testing_ios_rust(XCTTargetBootstrap)[43732] <Notice>: notify_get_state check indicated test daemon not ready.
Jul 14 11:23:48 testing_ios_rust(XCTTargetBootstrap)[43732] <Notice>: notify_get_state check indicated test daemon not ready.
Jul 14 11:23:48 testing_ios_rust(UIKitCore)[43732] <Notice>: Deactivation reason added: 11; deactivation reasons: 1024 -> 3072; animating application lifecycle event: 0
Jul 14 11:23:48 testing_ios_rust(UIKitCore)[43732] <Notice>: Deactivation reason removed: 10; deactivation reasons: 3072 -> 2048; animating application lifecycle event: 0
Jul 14 11:23:48 testing_ios_rust(UIKitCore)[43732] <Notice>: <private>: Will add backgroundTask with taskName: <private>, expirationHandler: <__NSGlobalBlock__: 0x2089178f0>
Jul 14 11:23:48 testing_ios_rust(UIKitCore)[43732] <Notice>: <private>: Created background task <private>. Assertion will be assigned soon
Jul 14 11:23:48 testing_ios_rust(UIKitCore)[43732] <Notice>: <private>: Creating new assertion since assertion is nil
Jul 14 11:23:48 testing_ios_rust(UIKitCore)[43732] <Notice>: <private>: Created new assertion <BKSProcessAssertion: 0x282721ae0>
Jul 14 11:23:48 testing_ios_rust(UIKitCore)[43732] <Notice>: Deactivation reason added: 5; deactivation reasons: 2048 -> 2080; animating application lifecycle event: 1 
Jul 14 11:23:48 testing_ios_rust(UIKitCore)[43732] <Notice>: [0x282f30000] Initialized with scene: <UIWindowScene: 0x13ff04be0>; behavior: <_UIEventDeferringBehavior_Default: 0x28042bc20>
Jul 14 11:23:48 testing_ios_rust(CoreFoundation)[43732] <Notice>: -[RSTView animator]: unrecognized selector sent to instance 0x141d05510
Jul 14 11:23:48 testing_ios_rust(CoreFoundation)[43732] <Notice>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RSTView animator]: unrecognized selector sent to instance 0x141d05510'
*** First throw call stack:
(0x1ad679288 0x1c6373744 0x1ad756fc4 0x1b09cdf5c 0x1ad60de98 0x1ad60cf70 0x1000e71f0 0x1000e57d4 0x1000f0f40 0x1000e9ba4 0x1000e94e4 0x1000e939c 0x1000d6788 0x1000d63e8 0x1000d5484 0x1afdaf390 0x1b00aec64 0x1afdb1a48 0x1afcf2508 0x1bf883294 0x1bf8a9090 0x1bf864308 0x1bf865958 0x1ad2e0a30 0x1ad2e44e0 0x1bf865c70 0x1bf865040 0x1bf869700 0x1ad69b414 0x1ad6ac1a0 0x1ad5e56f8 0x1ad5eb05c 0x1ad5febc8 0x1c9732374 0x1aff6e648 0x1afcefd90 0x1000ddaa8 0x1000d6724 0x1000d99f4 0x1000e0414 0x1000d5ca0 0x10012c9dc 0x1000d5c68 0x1000d68e4 0x10063dce4)
@ryanmcgrath
Copy link
Owner

Ah, yeah, this is an oversight on my part - and why I label iOS as alpha, heh. More people testing it will push things like this to get found and fixed though, so def appreciate this issue being opened.

The core issue is that the APIs used for animation in Cocoa are here, and I simply didn't do the iOS counterpart - it's attempting to initialize animator proxy access with a selector that's not used on iOS.

I'd need to sit down and either stub this out so it's just a no-op on iOS for now, or do the actual work to support basic animations on iOS as well.

@ryanmcgrath
Copy link
Owner

#46 should fix this one it's merged - so closing this for now. Any further comments can go over there.

Thanks for reporting it!

@Miha-Rozina
Copy link

Miha-Rozina commented Jun 8, 2023

Is this supposed to be fixed in 0.3.2? I get the same error. If not, is there a plan on releasing a new version with this fix?

@ryanmcgrath
Copy link
Owner

ryanmcgrath commented Jun 8, 2023 via email

@Miha-Rozina
Copy link

Miha-Rozina commented Jun 8, 2023

With the repo code it works with the commit 64908e5. I think I tried the latest commit a few days ago and it also didn't work, but another issue.

I'm trying to publish my crate and with published crates you cannot have git dependencies. Thats why I am asking if its possible to get a new version on crates.io.

@ryanmcgrath
Copy link
Owner

ryanmcgrath commented Jun 8, 2023 via email

@Miha-Rozina
Copy link

Alright, thanks a lot!

@ryanmcgrath
Copy link
Owner

@Miha-Rozina there should be a 0.4.0-beta1 on crates.io now. I opted to cut a beta release for the moment since there's some more internal changes lurking and I want to communicate to people that it may be wonky at first, but this should hopefully still unblock you for now. Let me know how it works, thanks!

@Miha-Rozina
Copy link

Thanks a lot! I do get a runtime error though, but a different one. I'll open a new issue about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants