You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to call the Class 'IdentifierTable' method StringView getStringViewForDev(Runtime &runtime, SymbolID id) const;
I pass the SymbolID to the function StringView getStringViewForDev(Runtime &runtime, SymbolID id) const, the I got the crash
assert(topGCScope_ && "no active GCScope");
this is the crash stack trace:
#0 0x00000001828a6a60 in __pthread_kill ()
#1 0x0000000101ababe8 in pthread_kill ()
#2 0x00000001827eba30 in abort ()
#3 0x00000001827ead20 in __assert_rtn ()
#4 0x000000010003850c in hermes::vm::HandleRootOwner::newPinnedHermesValue(hermes::vm::HermesValue) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/include/hermes/VM/HandleRootOwner-inline.h:102
#5 0x0000000100038464 in hermes::vm::HandleBase::HandleBase(hermes::vm::HandleRootOwner&, hermes::vm::HermesValue) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/include/hermes/VM/Handle-inline.h:37
#6 0x000000010004e24c in hermes::vm::Handle<hermes::vm::StringPrimitive>::Handle(hermes::vm::HandleRootOwner&, hermes::vm::StringPrimitive*) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/include/hermes/VM/Handle.h:317
#7 0x000000010001f4bc in hermes::vm::Handle<hermes::vm::StringPrimitive>::Handle(hermes::vm::HandleRootOwner&, hermes::vm::StringPrimitive*) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/include/hermes/VM/Handle.h:317
#8 0x0000000100125b40 in hermes::vm::IdentifierTable::getStringView(hermes::vm::Runtime&, hermes::vm::SymbolID) const at /Users/victor.chi/github_hermes_workspace/shopee-hermes/lib/VM/IdentifierTable.cpp:118
#9 0x0000000100125fa0 in hermes::vm::IdentifierTable::getStringViewForDev(hermes::vm::Runtime&, hermes::vm::SymbolID) const at /Users/victor.chi/github_hermes_workspace/shopee-hermes/lib/VM/IdentifierTable.cpp:144
#10 0x00000001000d0d34 in hermes::vm::getCallFrameInfo(hermes::vm::CodeBlock const*, hermes::vm::Runtime&, hermes::inst::Inst const*) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/lib/VM/GCBase.cpp:492
#11 0x00000001000e7f08 in hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&)::$_1::operator()(hermes::vm::GCCell*) const at /Users/victor.chi/github_hermes_workspace/shopee-hermes/lib/VM/GCBase.cpp:609
#12 0x00000001000e7d58 in decltype(std::declval<hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&)::$_1&>()(std::declval<hermes::vm::GCCell*>())) std::__1::__invoke[abi:v160006]<hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&)::$_1&, hermes::vm::GCCell*>(hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&)::$_1&, hermes::vm::GCCell*&&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__functional/invoke.h:394
#13 0x00000001000e7d04 in void std::__1::__invoke_void_return_wrapper<void, true>::__call<hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&)::$_1&, hermes::vm::GCCell*>(hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&)::$_1&, hermes::vm::GCCell*&&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__functional/invoke.h:487
#14 0x00000001000e7cd8 in std::__1::__function::__alloc_func<hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&)::$_1, std::__1::allocator<hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&)::$_1>, void (hermes::vm::GCCell*)>::operator()[abi:v160006](hermes::vm::GCCell*&&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__functional/function.h:185
#15 0x00000001000e6d74 in std::__1::__function::__func<hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&)::$_1, std::__1::allocator<hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&)::$_1>, void (hermes::vm::GCCell*)>::operator()(hermes::vm::GCCell*&&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__functional/function.h:356
#16 0x000000010038fff8 in std::__1::__function::__value_func<void (hermes::vm::GCCell*)>::operator()[abi:v160006](hermes::vm::GCCell*&&) const at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__functional/function.h:510
#17 0x000000010038ffa0 in std::__1::function<void (hermes::vm::GCCell*)>::operator()(hermes::vm::GCCell*) const at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__functional/function.h:1156
#18 0x0000000100374800 in void hermes::vm::HadesGC::HeapSegment::forAllObjs<std::__1::function<void (hermes::vm::GCCell*)>>(std::__1::function<void (hermes::vm::GCCell*)>) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/lib/VM/gcs/HadesGC.cpp:199
#19 0x000000010036e74c in hermes::vm::HadesGC::forAllObjs(std::__1::function<void (hermes::vm::GCCell*)> const&) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/lib/VM/gcs/HadesGC.cpp:2142
#20 0x00000001000d102c in hermes::vm::GCBase::createSnapshot(hermes::vm::HadesGC&, llvh::raw_ostream&) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/lib/VM/GCBase.cpp:620
#21 0x000000010036e9dc in hermes::vm::HadesGC::createSnapshot(llvh::raw_ostream&) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/lib/VM/gcs/HadesGC.cpp:1383
#22 0x000000010002807c in facebook::hermes::HermesRuntimeImpl::createSnapshotToFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/API/hermes/hermes.cpp:486
May I know how to fix it, thanks a lot~
The text was updated successfully, but these errors were encountered:
So, to clarify, you are getting this assertion error when you call jsi::Instrumentation::createSnapShotToFile(). Which version of Hermes is this?
tmikov
changed the title
When I call the Class 'IdentifierTable' method StringView getStringViewForDev(Runtime &runtime, SymbolID id) const; I face the assert crash
jsi::Instrumentation::createSnapShotToFile() causes an assertion failure "no active GCScope"
Oct 15, 2024
tmikov
changed the title
jsi::Instrumentation::createSnapShotToFile() causes an assertion failure "no active GCScope"
createSnapShotToFile() assertion failure "no active GCScope"
Oct 15, 2024
@hopestar90 Have you modified the Hermes source that you are using? In your stack trace GCBase::createSnapshot appears to be calling:
0x00000001000d0d34 in hermes::vm::getCallFrameInfo(hermes::vm::CodeBlock const*, hermes::vm::Runtime&, hermes::inst::Inst const*) at /Users/victor.chi/github_hermes_workspace/shopee-hermes/lib/VM/GCBase.cpp:492
But I don't see any such function in rn/0.71-stable
When I try to call the Class 'IdentifierTable' method StringView getStringViewForDev(Runtime &runtime, SymbolID id) const;
I pass the SymbolID to the function StringView getStringViewForDev(Runtime &runtime, SymbolID id) const, the I got the crash
assert(topGCScope_ && "no active GCScope");
this is the crash stack trace:
May I know how to fix it, thanks a lot~
The text was updated successfully, but these errors were encountered: