Skip to content

fix(ios): Setting of property mask on 'undefined' during view disposal - #10404

Merged
NathanWalker merged 1 commit into
NativeScript:mainfrom
CatchABus:ios-dispose-view-fix
Oct 14, 2023
Merged

NathanWalker merged 1 commit into
NativeScript:mainfrom
CatchABus:ios-dispose-view-fix

Conversation

@CatchABus

Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

iOS apps crash when trying to dispose native views that do not extend UIView (e.g. UITabBarItem) due to CALayers cleanup.

This trace was provided in discord:

[11:04:49.026] Debug: uncaughtErrorEvent - NativeScriptError: TypeError: Cannot set properties of undefined (setting 'mask')
  ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error:
  Uncaught TypeError: Cannot set properties of undefined (setting 'mask')
   at
      clearLayerMask(file: src/webpack:/app/node_modules/@nativescript/core/ui/styling/background.ios.js:279:0)
      at clearBackgroundVisualEffects(file: src/webpack:/app/node_modules/@nativescript/core/ui/styling/background.ios.js:100:0)
      at disposeNativeView(file: src/webpack:/app/node_modules/@nativescript/core/ui/core/view/index.ios.js:47:21)
      at _tearDownUI(file: src/webpack:/app/node_modules/@nativescript/core/ui/core/view-base/index.js:809:0)
      at (file: src/webpack:/app/node_modules/@nativescript/core/ui/core/view-base/index.js:784:0)
      at (file: src/webpack:/app/node_modules/@nativescript-community/ui-material-core-tabs/tab-strip/index.js:36:0)
      at eachChild(file: src/webpack:/app/node_modules/@nativescript-community/ui-material-core-tabs/tab-strip/index.js:35:0)

What is the new behavior?

Apps will execute the steps after checking whether native view extends UIView.

@cla-bot cla-bot Bot added the cla: yes label Oct 12, 2023
@CatchABus CatchABus changed the title fix(ios): Set mask of property undefined during view disposal fix(ios): Setting of property mask on 'undefined' during view disposal Oct 12, 2023
@JWiseCoder

Copy link
Copy Markdown

Is there any estimate on when 8.6.1 will be released? We haven't been able to update to 8.6.0 because of this issue.

@CatchABus

Copy link
Copy Markdown
Contributor Author

Is there any estimate on when 8.6.1 will be released? We haven't been able to update to 8.6.0 because of this issue.

We request for your patience until 8.6.1 comes out.
Till then, feel free to use next version of @nativescript/core. I think that fix is included there.

@NathanWalker

Copy link
Copy Markdown
Contributor

@JWiseCoder we’ll try to publish that patch before eod Thursday.

@NathanWalker

Copy link
Copy Markdown
Contributor

https://github.com/NativeScript/NativeScript/releases/tag/8.6.1-core

@JWiseCoder

Copy link
Copy Markdown

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants