Giter Site home page Giter Site logo

facebook / hermes Goto Github PK

View Code? Open in Web Editor NEW
9.4K 142.0 598.0 80.94 MB

A JavaScript engine optimized for running React Native.

Home Page: https://hermesengine.dev/

License: MIT License

CMake 0.56% C++ 50.32% JavaScript 37.92% Python 1.48% C 0.21% Shell 0.19% D 0.01% Java 1.58% NASL 0.02% Ruby 0.01% Objective-C 0.01% Objective-C++ 0.55% Swift 0.10% POV-Ray SDL 0.12% DTrace 0.01% TypeScript 0.92% Rust 6.01%

hermes's Introduction

Hermes JS Engine

MIT license npm version Fuzzing Status PRs Welcome Hermes logo - large H with wings

Hermes is a JavaScript engine optimized for fast start-up of React Native apps. It features ahead-of-time static optimization and compact bytecode.

If you're only interested in using pre-built Hermes in a new or existing React Native app, you do not need to follow this guide or have direct access to the Hermes source. Instead, just follow these instructions to enable Hermes.

Noted that each Hermes release is aimed at a specific RN version. The rule of thumb is to always follow Hermes releases strictly. Version mismatch can result in instant crash of your apps in the worst case scenario.

If you want to know how to build and hack on Hermes directly, and/or integrate Hermes built from source into a React Native app then read on.

The instructions here very briefly cover steps to build the Hermes CLI. They assume you have typical native development tools setup for your OS, and support for cmake and Ninja. For more details of required dependencies, building Hermes with different options, etc. follow these links instead:

To build a local debug version of the Hermes CLI tools the following steps should get you started on macOS/Linux:

mkdir hermes_workingdir
cd hermes_workingdir
git clone https://github.com/facebook/hermes.git
cmake -S hermes -B build -G Ninja
cmake --build ./build

Or if you're using Windows, the following should get you going in a Git Bash shell:

mkdir hermes_workingdir
cd hermes_workingdir
git -c core.autocrlf=false clone https://github.com/facebook/hermes.git
cmake -S hermes -B build -G 'Visual Studio 16 2019' -A x64
cmake --build ./build

You will now be in a directory with the output of building Hermes into CLI tools. From here you can run a piece of JavaScript as follows:

echo "'use strict'; function hello() { print('Hello World'); } hello();" | ./bin/hermes

Contributing

The main purpose of this repository is to continue to evolve Hermes, making it faster and more efficient. We are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving Hermes.

Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing Guide

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Hermes.

License

Hermes is MIT licensed.

hermes's People

Contributors

adithiraofb avatar avp avatar bradzacher avatar dannysu avatar dependabot[bot] avatar dreiss avatar dulinriley avatar fbmal7 avatar ftanuma avatar gkz avatar haozhun avatar huxpro avatar jbower-fb avatar jpporto avatar kiwi137 avatar kodafb avatar lavenzg avatar lun-liu avatar mhorowitz avatar motiz88 avatar neildhar avatar noahlemen avatar passy avatar pieterv avatar samchou19815 avatar swolchok avatar tmikov avatar tyao1 avatar werew avatar willholen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hermes's Issues

not standard date.toString() format

(new Date).toString()

results in "2019-07-15T20:29:57.312+03:00"

instead of the familiar javascript format:

Mon Jul 15 2019 20:29:57 GMT+0300 (IDT)

any ideas how I can enforce the familiar javascript format instead of this new one as it is not compatible with my code?

Hermes relies on deprecated/removed things in newer versions of LLVM

Our platform's LLVM is based on LLVM 7.0, but hermes expects source that are older. As such, I have to do some manual fix-ups to get hermes to compile with our newer LLVM sources. One example I can share:

In file included from hermes/API/hermes/CompileJS.cpp:9:
In file included from hermes/include/hermes/BCGen/HBC/BytecodeProviderFromSrc.h:10:
In file included from hermes/include/hermes/BCGen/HBC/Bytecode.h:16:
In file included from hermes/include/hermes/IR/IR.h:24:
hermes/include/hermes/AST/ESTree.h:189:14: error: unknown template name 'ilist_default_traits'
    : public ilist_default_traits<::hermes::ESTree::Node> {

This is due to this LLVM commit from last year:
llvm-mirror/llvm@7fe67cc

If we could update the hash LLVM requires to align with the LLVM on my platform, that would be cool.

Problem with MobX 5+ : Your environment doesn't support Symbol and Proxy objects.

Problem: MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore., js engine: hermes

IMAGE 2019-07-12 14:50:25

Reproducing the error:

react-native init HermesWithMobX
yarn add mobx --save
yarn add mobx-react-lite
project.ext.react = [
    entryFile: "index.js",
    enableHermes: true, 
]

And I'm just using the MobX also you can look this repo for this example:

Example Repo: https://github.com/talut/mobx-with-hermes-example

React Native App crashes after splash screen when Hermes is enabled

React Native version:
0.60.4
Enabled Hermes

Crash on release android build after splash screen

07-29 14:06:59.334 21833 21833 F DEBUG : #00 pc 000000000001a170 /data/app/app.theMovieExpert-wKzSD-OkiRBPXzh7GD8Acw==/lib/arm64/libhermes.so (facebook::hermes::detail::hermesFatalErrorHandler(void*, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&, bool)+28)
07-29 14:07:00.136 749 749 I Zygote : Process 21790 exited due to signal (9)

Adding globalThis

Hey,

I want to try contributing some code to Hermes because it looks like a fun project and a lot more manageable to push code to than V8 (or other big engines).

globalThis is a new canonical way to access the global variable.

Do you have plans to support this (standard) feature and if so - would you be interested in a PR for this?

(I totally get if the answer is "no" because of scoping and I didn't see any other exposed glboal - even though it's standard JS)

Unicode implementation for Windows

Hermes is Unicode aware. It relies on external libraries for Unicode algorithms and data. On Android it directly calls the platform APIs through JNI bridge, and on iOS it calls CF APIs. For other platforms, Hermes can be built to link against a bundled ICU library (http://site.icu-project.org/). For windows, Hermes can be built to consume the ICU already available in Win10 OS, but the availability is guaranteed only from Win10 RS3 onwards. All the implementation of the Unicode abstraction in Hermes are kept under "lib\Platform\Unicode*".

An ICU library can be very big depending on the number of locales that we intent to support. It can be ~30MB for full internationalization. Hence, we want to avoid bundling custom ICU binary with the apps.

Hence, we intent to add a Unicode implementation in Hermes which works on all versions of Windows, taking advantage of the internationalization libraries already available as part of the respective Windows versions.

Expose test262 results with releases

I've been looking into your test262 compliance (official ECMAScript test suite), and I've seen your blacklist file.

I totally get that this engine is very new and this is then a work in progress. But to better allow early-stage users to decide in which condition they should try it, I guess it would be very nice to expose the supported (and not supported) ECMAScript features as per the test262 full results.

Maybe could you even fill the Kangax ECMAScript compatibility table with the results

Thanks

Regex causes "Quantifier has nothing to repeat"

I've tested this against the non-hermes version and it works fine. It seems that when I attempt to use my regex string it crashes the app:

Invalid regular expression: Quantifier has nothing to repeat, js engine: hermes

I have an example application here: https://github.com/Kikketer/HermesRejex/blob/master/App.js#L22

It's very simple in the fact that it attempts to run a rejex against a string when you tap the "Hi There" text.

The simple app is right out of the react-native init except that it has hermes enabled and this new tap functionality.

Also since reading regex can be painful, the string this matches would be:

{{date(2019-07-17T14:57:33.780Z, short)}}

iOS

What about iOS? Why only for Android?

Bundle Format Spec

Hello :)

I work for Sentry, we do crash reporting and therefore we are very interested in the bundle format / source maps.
We recently added support for ram bundles which had its own binary format and it seems that hermes has yet another format.

Can you point us towards some docs/specs/source so we can start implementing support for hermes bundles?

Dates and ISO 8601

ISO 8601 states:
YYYY-MM-DDThh:mm:ss.s

where:
ss = two digits of second (00 through 59)
s = one or more digits representing a decimal fraction of a second

But in Hermes, new Date('2019-08-07T00:00:00.760738998Z') gives 2019-08-15T19:18:58.998Z because 760738998 is interpreted as 760738.998 seconds.

Generators support

The documentation claims that generators are supported in Hermes, as well as for-of loops:

hermes/doc/Features.md

Lines 5 to 12 in 9cf7a40

## Supported
- Symbols (including most well-known Symbols)
- Iteration (with `[Symbol.iterator]`)
- `for..of` loops
- Destructuring assignment (with array and object "rest" properties)
- Template string literals
- Generators (`function*` and `yield`)

Consider this gist: https://gist.github.com/noomorph/f9272f1a3f4a9d1f419c2e8dadfb5fe2

As for for-of.js, the command below runs successfully, thereby confirming built-in support for that construct:

> ./hermes for-of.js
0
1
2

As for generator.js, a similar command would fail, like shown below:

> ./hermes generator.js
generator.js:1:9: error: 'identifier' expected after 'function'
function* seq(n) {
~~~~~~~~^

shell returned 2

Steps to reproduce

  1. Download Hermes binary shipped with the latest release: https://github.com/facebook/hermes/releases/tag/v0.1.0
  2. Download the gist above as ZIP.
  3. Unpack Hermes and gist to the same directory, and cd into it.
  4. Run the commands suggested above.

Expected result

I see a few options - either:

  1. It is a documentation issue. Then docs should explicitly state that support for generators is not built-in, instead, Hermes relies on a transpiler.
  2. It is a bug, and generators were meant to work without prior transpilation in Hermes.
  3. It is an incorrect issue - and I just need to add extra command-line flags to run code with generators via Hermes.

Actual result

While for-of and generators stand in the very same Supported features list side by side, I see major differences in how they are supported in Hermes. More clarity won't hurt if we bring it in.

Use `cmake --build` rather than directly invoking tools

In several build scripts and build instructions, we directly invoke build specific tools, e.g. MSBuild.exe for MSVC++ and ninja for Ninja builds. We should instead use cmake --build for all of them.

This would simplify them by removing unnecessary dependencies and complexities, and allow using uniform configuration options like CMAKE_BUILD_PARALLEL_LEVEL.

non-ASCII character in string - Crash in RN debug mode

I open this new issue as @dulinriley requested.
It crash with the error below:

A/libc: /Users/willholen/intern/hermes/API/hermes/hermes.cpp:1378: auto facebook::hermes::HermesRuntimeImpl::createStringFromAscii(const char *, size_t)::(anonymous class)::operator()() const: assertion "static_cast(str[i]) < 128 && "non-ASCII character in string"" failed
Fatal signal 6 (SIGABRT), code -6 in tid 22378 (mqt_js)

stack trace:

tgkill 0x0000007fb2680838
abort 0x0000007fb2632ed4
__libc_fatal 0x0000007fb263aee0
__assert2 0x0000007fb2633624
facebook::hermes::HermesRuntimeImpl::createStringFromAscii(char const*, unsigned long) 0x0000007f8e129914
void facebook::jsi::Object::setPropertyfacebook::jsi::Value&(facebook::jsi::Runtime&, char const*, facebook::jsi::Value&&&) 0x0000007f9030b458
facebook::jsi::valueFromDynamic(facebook::jsi::Runtime&, folly::dynamic const&) 0x0000007f9030b198
facebook::jsi::valueFromDynamic(facebook::jsi::Runtime&, folly::dynamic const&) 0x0000007f9030b154
facebook::jsi::valueFromDynamic(facebook::jsi::Runtime&, folly::dynamic const&) 0x0000007f9030b154
facebook::jsi::valueFromDynamic(facebook::jsi::Runtime&, folly::dynamic const&) 0x0000007f9030b0cc
facebook::react::JSIExecutor::invokeCallback(double, folly::dynamic const&) 0x0000007f902fe01c
___lldb_unnamed_symbol185$$libreactnativejni.so 0x0000007f90ba7dc4
___lldb_unnamed_symbol228$$libreactnativejni.so 0x0000007f90ba8de4
___lldb_unnamed_symbol42$$libreactnativejni.so 0x0000007f90b6b8c0
facebook::jni::detail::MethodWrapper<void (facebook::react::JNativeRunnable::)(), &(facebook::react::JNativeRunnable::run()), facebook::react::JNativeRunnable, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject>) 0x0000007f90b5ac78
facebook::jni::detail::FunctionWrapper<void ()(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject>), &(facebook::jni::detail::MethodWrapper<void (facebook::react::JNativeRunnable::)(), &(facebook::react::JNativeRunnable::run()), facebook::react::JNativeRunnable, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject>)), facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject*, void>::call(_JNIEnv*, _jobject*) 0x0000007f90b5abf4
art_quick_generic_jni_trampoline 0x0000007fae2bc504
0x00000000996d5bd8
art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*) 0x0000007fade82da4
art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x0000007fae02d488
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x0000007fae027b50
bool art::interpreter::DoInvoke<(art::InvokeType)0, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x0000007fae054a64
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x0000007fae04c040
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x0000007fae008930
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x0000007fae00efcc
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x0000007fae027b30
bool art::interpreter::DoInvoke<(art::InvokeType)3, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x0000007fae05280c
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x0000007fae04fbec
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x0000007fae008930
artQuickToInterpreterBridge 0x0000007fae28e958
art_quick_to_interpreter_bridge 0x0000007fae2bc620
0x00000000996983e0

Consider supporting Proxy

In https://github.com/facebook/hermes/blob/master/doc/Features.md Proxy is listed as Excluded From Support. With

Hermes plans to target ECMAScript 2015 (ES6), with some carefully considered exceptions.

What are those considerations regarding Proxy?

Especially some library in JS environnement like:

  • mobx 5
  • immer
    rely on proxy support. It is super usefully to add observability upon an object access which helps building reactive apps.

Would it be technically possible to have support as an external / optionnal *. aar so it does bot affect the size of hermes ?

Solves:

React Native app using Hermes crashes on Android 4.4

Hi,

I've enabled Hermes on our application and upon testing multiple Android versions I noticed the app is crashing at boot time on Android 4.4. Android versions 5 and up are ok.

I've been able to reproduce this on a brand new React Native project:

  1. react-native init
  2. Enable Hermes
  3. Create APK and run on Android 4.4 device --> Crash

I've tried the same with Hermes disabled (using JSC) and this is running fine.

