[Android] SEGV after change JS Bundle File #32900
Labels
Needs: Triage 🔍
Stale
There has been a lack of activity on this issue and it may be closed soon.
Tech: Bundler 📦
This issue is related to the bundler (Metro, Haul, etc) used.
Description
Greetings to you all.
Don't know if it's exactly a bug, however, I couldn't find anything useful which relates this issue.
I'm trying to use a customized JS Bundle which is written from an external native library to the cache app folder. And, as I'm aware, there's getJSBundleFile which can be overriden with a path to the file itself.
I did it, and the overriden method is being called, but right that, crashes with a SEGV MapErr on a certain memory address.
Tried using an URI from the file path and also the path to the cache itself, but the issue remains the same.
I use loadLibrary before the execution of SoLoader.init to load my own library and perform the bundle file writing onto the cache folder (this is made in the onCreate() method).
The backtrace of the issue differs at times, so I will put both of them.
Of course, if I just use the original index.android.bundle built in assets folder, the application runs smoothly. No crashes or misbehavior are reflected.
I would appreciate any help or orientation if it's not being done correctly.
Best regards.
Version
0.66.4
Output of
npx react-native info
System:
OS: Windows 10 10.0.19042
CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Memory: 663.03 MB / 15.83 GB
Binaries:
Node: 16.6.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 7.20.3 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 26, 28, 29, 30, 31
Build Tools: 30.0.2, 30.0.3
System Images: android-21 | Intel x86 Atom_64, android-21 | Google APIs Intel x86 Atom, android-21 | Google APIs Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom_64, android-24 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom_64, android-24 | Google Play Intel x86 Atom, android-25 | Intel x86 Atom, android-25 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel
x86 Atom_64, android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 |
Google Play Intel x86 Atom_64
Android NDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
IDEs:
Android Studio: Not Found
Visual Studio: Not Found
Languages:
Java: 11.0.10 - D:\Android Studio\jre\bin\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Snack, code example, screenshot, or link to a repository
No response
The text was updated successfully, but these errors were encountered: