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

react-native-window app crash when rendering svg as component and firing navigation.navigate #2569

Open
ashish3408 opened this issue Dec 6, 2024 · 10 comments

Comments

@ashish3408
Copy link

ashish3408 commented Dec 6, 2024

Description

desktop is crashing as soon as I fire navigation.navigate, it is happening if I am rendering svg as component, but works fine if I comment svg component.

Steps to reproduce

{
"name": "svgNavigation",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest",
"windows": "npx @react-native-community/cli run-windows"
},
"dependencies": {
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@react-navigation/elements": "^2.2.4",
"@react-navigation/native": "^7.0.13",
"@react-navigation/native-stack": "^7.1.14",
"@react-navigation/stack": "^7.0.18",
"@svgr/core": "^8.1.0",
"@svgr/plugin-jsx": "^8.1.0",
"@svgr/plugin-svgo": "^8.1.0",
"react": "18.3.1",
"react-native": "0.76.2",
"react-native-gesture-handler": "^2.21.2",
"react-native-reanimated": "^3.16.3",
"react-native-safe-area-context": "^5.0.0",
"react-native-screens": "^4.3.0",
"react-native-svg": "^15.10.1",
"react-native-svg-transformer": "^1.5.0",
"react-native-windows": "^0.76.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.76.2",
"@react-native/eslint-config": "0.76.2",
"@react-native/metro-config": "0.76.2",
"@react-native/typescript-config": "0.76.2",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"metro-config": "^0.81.0",
"prettier": "2.8.8",
"react-test-renderer": "18.3.1",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
},
"react-native-windows": {
"init-windows": {
"name": "svgNavigation",
"namespace": "svgNavigation",
"template": "old/uwp-cpp-app"
}
}
}

Snack or a link to a repository

currently not available

SVG version

15.10.1

React Native version

0.76.3

Platforms

macOS

JavaScript runtime

None

Workflow

None

Architecture

Fabric (New Architecture)

Build type

Debug app & dev bundle

Device

Real device

Device model

Win 10

Acknowledgements

Yes

@ashish3408
Copy link
Author

FYI: the issue happened in windows desktop build.

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Dec 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@ashish3408
Copy link
Author

ashish3408 commented Dec 7, 2024

this can be seen in visual studio, if we start debugging for the application

Exception thrown at 0x00007FFEB573FA4C in Forms.exe: Microsoft C++ exception: winrt::hresult_invalid_argument at memory location 0x0000007373AFD488.
Exception thrown at 0x00007FFEB573FA4C in Forms.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFEB573FA4C in Forms.exe: Microsoft C++ exception: winrt::hresult_invalid_argument at memory location 0x0000007373AFDD08.
Exception thrown at 0x00007FFEB573FA4C in Forms.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in Forms.exe.

The program '[17304] Forms.exe' has exited with code 0 (0x0).

@ashish3408
Copy link
Author

I think once an svg renders it is not unloading from memory on unmount, and that is creating memory leak and the crash, does no one come around with this issue? please help anyone ..

@ashish3408
Copy link
Author

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

here is the repo link

https://github.com/akumar3408/svg-navigation-issue.git

@ashish3408
Copy link
Author

can anyone help here?

@jakex7 jakex7 added windows Repro provided and removed Missing repro This issue need minimum repro scenario labels Dec 9, 2024
@ashish3408
Copy link
Author

anyone please?

@jakex7
Copy link
Member

jakex7 commented Dec 12, 2024

CC @acoates-ms @marlenecota it seems to be a bug in the new windows implementation, is this something you could help with?

@ashish3408
Copy link
Author

Hello @acoates-ms @marlenecota did you get any chance to check this issue?

@ashish3408
Copy link
Author

Hey, anyone ???

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

2 participants