Crash:
D/SoLoader( 3108): About to load: libhermes.so D/SoLoader( 3108): libhermes.so not found on /data/data/com.hermes/lib-main D/SoLoader( 3108): libhermes.so found on /data/app-lib/com.hermes-1 D/SoLoader( 3108): Not resolving dependencies for libhermes.so D/dalvikvm( 3108): Trying to load lib /data/app-lib/com.hermes-1/libhermes.so 0x9d0430e0 E/dalvikvm( 3108): dlopen("/data/app-lib/com.hermes-1/libhermes.so") failed: dlopen failed: cannot locate symbol "posix_fallocate" referenced by "libhermes.so"... E/SoLoader( 3108): couldn't find DSO to load: libhermes.so caused by: dlopen failed: cannot locate symbol "posix_fallocate" referenced by "libhermes.so"... W/dalvikvm( 3108): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/facebook/hermes/reactexecutor/HermesExecutor; W/dalvikvm( 3108): threadid=11: thread exiting with uncaught exception (group=0x9cd48b20) I/dalvikvm( 3108): Could not find method android.view.View.addKeyboardNavigationClusters, referenced from method androidx.core.view.ViewCompat.addKeyboardNavigationClusters W/dalvikvm( 3108): VFY: unable to resolve virtual method 2100: Landroid/view/View;.addKeyboardNavigationClusters (Ljava/util/Collection;I)V D/dalvikvm( 3108): VFY: replacing opcode 0x6e at 0x0006 I/dalvikvm( 3108): Failed resolving Landroidx/core/view/ViewCompat$OnUnhandledKeyEventListenerWrapper; interface 488 'Landroid/view/View$OnUnhandledKeyEventListener;' W/dalvikvm( 3108): Link of class 'Landroidx/core/view/ViewCompat$OnUnhandledKeyEventListenerWrapper;' failed E/dalvikvm( 3108): Could not find class 'androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper', referenced from method androidx.core.view.ViewCompat.addOnUnhandledKeyEventListener W/dalvikvm( 3108): VFY: unable to resolve new-instance 1429 (Landroidx/core/view/ViewCompat$OnUnhandledKeyEventListenerWrapper;) in Landroidx/core/view/ViewCompat; D/dalvikvm( 3108): VFY: replacing opcode 0x22 at 0x001a I/dalvikvm( 3108): Could not find method android.view.View.cancelDragAndDrop, referenced from method androidx.core.view.ViewCompat.cancelDragAndDrop W/dalvikvm( 3108): VFY: unable to resolve virtual method 2108: Landroid/view/View;.cancelDragAndDrop ()V D/dalvikvm( 3108): VFY: replacing opcode 0x6e at 0x0006 E/dalvikvm( 3108): Could not find class 'android.view.WindowInsets', referenced from method androidx.core.view.ViewCompat.dispatchApplyWindowInsets W/dalvikvm( 3108): VFY: unable to resolve check-cast 507 (Landroid/view/WindowInsets;) in Landroidx/core/view/ViewCompat; D/dalvikvm( 3108): VFY: replacing opcode 0x1f at 0x000a I/dalvikvm( 3108): Could not find method android.view.View.dispatchNestedFling, referenced from method androidx.core.view.ViewCompat.dispatchNestedFling W/dalvikvm( 3108): VFY: unable to resolve virtual method 2116: Landroid/view/View;.dispatchNestedFling (FFZ)Z D/dalvikvm( 3108): VFY: replacing opcode 0x6e at 0x0006 I/dalvikvm( 3108): Could not find method android.view.View.dispatchNestedPreFling, referenced from method androidx.core.view.ViewCompat.dispatchNestedPreFling W/dalvikvm( 3108): VFY: unable to resolve virtual method 2117: Landroid/view/View;.dispatchNestedPreFling (FF)Z D/dalvikvm( 3108): VFY: replacing opcode 0x6e at 0x0006 I/dalvikvm( 3108): Could not find method android.view.View.dispatchNestedPreScroll, referenced from method androidx.core.view.ViewCompat.dispatchNestedPreScroll W/dalvikvm( 3108): VFY: unable to resolve virtual method 2118: Landroid/view/View;.dispatchNestedPreScroll (II[I[I)Z D/dalvikvm( 3108): VFY: replacing opcode 0x6e at 0x0006 I/dalvikvm( 3108): Could not find method android.view.View.dispatchNestedScroll, referenced from method androidx.core.view.ViewCompat.dispatchNestedScroll W/dalvikvm( 3108): VFY: unable to resolve virtual method 2119: Landroid/view/View;.dispatchNestedScroll (IIII[I)Z D/dalvikvm( 3108): VFY: replacing opcode 0x74 at 0x0006 I/dalvikvm( 3108): Could not find method android.view.View.getBackgroundTintList, referenced from method androidx.core.view.ViewCompat.getBackgroundTintList W/dalvikvm( 3108): VFY: unable to resolve virtual method 2134: Landroid/view/View;.getBackgroundTintList ()Landroid/content/res/ColorStateList; D/dalvikvm( 3108): VFY: replacing opcode 0x6e at 0x0006 E/AndroidRuntime( 3108): FATAL EXCEPTION: create_react_context E/AndroidRuntime( 3108): Process: com.hermes, PID: 3108 E/AndroidRuntime( 3108): java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: dlopen failed: cannot locate symbol "posix_fallocate" referenced by "libhermes.so"... E/AndroidRuntime( 3108): at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738) E/AndroidRuntime( 3108): at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591) E/AndroidRuntime( 3108): at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529) E/AndroidRuntime( 3108): at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484) E/AndroidRuntime( 3108): at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20) E/AndroidRuntime( 3108): at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27) E/AndroidRuntime( 3108): at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:949) E/AndroidRuntime( 3108): at java.lang.Thread.run(Thread.java:841) W/ActivityManager( 1600): Force finishing activity com.hermes/.MainActivity D/gralloc_ranchu( 1173): gralloc_alloc: Creating ashmem region of size 1323008

Hermes crashes on attempt to emit binary to the same destination

UPD: The bug looks Linux-specific.

Steps to reproduce

  1. Download latest release: https://github.com/facebook/hermes/releases/download/v0.1.0/hermes-cli-linux-v0.1.0.tar.gz
  2. Change directory to the one with the unpacked hermes binary.
  3. Download the attached bundle: https://gist.githubusercontent.com/noomorph/db28b07f10d822e58af10f0276eac5b7/raw/2ec64da516295db823fa0aee327f7fa3221e51bf/index.android.bundle
  4. Run:
hermes -emit-binary -out index.android.bundle index.android.bundle -O -w

Expected result

The original bundle file should be replaced with the emitted binary.

Actual result

Crash:

Stack dump:
0.      Program arguments: /home/x/Projects/hermesvm/10/hermes --emit-binary -out index.android.bundle index.android.bundle -O -w
1.      Program arguments: /home/x/Projects/hermesvm/10/hermes --emit-binary -out index.android.bundle index.android.bundle -O -w
[0x41ba83]
[0x41abc9]
[0x41ac6c]
[0x4265e0]
[0x499f43]
[0x49a163]
[0x43d7ff]
[0x43d967]
[0x44003a]
[0x4399b2]
[0x439b32]
[0x42b8b9]
[0x4308d6]
[0x40487b]
[0x712f34]
[0x7131b1]
[0x408116]
[0x41ba83]
[0x41abc9]
[0x41ac6c]
[0x4265e0]
[0x499f43]
[0x49a163]
[0x43d7ff]
[0x43d967]
[0x44003a]
[0x4399b2]
[0x439b32]
[0x42b8b9]
[0x4308d6]
[0x40487b]
[0x712f34]
[0x7131b1]
[0x408116]
Bus error (core dumped)

Environment

  • Ubuntu 18.04.2 LTS (4.15.0-54-generic)

Hermes is slower then JSC when using cached JSRuntime

My React Native project is different from the official React Native project:I cached ReactInstanceManager when user leave the last ReactNative Activity. When the user enters the same page again, the cached ReactInstanceManager is used.

When I use jsc, it takes 200 ms for me to enter the same page the second time, but more than 500 ms for hermes.

I'm very interested in hermes, but this problem is blocking me now. Can you give me some help or ideas?

Not an issue but a question

Thanks for all the hard work you people do to make RN better.
I am conscious about apk size and i hope everyone is. Since newer RN versions produce a large apk files but if you are using older versions like 0.57.^ , you get a relatively small apk size.
Is there any way i can use hermes with older versions of React native.
Thanks

Hermes incorrectly handles some class definitions

Description

Normally, since the support for classes has not landed in Hermes, when you run code with classes, e.g.:

class A {
  foo() {}
}

You would expect the following error:

> ./hermes class.js
class.js:1:1: error: invalid statement encountered.
class A {
^~~~~~~~~
Emitted 1 errors. exiting.

This is fine, and the behavior is consistent. But - see below:

Steps to reproduce

However, if you add a semicolon after foo method definition:

-  foo() {}
+  foo() {};

and run it again:

> ./hermes class.js

Actual result

Hermes freezes (hangs up).

Screenshot from 2019-07-18 13-16-19

Expected result

Hermes should print an error:

> ./hermes class.js
class.js:1:1: error: invalid statement encountered.
class A {
^~~~~~~~~
Emitted 1 errors. exiting.

Addendum: Source code for the problematic class.js

Environment

[Crash] can't find libhermes.so in certain cases (64bit?)

Context:

we're having a hybrid app (native + RN), that is using React Native 0.60.4 and Hermes for the RN part.

Current behavior/problem:

the release build (universal APK) that incorporates the Hermes "adaptions" (= switch) is working fine for a big chunk of our userbase but crashes for the others.

crashMessage:
mostly: couldn't find DSO to load: libhermes.so,
whereas other users have a slightly different message:

couldn't find DSO to load: libhermes.so caused by: couldn't find DSO to load: libc++_shared.so caused by: dlopen failed:"/data/data/.../lib-3/libc++_shared.so" is 32-bit instead of 64-bit

(could also be lib-1, lib-2, ...).

Additional info:

  • crashLocation: SourceFile line 738 in com.facebook.soloader.SoLoader.ॱ
  • crashException: java.lang.UnsatisfiedLinkError

What we did:

a.) switching the "enableHermes" flag from false to true

b.) add a couple of pickFirst entries to the build.gradle file

packagingOptions {
        pickFirst 'lib/x86/libc++_shared.so'
        pickFirst 'lib/arm64-v8a/libc++_shared.so'
        pickFirst 'lib/x86_64/libc++_shared.so'
        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
    }

(similar to what facebook/react-native#25601 (comment) suggested/did)

c.) we had to order the dependencies within the dependencies.gradle file as follows (excerpt)

