Skip to content

Reading collisionBoundingPath on UIView results in Objective C exception #978

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

Closed
MartoYankov opened this issue Aug 14, 2018 · 1 comment
Closed
Assignees
Milestone

Comments

@MartoYankov
Copy link

MartoYankov commented Aug 14, 2018

If there is no issue for your problem, tell us about it

collisionBoundingPath is an optional property and might not have a setter/getter. Visual Studio Code debugger tries to read all properties of a native object and tries to call it resulting in exception (CoreFoundation) -[UIScrollView collisionBoundingPath]: unrecognized selector sent to instance 0x7fb0ca8cea00. This currently breaks the app and debugging stops. Connected to nativescript-community/nativescript-vscode-extension#198

Please, provide the following version numbers that your issue occurs with:

  • CLI: 4.2.0
  • Cross-platform modules: 4.2.0
  • Runtime(s): 4.2.0

Please, tell us how to recreate the issue in as much detail as possible.

Debug an app and hover over any variable/property that holds a native object.

Is there any code involved?

my-blank-ts.zip

  1. Start the app with VS Code debug
  2. Set a breakpoint in app/home.1/home-page.ts line 17
  3. Tap on Navigate to Second
  4. Once the breakpoint hits, hover over the native variable.
@Natalia-Hristova
Copy link
Contributor

Fixed in tns-ios next version -> v4.3.0-2018-09-19-01

mbektchiev added a commit that referenced this issue Feb 25, 2019
* Add `isImplementedInClass` and `isAvailableInClass` methods in
`PropertyMeta` and `MethodMeta` which additionally check whether a Class
instance supports a given optional method
* Use `isAvailableInClass` instead of `isAvailable` in `getOwnPropertySlot` of
`ObjCPrototype`, `ObjCConstructorBase`, `ObjCConstructorNative`
* Add `findInterfaceMeta` function with fallback to base interface
if the desired one is unavailable in the current SDK version
* Add `encodeVersion` `getMajorVersion` and `getMinorVersion` helpers
* Remove hacky patch from `ObjCMethodWrapper::preInvocation` which
fixed the symptoms of #978 but not its root cause
* Modify fixtures and add test cases for methods availability in
`InheritanceTests.js`
* Add test case for unavailable base class

refs #1084
mbektchiev added a commit that referenced this issue Feb 25, 2019
* Add `isImplementedInClass` and `isAvailableInClass` methods in
`PropertyMeta` and `MethodMeta` which additionally check whether a Class
instance supports a given optional method
* Use `isAvailableInClass` instead of `isAvailable` in `getOwnPropertySlot` of
`ObjCPrototype`, `ObjCConstructorBase`, `ObjCConstructorNative`
* Add `findInterfaceMeta` function with fallback to base interface
if the desired one is unavailable in the current SDK version
* Add `encodeVersion` `getMajorVersion` and `getMinorVersion` helpers
* Remove hacky patch from `ObjCMethodWrapper::preInvocation` which
fixed the symptoms of #978 but not its root cause
* Modify fixtures and add test cases for methods availability in
`InheritanceTests.js`
* Add test case for unavailable base class

refs #1085
mbektchiev added a commit that referenced this issue Feb 27, 2019
* Add `isImplementedInClass` and `isAvailableInClass` methods in
`PropertyMeta` and `MethodMeta` which additionally check whether a Class
instance supports a given optional method

* Use `isAvailableInClass` instead of `isAvailable` in `getOwnPropertyNames`
of `ObjCPrototype`, `ObjCConstructorBase`, `ObjCConstructorNative` and
in `materializeProperties` of `ObjCConstructorNative`

* Filter via `isAvailableInClass` in `BaseClassMeta`'s various
method and property getters

* Change `MembersCollection` to be a `HashSet` to avoid adding the same
member more than once when collecting them from the inheritance chain

* Remove unused functions from `BaseClassMeta`

* Add `findInterfaceMeta` function with fallback to the base interface
if the desired one is unavailable in the current SDK version (instead
of the hardcoded `NSObject` so far)

* Remove hacky patch from `ObjCMethodWrapper::preInvocation` which
fixed the symptoms of #978 but not its root cause. Namely, that
unimplemented optional methods were returned as available properties
in `getOwnPropertyNames`.

* Modify fixtures and add test cases for methods availability in
`InheritanceTests.js`

* Add test case for unavailable base class

* Add test case for property with custom selector. The getter of
`secureTextEntry`(`isSecureText`) overrides the default `secureTextEntry`

* Add `encodeVersion` `getMajorVersion` and `getMinorVersion` helpers

refs #1085
mbektchiev added a commit that referenced this issue Feb 28, 2019
* Add `isImplementedInClass` and `isAvailableInClass` methods in
`PropertyMeta` and `MethodMeta` which additionally check whether a Class
instance supports a given optional method

* Use `isAvailableInClass` instead of `isAvailable` in `getOwnPropertyNames`
of `ObjCPrototype`, `ObjCConstructorBase`, `ObjCConstructorNative` and
in `materializeProperties` of `ObjCConstructorNative`

* Filter via `isAvailableInClass` in `BaseClassMeta`'s various
method and property getters

* Change `MembersCollection` to be a `HashSet` to avoid adding the same
member more than once when collecting them from the inheritance chain

* Remove unused functions from `BaseClassMeta`

* Add `findInterfaceMeta` function with fallback to the base interface
if the desired one is unavailable in the current SDK version (instead
of the hardcoded `NSObject` so far)

* Remove hacky patch from `ObjCMethodWrapper::preInvocation` which
fixed the symptoms of #978 but not its root cause. Namely, that
unimplemented optional methods were returned as available properties
in `getOwnPropertyNames`.

* Modify fixtures and add test cases for methods availability in
`InheritanceTests.js`

* Add test case for unavailable base class

* Add test case for property with custom selector in ApiTests. The getter
of `secureTextEntry`(`isSecureText`) overrides the default `secureTextEntry`

* Add `encodeVersion` `getMajorVersion` and `getMinorVersion` helpers

refs #1085
mbektchiev added a commit that referenced this issue Feb 28, 2019
* Add `isImplementedInClass` and `isAvailableInClass` methods in
`PropertyMeta` and `MethodMeta` which additionally check whether a Class
instance supports a given optional method

* Use `isAvailableInClass` instead of `isAvailable` in `getOwnPropertyNames`
of `ObjCPrototype`, `ObjCConstructorBase`, `ObjCConstructorNative` and
in `materializeProperties` of `ObjCConstructorNative`

* Filter via `isAvailableInClass` in `BaseClassMeta`'s various
method and property getters

* Change `MembersCollection` to be a `HashSet` to avoid adding the same
member more than once when collecting them from the inheritance chain

* Remove unused functions from `BaseClassMeta`

* Add `findInterfaceMeta` function with fallback to the base interface
if the desired one is unavailable in the current SDK version (instead
of the hardcoded `NSObject` so far)

* Remove hacky patch from `ObjCMethodWrapper::preInvocation` which
fixed the symptoms of #978 but not its root cause. Namely, that
unimplemented optional methods were returned as available properties
in `getOwnPropertyNames`.

* Modify fixtures and add test cases for methods availability in
`InheritanceTests.js`

* Add test case for unavailable base class

* Add test case for property with custom selector in ApiTests. The getter
of `secureTextEntry`(`isSecureText`) overrides the default `secureTextEntry`

* Add `encodeVersion` `getMajorVersion` and `getMinorVersion` helpers

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

No branches or pull requests

3 participants