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

Frequent app crashes with message: 'SamplingProfiler should be destroyed on the same thread it is created' #35030

Closed
Nantris opened this issue Oct 20, 2022 · 12 comments
Labels
Needs: Attention Issues where the author has responded to feedback. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Nantris
Copy link

Nantris commented Oct 20, 2022

Description

App crashes on restart almost without fail with the message 'SamplingProfiler should be destroyed on the same thread it is created'

Version

0.69.6

Output of npx react-native info

System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (4) x64 AMD Ryzen 7 5800X 8-Core Processor
    Memory: 2.25 GB / 19.51 GB
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.17.0/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
    Watchman: 4.9.0 - /usr/bin/watchman
  SDKs:
    Android SDK:
      API Levels: 31, 32, 33
      Build Tools: 30.0.3, 31.0.0, 33.0.0
      System Images: android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: Not Found
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: ~18.0.0 => 18.0.0 
    react-native: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
info React Native v0.70.3 is now available (your project is running on v0.69.6).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.70.3.
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.69.6.

Steps to reproduce

May require being connected to Flipper's Hermes Debugger for the issue to occur.

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

Unknown how to replicate this consistently.

@react-native-bot react-native-bot added Platform: Linux Building on Linux. Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. and removed Needs: Triage 🔍 labels Oct 20, 2022
@github-actions
Copy link

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@react-native-bot react-native-bot removed the Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. label Oct 20, 2022
@Nantris
Copy link
Author

Nantris commented Oct 20, 2022

Bad bot. That section is filled in.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Oct 20, 2022
@janicduplessis
Copy link
Contributor

Might be related to #34129, @jpporto do you know if there were fixes in hermes that mitigates this? This happens on RN 0.69 which probably uses hermes from a few months ago.

@jpporto
Copy link
Contributor

jpporto commented Oct 22, 2022

Hi @janicduplessis,

This is unrelated to #34129, and has been mitigated here. The proper fix is part of RN (this and a few others). Backporting the Hermes fix might be more manageable.

John Paul

@janicduplessis
Copy link
Contributor

@slapbox would you be able to update to 0.70 to see if it still happens

@Nantris
Copy link
Author

Nantris commented Oct 23, 2022

@janicduplessis I'd love to try, but unfortunately can't yet due to using Expo.

@Nantris
Copy link
Author

Nantris commented Oct 23, 2022

I don't know whether the issue is really in React Native or Flipper or both, but it seemingly only occurs with particular versions of Flipper, namely 0.171.x.

See: facebook/flipper#4242

@janicduplessis
Copy link
Contributor

I think since the issue is not super critical it should be fine to wait for next expo release to see if it is fixed.

@Nantris
Copy link
Author

Nantris commented Oct 26, 2022

@janicduplessis maybe not critical for the React Native team, but pretty critical for us... I waste 50% of my time per day because of this, unless the work I'm doing doesn't require the debugger. Note the times between crashes in this image:

image

Also note that I did indeed speak too soon; disabling StrictMode did not fix this. Although the delay til crash upon reload is longer, it still crashes.

@janicduplessis
Copy link
Contributor

@slapbox Expo sdk 47 should include a fix for this and was just released in beta https://twitter.com/expo/status/1587140697341456384?s=46&t=BsU-0_gGXN_LlsNVVvHw2g

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label May 12, 2023
@Nantris
Copy link
Author

Nantris commented May 12, 2023

Not sure if it was the fix mentioned above or something else, but it seems resolved now.

@Nantris Nantris closed this as completed May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

4 participants