dependencies {
	api 'com.facebook.react:react-native:0.59.10'
	// Workaround for using Hermes as JS engine
	api fileTree(dir: 'libs', include: '*.aar')
	api 'com.facebook.react:react-native:0.60.4'

Is it worth to use different js engine on android?

I am wondering about long-term plans and motivation of creating hermes.

Application startup time and apk size are very important, but compatibility across platforms is very important as well.

It took core team a while to bring up-to-date release of JSC to android using https://github.com/react-native-community/jsc-android-buildscripts in core. And both platforms are using more or less same version of webkit now.

Hermes works in a different way (bite-code generation), uses different bundle format and does not support all js features supported by JSC. I think RN on android is less stable(facebook/react-native#21755, facebook/react-native#24261, facebook/react-native#15059) then IOS due to larger device and OS diversity. New engine potentially contains even more bugs sine it's very new. Also it might not properly work with existing crash report tools, code-push like things and any other tools which uses reflection/js modification in the runtime due to different format of bundle.

Considering all things above I want to ask, is it really worth to try and what are facebook long-term plans about this engine.

Example of native interop (NativeFunction, etc)?

I'm curious to play around with Hermes outside of the React Native context, with my own C++ code. From looking through the code it looks as though things like NativeFunction are what I want to be using, but I'm curious to know if there is a good example anywhere of declaring a native function or class, adding it to a context and running it?

Clarification on in progress features

Thanks for this awesome project! Looking forward to seeing where this goes :)

Features.md notes that let and const support is in progress. Is that still accurate? Does that mean if we use Hermes right now we cannot use let and const at all?

There are other things in progress too like "classes and method definitions" that sound like major limitations, but I'm guessing there are only edge case issues. Some example code of what is and isn't supported might be helpful in Features.md.

Heap snapshot support

I'm looking for a JS engine with the ability to take snapshots of the JS heap at an arbitrary points in time. The idea is for snapshots to be serialized, saved to disk, and later deserialized in a completely different process to continue execution. V8 can do this with its SnapshotCreator but it can be a rather slow process.

I scanned through the code but didn't find anything. I was wondering if:

  1. Is this by any chance in your roadmap?
  2. Could this be implemented with the current architecture in a practical/elegant/performant way?

AwesomeProject is crashing with Hermes

Normal Awesomeproject is working fine without Hermes
Platform Android
Device Pixel XL
NDK:- 16B
SDK 28.2

02-21 16:23:22.415 27682 27722 D SoLoader: About to load: libreactnativejni.so
02-21 16:23:22.416 27682 27722 D SoLoader: libreactnativejni.so not found on /data/data/com.awesomeproject/lib-main
02-21 16:23:22.416 27682 27722 D SoLoader: libreactnativejni.so found on /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64
02-21 16:23:22.416 27682 27722 D SoLoader: Not resolving dependencies for libreactnativejni.so
02-21 16:23:22.421 27682 27722 D SoLoader: Loaded: libreactnativejni.so
02-21 16:23:22.422 27682 27722 D ReactNative: Initializing React Xplat Bridge.
02-21 16:23:22.429 27682 27722 D ReactNative: Initializing React Xplat Bridge before initializeBridge
02-21 16:23:22.521 27682 27725 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x5265766974616e in tid 27725 (mqt_js), pid 27682 (.awesomeproject)
02-21 16:23:22.620 27729 27729 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
02-21 16:23:22.621 828 828 I /system/bin/tombstoned: received crash request for pid 27725
02-21 16:23:22.622 27729 27729 I crash_dump64: performing dump of process 27682 (target tid = 27725)
02-21 16:23:22.635 27729 27729 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-21 16:23:22.636 27729 27729 F DEBUG : Build fingerprint: 'google/marlin/marlin:9/PQ2A.190205.003/5180536:user/release-keys'
02-21 16:23:22.636 27729 27729 F DEBUG : Revision: '0'
02-21 16:23:22.636 27729 27729 F DEBUG : ABI: 'arm64'
02-21 16:23:22.636 27729 27729 F DEBUG : pid: 27682, tid: 27725, name: mqt_js >>> com.awesomeproject <<<
02-21 16:23:22.636 27729 27729 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x5265766974616e
02-21 16:23:22.636 27729 27729 F DEBUG : x0 655265766974616e x1 000000704020a070 x2 000000704020a0a0 x3 0000000000000000
02-21 16:23:22.636 27729 27729 F DEBUG : x4 000000703ebfabc8 x5 000000703ebfade8 x6 000000703ebfad48 x7 000000703ebfad48
02-21 16:23:22.636 27729 27729 F DEBUG : x8 655265766974616e x9 f2a6936fa0f32568 x10 000000704020a0a0 x11 000000704001a3a5
02-21 16:23:22.636 27729 27729 F DEBUG : x12 000000704001b7d1 x13 000000704001b855 x14 0000000000000000 x15 000000703ebfabc8
02-21 16:23:22.636 27729 27729 F DEBUG : x16 000000704021d6d0 x17 0000007040014f88 x18 000000703ebfa6ed x19 0000007050e3a2a0
02-21 16:23:22.636 27729 27729 F DEBUG : x20 000000703ebfd588 x21 000000703ebfaef0 x22 000000704001ef22 x23 000000703ebfd588
02-21 16:23:22.636 27729 27729 F DEBUG : x24 000000703ebfb4b8 x25 000000703ebfd588 x26 000000703ebfd588 x27 0000000000000001
02-21 16:23:22.636 27729 27729 F DEBUG : x28 000000703ebfb6f0 x29 000000703ebfab70
02-21 16:23:22.636 27729 27729 F DEBUG : sp 000000703ebfab00 lr 000000703fb17eb0 pc 0000007040014fa8
02-21 16:23:22.668 27729 27729 F DEBUG :
02-21 16:23:22.668 27729 27729 F DEBUG : backtrace:
02-21 16:23:22.668 27729 27729 F DEBUG : #00 pc 000000000060ffa8 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes.so (__dynamic_cast+32)
02-21 16:23:22.668 27729 27729 F DEBUG : #01 pc 0000000000112eac /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes.so
02-21 16:23:22.668 27729 27729 F DEBUG : #2 pc 00000000001040b4 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes.so
02-21 16:23:22.668 27729 27729 F DEBUG : #3 pc 0000000000026134 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes-executor.so (void facebook::jsi::Object::setPropertyfacebook::jsi::Function(facebook::jsi::Runtime&, char const*, facebook::jsi::Function&&)+84)
02-21 16:23:22.668 27729 27729 F DEBUG : #4 pc 00000000000fd454 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes.so
02-21 16:23:22.668 27729 27729 F DEBUG : #5 pc 00000000000fce40 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes.so (facebook::hermes::makeHermesRuntime(hermes::vm::RuntimeConfig const&, bool)+284)
02-21 16:23:22.668 27729 27729 F DEBUG : #06 pc 000000000001c2d0 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes-executor.so (facebook::react::HermesExecutorFactory::createJSExecutor(std::__ndk1::shared_ptrfacebook::react::ExecutorDelegate, std::__ndk1::shared_ptrfacebook::react::MessageQueueThread)+68)
02-21 16:23:22.668 27729 27729 F DEBUG : #07 pc 00000000000a3bdc /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so (facebook::react::NativeToJsBridge::NativeToJsBridge(facebook::react::JSExecutorFactory*, std::__ndk1::shared_ptrfacebook::react::ModuleRegistry, std::__ndk1::shared_ptrfacebook::react::MessageQueueThread, std::__ndk1::shared_ptrfacebook::react::InstanceCallback)+252)
02-21 16:23:22.668 27729 27729 F DEBUG : #08 pc 000000000009b8f8 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so
02-21 16:23:22.668 27729 27729 F DEBUG : #9 pc 0000000000065b38 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so
02-21 16:23:22.668 27729 27729 F DEBUG : #10 pc 0000000000063a9c /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so
02-21 16:23:22.668 27729 27729 F DEBUG : #11 pc 0000000000059198 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32)
02-21 16:23:22.668 27729 27729 F DEBUG : #12 pc 0000000000059114 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+56)
02-21 16:23:22.668 27729 27729 F DEBUG : #13 pc 00000000005693e0 /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
02-21 16:23:22.669 27729 27729 F DEBUG : #14 pc 0000000000560388 /system/lib64/libart.so (art_quick_invoke_stub+584)
02-21 16:23:22.669 27729 27729 F DEBUG : #15 pc 00000000000cf6b8 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
02-21 16:23:22.669 27729 27729 F DEBUG : #16 pc 0000000000282afc /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
02-21 16:23:22.669 27729 27729 F DEBUG : #17 pc 000000000027cbac /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+960)
02-21 16:23:22.669 27729 27729 F DEBUG : #18 pc 0000000000530a50 /system/lib64/libart.so (MterpInvokeInterface+1376)
02-21 16:23:22.669 27729 27729 F DEBUG : #19 pc 0000000000552b94 /system/lib64/libart.so (ExecuteMterpImpl+14740)
02-21 16:23:22.669 27729 27729 F DEBUG : #20 pc 0000000000c47dda /system/framework/boot-framework.vdex (android.os.Handler.handleCallback+4)
02-21 16:23:22.669 27729 27729 F DEBUG : #21 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.669 27729 27729 F DEBUG : #22 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-21 16:23:22.669 27729 27729 F DEBUG : #23 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-21 16:23:22.669 27729 27729 F DEBUG : #24 pc 0000000000530fc4 /system/lib64/libart.so (MterpInvokeStatic+200)
02-21 16:23:22.669 27729 27729 F DEBUG : #25 pc 0000000000552b14 /system/lib64/libart.so (ExecuteMterpImpl+14612)
02-21 16:23:22.669 27729 27729 F DEBUG : #26 pc 0000000000ae5538 /system/framework/boot-framework.vdex (android.os.Handler.dispatchMessage+8)
02-21 16:23:22.669 27729 27729 F DEBUG : #27 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.669 27729 27729 F DEBUG : #28 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-21 16:23:22.669 27729 27729 F DEBUG : #29 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-21 16:23:22.669 27729 27729 F DEBUG : #30 pc 000000000053017c /system/lib64/libart.so (MterpInvokeSuper+1396)
02-21 16:23:22.669 27729 27729 F DEBUG : #31 pc 0000000000552a14 /system/lib64/libart.so (ExecuteMterpImpl+14356)
02-21 16:23:22.669 27729 27729 F DEBUG : #32 pc 00000000001b9320 /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/base.apk (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage)
02-21 16:23:22.669 27729 27729 F DEBUG : #33 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.669 27729 27729 F DEBUG : #34 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-21 16:23:22.669 27729 27729 F DEBUG : #35 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-21 16:23:22.669 27729 27729 F DEBUG : #36 pc 000000000052fafc /system/lib64/libart.so (MterpInvokeVirtual+576)
02-21 16:23:22.669 27729 27729 F DEBUG : #37 pc 0000000000552994 /system/lib64/libart.so (ExecuteMterpImpl+14228)
02-21 16:23:22.669 27729 27729 F DEBUG : #38 pc 0000000000aec648 /system/framework/boot-framework.vdex (android.os.Looper.loop+404)
02-21 16:23:22.669 27729 27729 F DEBUG : #39 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.669 27729 27729 F DEBUG : #40 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-21 16:23:22.669 27729 27729 F DEBUG : #41 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-21 16:23:22.669 27729 27729 F DEBUG : #42 pc 0000000000530fc4 /system/lib64/libart.so (MterpInvokeStatic+200)
02-21 16:23:22.669 27729 27729 F DEBUG : #43 pc 0000000000552b14 /system/lib64/libart.so (ExecuteMterpImpl+14612)
02-21 16:23:22.669 27729 27729 F DEBUG : #44 pc 00000000001b94ae /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/base.apk (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
02-21 16:23:22.669 27729 27729 F DEBUG : #45 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.670 27729 27729 F DEBUG : #46 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-21 16:23:22.670 27729 27729 F DEBUG : #47 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-21 16:23:22.670 27729 27729 F DEBUG : #48 pc 0000000000530a50 /system/lib64/libart.so (MterpInvokeInterface+1376)
02-21 16:23:22.670 27729 27729 F DEBUG : #49 pc 0000000000552b94 /system/lib64/libart.so (ExecuteMterpImpl+14740)
02-21 16:23:22.670 27729 27729 F DEBUG : #50 pc 00000000000ca806 /system/framework/boot.vdex (java.lang.Thread.run+12)
02-21 16:23:22.670 27729 27729 F DEBUG : #51 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.670 27729 27729 F DEBUG : #52 pc 00000000005202c4 /system/lib64/libart.so (artQuickToInterpreterBridge+944)
02-21 16:23:22.670 27729 27729 F DEBUG : #53 pc 00000000005694fc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
02-21 16:23:22.670 27729 27729 F DEBUG : #54 pc 0000000000560388 /system/lib64/libart.so (art_quick_invoke_stub+584)
02-21 16:23:22.670 27729 27729 F DEBUG : #55 pc 00000000000cf6b8 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
02-21 16:23:22.670 27729 27729 F DEBUG : #56 pc 00000000004661e4 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
02-21 16:23:22.670 27729 27729 F DEBUG : #57 pc 00000000004672e8 /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
02-21 16:23:22.670 27729 27729 F DEBUG : #58 pc 00000000004926a0 /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1116)
02-21 16:23:22.670 27729 27729 F DEBUG : #59 pc 0000000000084840 /system/lib64/libc.so (__pthread_start(void*)+36)
02-21 16:23:22.670 27729 27729 F DEBUG : #60 pc 0000000000023574 /system/lib64/libc.so (__start_thread+68)
02-21 16:23:23.349 828 828 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_02
02-21 16:23:23.362 920 27732 W ActivityManager: Force finishing activity com.awesomeproject/.MainActivity
02-21 16:23:23.364 920 981 I BootReceiver: Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
02-21 16:23:23.373 920 27732 W ActivityManager: Exception thrown during pause
02-21 16:23:23.373 920 27732 W ActivityManager: android.os.DeadObjectException
02-21 16:23:23.373 920 27732 W ActivityManager: at android.os.BinderProxy.transactNative(Native Method)
02-21 16:23:23.373 920 27732 W ActivityManager: at android.os.BinderProxy.transact(Binder.java:1127)
02-21 16:23:23.373 920 27732 W ActivityManager: at android.app.IApplicationThread$Stub$Proxy.scheduleTransaction(IApplicationThread.java:1777)
02-21 16:23:23.373 920 27732 W ActivityManager: at android.app.servertransaction.ClientTransaction.schedule(ClientTransaction.java:129)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ClientLifecycleManager.scheduleTransaction(ClientLifecycleManager.java:47)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ClientLifecycleManager.scheduleTransaction(ClientLifecycleManager.java:69)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1460)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3745)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3687)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityStack.finishTopCrashedActivityLocked(ActivityStack.java:3570)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityStackSupervisor.finishTopCrashedActivitiesLocked(ActivityStackSupervisor.java:2259)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.AppErrors.handleAppCrashLocked(AppErrors.java:748)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.AppErrors.makeAppCrashingLocked(AppErrors.java:580)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.AppErrors.crashApplicationInner(AppErrors.java:447)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.AppErrors.crashApplication(AppErrors.java:392)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:15480)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:85)
02-21 16:23:23.374 920 1408 W InputDispatcher: channel 'dd5ea3e com.awesomeproject/com.awesomeproject.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
02-21 16:23:23.374 920 1408 E InputDispatcher: channel 'dd5ea3e com.awesomeproject/com.awesomeproject.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
02-21 16:23:23.374 920 5547 I WindowManager: WIN DEATH: Window{dd5ea3e u0 com.awesomeproject/com.awesomeproject.MainActivity}
02-21 16:23:23.374 920 5547 W InputDispatcher: Attempted to unregister already unregistered input channel 'dd5ea3e com.awesomeproject/com.awesomeproject.MainActivity (server)'
02-21 16:23:23.375 664 664 I Zygote : Process 27682 exited due to signal (11)
02-21 16:23:23.384 694 694 E lowmemorykiller: Error opening /proc/27682/oom_score_adj; errno=2
02-21 16:23:23.399 920 1680 I ActivityManager: Process com.awesomeproject (pid 27682) has died: vis +99TOP
02-21 16:23:23.400 920 958 W libprocessgroup: kill(-27682, 9) failed: No such process
02-21 16:23:23.412 494 854 W SurfaceFlinger: Attempting to set client state on removed layer: com.awesomeproject/com.awesomeproject.MainActivity#0
02-21 16:23:23.412 494 854 W SurfaceFlinger: Attempting to destroy on removed layer: com.awesomeproject/com.awesomeproject.MainActivity#0
02-21 16:23:23.414 494 854 W SurfaceFlinger: Attempting to destroy on removed layer: AppWindowToken{79c358d token=Token{b263624 ActivityRecord{e420eb7 u0 com.awesomeproject/.MainActivity t412}}}#0
02-21 16:23:23.428 920 989 W ActivityManager: setHasOverlayUi called on unknown pid: 27682
02-21 16:23:23.429 920 955 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
02-21 16:23:23.429 920 955 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
02-21 16:23:23.437 494 854 D SurfaceFlinger: duplicate layer name: changing com.google.android.apps.nexuslauncher/c

Precompiled hermes binaries?

Hey y'all,

Congrats on open-sourcing Hermes!

Are you planning on providing precompiled hermes binaries for various platforms? If you are, we'd be happy to add hermes support to jsvu. This would make it easier for folks to casually play around with a recent hermes binary without having to clone + sync + build from source every time.

If not, that's cool too. Figured I'd ask :)

Cheers,
Mathias

Compile the Hermes debug version without asserts

Duplicating the offline discussion: the Hermes "debug" version is used for RN development and RN debugging, not for debugging Hermes. So, it should be compiled with NDEBUG, to improve performance in the common case.

React-Native app is more faster on remote debugging

I did start a app with rn 0.60.3 and enabled Hermes.
I did make a simple app using react-navigation with only 3 screens with two Buttons in all screens.
When I use JS Dev Mode with true or false my app is slow, and enable js minify is still slow.
But when I enable Remote JS Debugging the app is very faster, like a native only.

It's anything with the remote debugging for improve performance?

[CRASH] Android 6.0.1 crashes with java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so

I uploaded a release build to Google Play and they ran automated tests leading to a lot of crashes coming in with the following stack trace:

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName + 738(SoLoader.java:738)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName + 591(SoLoader.java:591)
       at com.facebook.soloader.SoLoader.loadLibrary + 529(SoLoader.java:529)
       at com.facebook.soloader.SoLoader.loadLibrary + 484(SoLoader.java:484)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit> + 20(HermesExecutor.java:20)
       at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create + 27(HermesExecutorFactory.java:27)
       at com.facebook.react.ReactInstanceManager$5.run + 949(ReactInstanceManager.java:949)
       at java.lang.Thread.run + 818(Thread.java:818)

