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

NativeUIManager::ApplyLayout assertion fails on secondary window in 0.73.X #12927

Closed
k1mmm opened this issue Apr 8, 2024 · 2 comments
Closed
Labels
Area: Multiple Windows Area: Paper bug Old Architecture Broad category for issues that apply to the RN "old" architecture of Cxx Modules + Paper Recent Regression
Milestone

Comments

@k1mmm
Copy link

k1mmm commented Apr 8, 2024

Problem Description

Assertion fails in NativeUIManager::ApplyLayout on secondary window in 0.73.11 due to rootNode being null. This previously worked fine in 0.72.x.

Microsoft.ReactNative.dll!Microsoft::ReactNative::NativeUIManager::ApplyLayout(__int64 tag, float width, float height) Line 920 C++
Microsoft.ReactNative.dll!Microsoft::ReactNative::NativeUIManager::AddRootView'::2'::<lambda_1>::operator()<winrt::Windows::Foundation::IInspectable const &>(const winrt::Windows::Foundation::IInspectable & __formal, const winrt::Windows::UI::Xaml::SizeChangedEventArgs & args) Line 240 C++
Microsoft.ReactNative.dll!winrt::impl::delegate<winrt::Windows::UI::Xaml::SizeChangedEventHandler,Microsoft::ReactNative::NativeUIManager::AddRootView'::2'::<lambda_1>>::Invoke(void * sender, void * e) Line 4683 C++

Steps To Reproduce

  1. Create a secondary window using 'AppWindow'
  2. Resize secondary window

Expected Results

No response

CLI version

12.3.6

Environment

System:
  OS: Windows 10 10.0.22631
  CPU: (20) x64 13th Gen Intel(R) Core(TM) i5-13600KF
  Memory: 13.62 GB / 31.82 GB
Binaries:
  Node:
    version: 18.16.1
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
  npm:
    version: 9.5.1
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Enabled
    Versions:
      - 10.0.18362.0
      - 10.0.19041.0
      - 10.0.22000.0
      - 10.0.22621.0
IDEs:
  Android Studio: Not Found
  Visual Studio:
    - 17.8.34408.163 (Visual Studio Community 2022)
Languages:
  Java: Not Found
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: ^0.73.0
  react-native-windows:
    installed: 0.73.11
    wanted: 0.73.11
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Target Platform Version

10.0.19041

Target Device(s)

Desktop

Visual Studio Version

Visual Studio 2022

Build Configuration

Debug

Snack, code example, screenshot, or link to a repository

No response

@k1mmm k1mmm added the bug label Apr 8, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Apr 8, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Old Architecture Broad category for issues that apply to the RN "old" architecture of Cxx Modules + Paper label Apr 8, 2024
@chrisglein
Copy link
Member

chrisglein commented Apr 11, 2024

Needs someone to dig in and look at the repro. We don't have any simple examples that use multiple windows to start with unfortunately (although that'd be a great item to pair with an investigation here).
@k1mmm if you have a reduced repro in any more detail that'd help jump start this.

You say this asserted. Did it work fine in release?

@chrisglein chrisglein removed the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Apr 11, 2024
@chrisglein chrisglein added this to the Next milestone Apr 11, 2024
@k1mmm
Copy link
Author

k1mmm commented May 12, 2024

@chrisglein Sorry for the late response, I've set up an example repo for multi-window using AppWindow with react-native-windows@0.73.12, and the error is no longer reproducible, so the error is most likely on my end.

I'm closing this but leaving a link to the repo if you guys or anyone else needs a quick example app with a secondary window sharing the same JS context.

https://github.com/k1mmm/rnwmultiwindow

@k1mmm k1mmm closed this as completed May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Multiple Windows Area: Paper bug Old Architecture Broad category for issues that apply to the RN "old" architecture of Cxx Modules + Paper Recent Regression
Projects
None yet
Development

No branches or pull requests

2 participants