Affected OS is always 6.0.1. Interestingly Hermes is not even enabled in my build.gradle:

project.ext.react = [
  entryFile: "index.android.js",
  enableHermes: false,  // clean and rebuild if changing
  bundleInDebug: false,
  bundleInRelease: true,
  root: "../../",
 ]
...
def enableHermes = project.ext.react.get("enableHermes", false);
...
// Hermes config
    if (enableHermes) {
      def hermesPath = "../../node_modules/hermesvm/android/";
      debugImplementation files(hermesPath + "hermes-debug.aar")
      releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
      implementation jscFlavor
    }

Setup:

System:
    OS: macOS 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 82.07 MB / 32.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 10.16.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    Android SDK:
      API Levels: 23, 26, 27, 28
      Build Tools: 23.0.1, 25.0.0, 26.0.3, 27.0.3, 28.0.1, 28.0.2, 28.0.3
      System Images: android-24 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: ^16.8.6 => 16.8.6
    react-native: ^0.60.4 => 0.60.4
  npmGlobalPackages:
    eslint-plugin-react-native: 3.5.0
    react-native-cli: 2.0.1
    react-native-git-upgrade: 0.2.7

Crash in RN debug mode

Appreciate this report probably isn't too helpful as I don't have a repro I can share, but I wanted to ask what's the best way to debug an issue like this?

Crash happens in debug mode, React Native 0.60.3, Samsung Galaxy S9+. Context-wise, I suspect this is happening when loading 'db' files for react-native-local-mongodb (~15 files, tens to hundreds of lines per file, each containing a stringified JSON object).

Aside from that, Hermes seems significantly slower than JSC in debug mode (maybe 3 or 4x slower, stuff like switching routes with react-navigation takes a few seconds), is that expected at this stage? Could that be to do with the amount of console.log-ing we do, I know that's a big issue with JSC on slower devices.

In release mode, the app startup is significantly faster with Hermes and general performance seems similar to JSC so it would definitely be nice to make the switch in future 👌

07-12 14:10:30.354 19220 21012 F libc    : /Users/willholen/intern/hermes/include/hermes/VM/HandleRootOwner.h:413: hermes::vm::PinnedHermesValue *hermes::vm::GCScope::newHandle(hermes::vm::HermesValue): assertion "getHandleCountDbg() < handlesLimit_ && "Too many handles allocated in GCScope"" failed
07-12 14:10:30.357 19220 21012 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 21012 (mqt_js), pid 19220 ((APP).debug)
07-12 14:10:30.596 21060 21060 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-12 14:10:30.597 21060 21060 F DEBUG   : Build fingerprint: 'samsung/star2ltexx/star2lte:9/PPR1.180610.011/G965FXXU5CSF2:user/release-keys'
07-12 14:10:30.597 21060 21060 F DEBUG   : Revision: '26'
07-12 14:10:30.597 21060 21060 F DEBUG   : ABI: 'arm64'
07-12 14:10:30.597 21060 21060 F DEBUG   : pid: 19220, tid: 21012, name: mqt_js  >>> (APP).debug <<<
07-12 14:10:30.597 21060 21060 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
07-12 14:10:30.597 21060 21060 F DEBUG   : Abort message: '/Users/willholen/intern/hermes/include/hermes/VM/HandleRootOwner.h:413: hermes::vm::PinnedHermesValue *hermes::vm::GCScope::newHandle(hermes::vm::HermesValue): assertion "getHandleCountDbg() < handlesLimit_ && "Too many handles allocated in GCScope"" failed'
07-12 14:10:30.597 21060 21060 F DEBUG   :     x0  0000000000000000  x1  0000000000005214  x2  0000000000000006  x3  0000000000000008
07-12 14:10:30.597 21060 21060 F DEBUG   :     x4  0080808080808080  x5  0080808080808080  x6  0080808080808080  x7  0000000000000010
07-12 14:10:30.597 21060 21060 F DEBUG   :     x8  0000000000000083  x9  0000007238ff9890  x10 fffffff87ffffbdf  x11 0000000000000001
07-12 14:10:30.597 21060 21060 F DEBUG   :     x12 0000000000000008  x13 000000005d2886c6  x14 0014e1bd43837d80  x15 000043807fb06bb6
07-12 14:10:30.597 21060 21060 F DEBUG   :     x16 00000072390302b0  x17 0000007238f6f958  x18 0000000000000000  x19 0000000000004b14
07-12 14:10:30.597 21060 21060 F DEBUG   :     x20 0000000000005214  x21 0000000000000083  x22 000000718998e588  x23 000000716f942800
07-12 14:10:30.597 21060 21060 F DEBUG   :     x24 00000071899885e8  x25 0000000000000200  x26 00000071899885e8  x27 fffb800000000000
07-12 14:10:30.597 21060 21060 F DEBUG   :     x28 0000007189988628  x29 0000007189988400
07-12 14:10:30.597 21060 21060 F DEBUG   :     sp  00000071899883c0  lr  0000007238f62da0  pc  0000007238f62dcc
07-12 14:10:30.899 21060 21060 F DEBUG   : 
07-12 14:10:30.899 21060 21060 F DEBUG   : backtrace:
07-12 14:10:30.899 21060 21060 F DEBUG   :     #00 pc 0000000000021dcc  /system/lib64/libc.so (abort+124)
07-12 14:10:30.899 21060 21060 F DEBUG   :     #01 pc 0000000000022544  /system/lib64/libc.so (__assert2+52)
07-12 14:10:30.899 21060 21060 F DEBUG   :     #02 pc 00000000000a4bb8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #03 pc 00000000000a43c0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #04 pc 00000000000a1524  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #05 pc 00000000000a10a8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #06 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #07 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #08 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #09 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #10 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #11 pc 00000000000c406c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #12 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #13 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #14 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #15 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #16 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #17 pc 00000000000c406c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #18 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #19 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #20 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #21 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #22 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #23 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #24 pc 000000000012203c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #25 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #26 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #27 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #28 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #29 pc 000000000012203c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #30 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #31 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #32 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #33 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #34 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #35 pc 000000000002b5c0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so (facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)+496)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #36 pc 00000000000291f0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes-executor-debug.so (_ZNK8facebook3jsi8Function4callIJRKdNS0_5ValueEEEES5_RNS0_7RuntimeEDpOT_+120)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #37 pc 0000000000029030  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes-executor-debug.so (facebook::react::JSIExecutor::invokeCallback(double, folly::dynamic const&)+164)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #38 pc 00000000000a7dc0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #39 pc 00000000000a8de0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #40 pc 000000000006b8bc  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #41 pc 000000000005ac74  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #42 pc 000000000005abf0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+56)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #43 pc 000000000056a9e0  /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #44 pc 00000000000267e0  /dev/ashmem/dalvik-jit-code-cache_19220_19220 (deleted) (android.os.Handler.handleCallback+64)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #45 pc 0000000000027dcc  /dev/ashmem/dalvik-jit-code-cache_19220_19220 (deleted) (android.os.Handler.dispatchMessage+60)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #46 pc 000000000003f3d4  /dev/ashmem/dalvik-jit-code-cache_19220_19220 (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage+52)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #47 pc 0000000000105d80  /dev/ashmem/dalvik-jit-code-cache_19220_19220 (deleted) (android.os.Looper.loop+1200)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #48 pc 0000000000561c4c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #49 pc 00000000000cff60  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #50 pc 00000000002862f8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #51 pc 00000000002802b4  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #52 pc 0000000000532154  /system/lib64/libart.so (MterpInvokeStatic+204)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #53 pc 0000000000554194  /system/lib64/libart.so (ExecuteMterpImpl+14612)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #54 pc 000000000033d836  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/base.apk_19220_19220 (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #55 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #56 pc 000000000025f930  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #57 pc 0000000000280298  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #58 pc 0000000000531bc8  /system/lib64/libart.so (MterpInvokeInterface+1392)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #59 pc 0000000000554214  /system/lib64/libart.so (ExecuteMterpImpl+14740)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #60 pc 00000000000ca90a  /system/framework/boot.vdex (java.lang.Thread.run+12)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #61 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #62 pc 0000000000521390  /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #63 pc 000000000056aafc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #64 pc 0000000000561988  /system/lib64/libart.so (art_quick_invoke_stub+584)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #65 pc 00000000000cff40  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
07-12 14:10:30.901 21060 21060 F DEBUG   :     #66 pc 0000000000467d60  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
07-12 14:10:30.901 21060 21060 F DEBUG   :     #67 pc 0000000000468e28  /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
07-12 14:10:30.901 21060 21060 F DEBUG   :     #68 pc 00000000004946b0  /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1120)
07-12 14:10:30.901 21060 21060 F DEBUG   :     #69 pc 0000000000084df8  /system/lib64/libc.so (__pthread_start(void*)+208)
07-12 14:10:30.901 21060 21060 F DEBUG   :     #70 pc 0000000000023ac4  /system/lib64/libc.so (__start_thread+68)
07-12 14:11:00.293 21179 21284 F libc    : /Users/willholen/intern/hermes/include/hermes/VM/HandleRootOwner.h:413: hermes::vm::PinnedHermesValue *hermes::vm::GCScope::newHandle(hermes::vm::HermesValue): assertion "getHandleCountDbg() < handlesLimit_ && "Too many handles allocated in GCScope"" failed
07-12 14:11:00.293 21179 21284 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 21284 (mqt_js), pid 21179 ((APP).debug)
07-12 14:11:00.498 21352 21352 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-12 14:11:00.498 21352 21352 F DEBUG   : Build fingerprint: 'samsung/star2ltexx/star2lte:9/PPR1.180610.011/G965FXXU5CSF2:user/release-keys'
07-12 14:11:00.498 21352 21352 F DEBUG   : Revision: '26'
07-12 14:11:00.499 21352 21352 F DEBUG   : ABI: 'arm64'
07-12 14:11:00.499 21352 21352 F DEBUG   : pid: 21179, tid: 21284, name: mqt_js  >>> (APP).debug <<<
07-12 14:11:00.499 21352 21352 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
07-12 14:11:00.499 21352 21352 F DEBUG   : Abort message: '/Users/willholen/intern/hermes/include/hermes/VM/HandleRootOwner.h:413: hermes::vm::PinnedHermesValue *hermes::vm::GCScope::newHandle(hermes::vm::HermesValue): assertion "getHandleCountDbg() < handlesLimit_ && "Too many handles allocated in GCScope"" failed'
07-12 14:11:00.499 21352 21352 F DEBUG   :     x0  0000000000000000  x1  0000000000005324  x2  0000000000000006  x3  0000000000000008
07-12 14:11:00.499 21352 21352 F DEBUG   :     x4  0080808080808080  x5  0080808080808080  x6  0080808080808080  x7  0000000000000010
07-12 14:11:00.499 21352 21352 F DEBUG   :     x8  0000000000000083  x9  0000007238ff9890  x10 fffffff87ffffbdf  x11 0000000000000001
07-12 14:11:00.499 21352 21352 F DEBUG   :     x12 0000000000000008  x13 000000005d2886e4  x14 00114e362e195000  x15 00002af6f2c46852
07-12 14:11:00.499 21352 21352 F DEBUG   :     x16 00000072390302b0  x17 0000007238f6f958  x18 0000000000000000  x19 00000000000052bb
07-12 14:11:00.499 21352 21352 F DEBUG   :     x20 0000000000005324  x21 0000000000000083  x22 0000007199217588  x23 00000071a009a800
07-12 14:11:00.499 21352 21352 F DEBUG   :     x24 0000007199210f18  x25 0000000000000200  x26 0000007199210f18  x27 fffb800000000000
07-12 14:11:00.499 21352 21352 F DEBUG   :     x28 0000007199210f58  x29 0000007199210d30
07-12 14:11:00.499 21352 21352 F DEBUG   :     sp  0000007199210cf0  lr  0000007238f62da0  pc  0000007238f62dcc
07-12 14:11:00.549 21352 21352 F DEBUG   : 
07-12 14:11:00.549 21352 21352 F DEBUG   : backtrace:
07-12 14:11:00.549 21352 21352 F DEBUG   :     #00 pc 0000000000021dcc  /system/lib64/libc.so (abort+124)
07-12 14:11:00.549 21352 21352 F DEBUG   :     #01 pc 0000000000022544  /system/lib64/libc.so (__assert2+52)
07-12 14:11:00.549 21352 21352 F DEBUG   :     #02 pc 00000000000a4bb8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #03 pc 00000000000a43c0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #04 pc 00000000000a1524  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #05 pc 00000000000a10a8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #06 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #07 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #08 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #09 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #10 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #11 pc 00000000000c406c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #12 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #13 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #14 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #15 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #16 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #17 pc 00000000000c406c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #18 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #19 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #20 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #21 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #22 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #23 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #24 pc 000000000012203c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #25 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #26 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #27 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #28 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #29 pc 000000000012203c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #30 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #31 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #32 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #33 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #34 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #35 pc 000000000002b5c0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so (facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)+496)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #36 pc 00000000000291f0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes-executor-debug.so (_ZNK8facebook3jsi8Function4callIJRKdNS0_5ValueEEEES5_RNS0_7RuntimeEDpOT_+120)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #37 pc 0000000000029030  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes-executor-debug.so (facebook::react::JSIExecutor::invokeCallback(double, folly::dynamic const&)+164)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #38 pc 00000000000a7dc0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #39 pc 00000000000a8de0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #40 pc 000000000006b8bc  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #41 pc 000000000005ac74  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #42 pc 000000000005abf0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+56)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #43 pc 000000000056a9e0  /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #44 pc 000000000001f210  /dev/ashmem/dalvik-jit-code-cache_21179_21179 (deleted) (android.os.Handler.handleCallback+64)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #45 pc 000000000000f61c  /dev/ashmem/dalvik-jit-code-cache_21179_21179 (deleted) (android.os.Handler.dispatchMessage+60)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #46 pc 0000000000561988  /system/lib64/libart.so (art_quick_invoke_stub+584)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #47 pc 00000000000cff40  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #48 pc 00000000002862f8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #49 pc 00000000002802b4  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #50 pc 00000000005312e0  /system/lib64/libart.so (MterpInvokeSuper+1408)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #51 pc 0000000000554094  /system/lib64/libart.so (ExecuteMterpImpl+14356)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #52 pc 000000000033d6a8  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/base.apk_21179_21179 (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #53 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #54 pc 000000000025f930  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #55 pc 0000000000280298  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #56 pc 0000000000530c50  /system/lib64/libart.so (MterpInvokeVirtual+584)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #57 pc 0000000000554014  /system/lib64/libart.so (ExecuteMterpImpl+14228)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #58 pc 0000000000c5f2f6  /system/framework/boot-framework.vdex (android.os.Looper.loop+406)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #59 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #60 pc 000000000025f930  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #61 pc 0000000000280298  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #62 pc 0000000000532154  /system/lib64/libart.so (MterpInvokeStatic+204)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #63 pc 0000000000554194  /system/lib64/libart.so (ExecuteMterpImpl+14612)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #64 pc 000000000033d836  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/base.apk_21179_21179 (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #65 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #66 pc 000000000025f930  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #67 pc 0000000000280298  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #68 pc 0000000000531bc8  /system/lib64/libart.so (MterpInvokeInterface+1392)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #69 pc 0000000000554214  /system/lib64/libart.so (ExecuteMterpImpl+14740)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #70 pc 00000000000ca90a  /system/framework/boot.vdex (java.lang.Thread.run+12)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #71 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #72 pc 0000000000521390  /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #73 pc 000000000056aafc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #74 pc 0000000000561988  /system/lib64/libart.so (art_quick_invoke_stub+584)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #75 pc 00000000000cff40  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #76 pc 0000000000467d60  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #77 pc 0000000000468e28  /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #78 pc 00000000004946b0  /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1120)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #79 pc 0000000000084df8  /system/lib64/libc.so (__pthread_start(void*)+208)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #80 pc 0000000000023ac4  /system/lib64/libc.so (__start_thread+68)

expected a constructor, js engine: hermes

can not use decorators ?

import {connect} from 'react-redux';
@connect(
state=>state.user
)
class Shop extends Component {
render() {
return (


<HeaderView
headerTitle={'商城'}/>
Shop
<TouchableOpacity
onPress={()=>{
this.props.navigation && this.props.navigation.navigate('AuthStack')
}}>
退出登录呀



)
}
}

but

// export default connect(
// state => {
// console.log(state,'---')
// }
// )(Shop);

is no problem

Introduce explicit "commit" in OSCompat abstraction of virtual memory

To start, read the attached picture to understand how the basics of memory allocation works in POSIX and Windows.

The cause of the problem is the transition from Reserved to Committed. On POSIX, it is implied. As a result, in Hermes code, there isn't a call that explicitly does that.

A shortcut was taken in my initial Windows port:

  • oscompat::vm_allocate on Windows returns memory that has been Committed.
  • oscompat::vm_unused does nothing.

For context, the point of vm_unused is to free the physical memory (but not virtual address space), and so that it doesn't count against our RSS. (Please correct me if this understanding is incorrect.)

The goal of this issue is:

  • Add vm_commit (MEM_COMMIT on Windows, no-op on posix)
  • Change vm_allocate to reserve the memory without committing it (MEM_RESERVE on Windows, no change needed on posix)
  • Implement vm_unused with MEM_DECOMMIT on Windows.
  • Change relevant code that interacts with vm_* so that they invoke vm_commit before accessing the memory if vm_commit has not been invoked since the latest vm_allocate and vm_unused.

50932988_366403384141481_1486283032032706560_o

Tracked as T40416012 at Facebook.

Does not support sdk<=19

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: dlopen failed: cannot locate symbol "posix_fallocate" referenced by "libhermes.so"...
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java)
at com.facebook.hermes.reactexecutor.HermesExecutor.()
at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java)
at java.lang.Thread.run + 841(Thread.java:841)

Build and publish across architectures using VcPkg on Windows

This will enable seamless consumption of Hermes on Windows. Post this change, a developer should be able to "vcpk install Hermes:arm-windows" for e.g. and refer to Hermes headers and libraries from visual studio.

The sub tasks of this work item are,

  1. Enable building all platforms on Windows host machine. We target the following platforms at least,
    a. x86/x86_64
    b. cross compile to ARM/ARM64.
  2. VcPkg port file.

Does hermes make some specific optimized for React.js or related js framework?

Hi,
I am trying to test the hermes to my android application but do not use RN.I added the related hermes
librarys and head files to my project and then after compiling and linking.It works in my application.
Previously I use the JavascriptCode as my js engine in my project and I make my test code like this:

            //const char *source = GetJSCode("/sdcard/vue.min.js", "");
            //const char *source = GetJSCode("/sdcard/react-dom.production.min.js", "");
            const char *source = GetJSCode("/sdcard/react.min.js", "");
            //const char *source = GetJSCode("/sdcard/af-appx.worker.min.js", "");
            {
                    //test js use Hermes
                    LOGD("Hermes Test case 2! source=%s",source);
                    std::string hermesJs(source);
                    auto jsiBuffer = std::make_shared<facebook::jsi::StringBuffer>(hermesJs);
                    auto runtime = facebook::hermes::makeHermesRuntime();
                    double start1 = now();
                    auto bytecode = runtime->prepareJavaScript(jsiBuffer, "whb test");
                    LOGD("Hermes  ByteCode Gen cost=%f!",now()-start1);
                    double start2 = now();
                    runtime->evaluatePreparedJavaScript(bytecode);
                    LOGD("Hermes evaluate bytecode cost=%f",now()-start2);
            }
            //test js use JSC
            {
                  std::string js(source);
                  std::string exeption;
                  ...
                  double start3= now();
                  context->ExecuteJavaScript(js, &exeption);
                  LOGD("JSC evaluate script cost=%f",now()-start3);
            }   

First,I try to use the react.min.js to feed the hermes and JSC,the data is below and looks good:

c++: Hermes  ByteCode Gen cost=12.038574!
c++: Hermes evaluate bytecode cost=0.323975
c++: JSC evaluate script cost=3.677734

then,I try to use the vue.js to feed the hermes and jsc,the data is below:

c++: Hermes  ByteCode Gen cost=6.109131!
c++: Hermes evaluate bytecode cost=40.747314
c++: JSC evaluate script cost=18.967041

The JSC is fast a lot than the hermes even JSC use the pure javascript string and hermes use the bytecode .

So,I wanna to know,does the hermes make some specific optimize for react related javascript?and worried about whether other javascript can benfit form hermes.

YellowBoxInspector - TypeError: Cannot read property 'indexOf' of null

Environment: Latest react-native generated by react-native init TestProject --template typescript, run in an Android emulator.

It can be triggered by calling console.warn() and then touching on the yellow warning box.

Emulator specs:

Name: Pixel_2_API_28

CPU/ABI: Google Play Intel Atom (x86)

Path: /Users/andre/.android/avd/Pixel_2_API_28.avd

Target: google_apis_playstore [Google Play] (API level 28)

Skin: pixel_2

SD Card: 512M

fastboot.chosenSnapshotFile: 

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: pixel_2

hw.lcd.width: 1080

hw.initialOrientation: Portrait

image.androidVersion.api: 28

tag.id: google_apis_playstore

hw.mainKeys: no

hw.camera.front: emulated

avd.ini.displayname: Pixel 2 API 28

hw.gpu.mode: auto

hw.ramSize: 1536

PlayStore.enabled: true

fastboot.forceColdBoot: no

hw.cpu.ncore: 4

hw.keyboard: yes

hw.sensors.proximity: yes

hw.dPad: no

hw.lcd.height: 1920

vm.heapSize: 256

skin.dynamic: yes

hw.device.manufacturer: Google

hw.gps: yes

hw.audioInput: yes

image.sysdir.1: system-images/android-28/google_apis_playstore/x86/

showDeviceFrame: yes

hw.camera.back: virtualscene

AvdId: Pixel_2_API_28

hw.lcd.density: 420

hw.arc: false

hw.device.hash2: MD5:55acbc835978f326788ed66a5cd4c9a7

fastboot.forceChosenSnapshotBoot: no

fastboot.forceFastBoot: yes

hw.trackBall: no

hw.battery: yes

hw.sdCard: yes

tag.display: Google Play

runtime.network.latency: none

disk.dataPartition.size: 6442450944

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes

wrapping of global decls (like isatty) incompatible with Dinkumware headers

in gtest-port.h, they wrap xplat functions such as atty like this:

inline int IsATTY(int fd) { return isatty(fd); }

in Hermes' OSCompat.h, the same name+case is used, so :: has to be applied to make the namespace explicit.

inline int isatty(int fd) {
  return ::isatty(fd);
}

The Dinkumware-based headers on my platform don't explcitly add isatty() and friends to the C++ global namespace, so they can't be accessed with the preceding ::. Removing that explciit namespace makes it a recursive function call, which isn't correct. This kind of portability issue is presumably why the gtest maintainers decided to make the wrappers a different case.

I can submit a PR for isatty(), which is the only problem I'm having thus far, that changes the wrapper name to be cased like gtest does. Just let me know what case-style to use (isATTY vs IsATTY vs isAtty vs IsAtty, etc).

Urgent warnings when running ninja against source

Linking CXX executable bin/hermes
ld: warning: URGENT: building for OSX, but linking against dylib (/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libicucore.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libcurses.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libm.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libc++.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libSystem.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libz.dylib) built for (unknown). Note: This will be an error in the future.

Running ninja seems to trigger the above warnings. Not sure if this matters.

OS version: macOS Mojave 10.14.6
Ninja version: 1.9.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.