-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGSEGV in libNativeScript.so on callback from java with console.log when displaying an object. #1366
Comments
Hi @Yermo, you can use a version of the libNativeScript.so with debug symbols. Unfortunately it's not as easy as adding a flag (but soon will be :) #1368). Currently to use the version with symbols included you need to manually edit the + adding nativescript runtime package dependency: nativescript-regular |
@vtrifonov thank you! That is exactly what I needed. |
I followed your instructions and verified that it did output the line as you indicated. I am testing on a physical Lenovo Tab 4 tablet running a Qualcomm Snapdragon 425 processor which is a 64 bit ARM processor. Unfortunately, this is not the same crash as before. From logcat (adb logcat -s DEBUG) I get the following crash report:
Using adb bugreport I get the tombstone file but using ndk-stack on that gives me a different report:
I suspect I am doing something wrong here.
I am attempting to get the source line causing the problem however I'm not sure which combination of addr2line and libNativeScript.so to use:
How do I tell which version of libNativeScript.so is actually being used? Which addr2line do I use in this context? Is there a way to tell what javascript line it's failing on? |
I have been unable to reproduce the garbage collection crash however the console.log is 100% reproducible in my code so I have changed the title of the issue. The java library I am using is a background geolocation library. It accepts an object as a delegate and returns a JSON object (https://stleary.github.io/JSON-java/org/json/JSONObject.html) representing a location. I am passing a nativescript object as the delegate. In that delegate I use the methods of the JSON object to construct a simply typescript object with number, boolean, and string fields, I then return that object to my code where the first thing I do is a console.log
It crashes on either the first or second call like this. I.e. I cannot display the location object in a console.log. It does not crash if I include a property in the string of a console.log message as in:
As a test I am returning an unchanging object:
Returning this object also causes it to crash. At this point I strongly suspect this is not an issue with my code but some kind of marshalling bug with console.log messages. My next test is to remove all location object dumps and see if the crash repeats. |
Hi, @Yermo :) Could you share a repo with the JS code in which you use the https://github.com/Yermo/background-geolocation-android library? |
@vmutafov I had hoped to create a small test case to demonstrate the problem. So far I have failed to come up with one. I've pushed my code to github here: https://github.com/Yermo/nativescript-background-geolocation-fbs Once this is reliable, my plan is to publish this to the NativeScript marketplace since the TransistorSoft plugin that I was using is being discontinued leaving NativeScript without a working background geolocation solution. Unfortunately, I am new to this whole toolchain so it's been quite a learning curve. The repository is set up to use the version of libNativeScript.so with debugging symbols. I've added some Crash Notes and Other Crash Notes Setting this up takes a few steps. I find running simulated geolocations using the Android Emulator is ridiculously slow. As a result, I use a live device, in my case a Lenovo Tab 4 running Android 8.1.0. To simulate locations I use the Lockito Fake GPS app: https://play.google.com/store/apps/details?id=fr.dvilleneuve.lockito&hl=en_US You have to enable developer options and set the lockito fake gps app as the 'mock locations app'. I have included a shell script that simulates a long route and have included instructions in the repository README.
Then run the Lockito app. Click Start. Then in another terminal window (under Linux or Mac OSX):
It'll dump a bunch of log messages. Just let it run for between 30 minutes and 13 hours. There crash always looks like this:
The whole point to these log messages is I was trying to track down a crash I originally saw that was occurring in garbage collection. I am very motivated to get this to work so if there is anything I can do to make it easier or if you would like me to run any tests, I am happy to do it. I have determined that if I do not dump an object in any console.log() calls in the onLocation() callback that it will run for 24 hours without crashing. |
I managed to replicate the crash triggered by the V8 Garbage Collector. I inspected { N } android-runtime source code in my scenario and observed the following:
The stack trace looks like this: tns::V8GetPrivateValue(v8::Isolate*, v8::Local<v8::Object> const&, v8::Local<v8::String> const&, v8::Local<v8::Value>&) V8GlobalHelpers.cpp:113
tns::MetadataNode::GetImplementationObject(v8::Isolate*, v8::Local<v8::Object> const&) MetadataNode.cpp:1104
tns::ObjectManager::HasImplObject(v8::Isolate*, v8::Local<v8::Object> const&) ObjectManager.cpp:475
tns::ObjectManager::JSObjectWeakCallback(v8::Isolate*, tns::ObjectManager::ObjectWeakCallbackState*) ObjectManager.cpp:371
tns::ObjectManager::JSObjectWeakCallbackStatic(v8::WeakCallbackInfo<tns::ObjectManager::ObjectWeakCallbackState> const&) ObjectManager.cpp:308
v8::internal::GlobalHandles::Node::PostGarbageCollectionProcessing(v8::internal::Isolate*) 0x000000008e2b11fc
v8::internal::GlobalHandles::PostGarbageCollectionProcessing(v8::internal::GarbageCollector, v8::GCCallbackFlags) 0x000000008e2b1a3a
v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) 0x000000008e2c4932
v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) 0x000000008e2c32f4
v8::internal::Heap::AllocateRawWithLightRetry(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) 0x000000008e2ca83c
v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) 0x000000008e2ca882
v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::RootIndex, int, v8::internal::Object, v8::internal::AllocationType) 0x000000008e293c8c
v8::internal::Factory::NumberToStringCacheSet(v8::internal::Handle<v8::internal::Object>, int, char const*, bool) 0x000000008e2a126a
v8::internal::Factory::NumberToString(v8::internal::Handle<v8::internal::Object>, bool) 0x000000008e2a13e0
v8::internal::Runtime_NumberToString(int, unsigned int*, v8::internal::Isolate*) 0x000000008e72dc9e
Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit 0x000000008e5284a4
Builtins_StringAdd_ConvertRight 0x000000008e529ef8
Builtins_AddHandler 0x000000008e5781a8
Builtins_InterpreterEntryTrampoline 0x000000008e490ab8
Builtins_InterpreterEntryTrampoline 0x000000008e490ab8
Builtins_InterpreterEntryTrampoline 0x000000008e490ab8
Builtins_InterpreterEntryTrampoline 0x000000008e490ab8
Builtins_JSEntryTrampoline 0x000000008e48dd70
Builtins_JSEntry 0x000000008e48da74
v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) 0x000000008e292850
v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) 0x000000008e29267e
v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) 0x000000008e1f4b9e
tns::CallbackHandlers::CallJSMethod(v8::Isolate*, _JNIEnv*, v8::Local<v8::Object> const&, std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char> > const&, _jobjectArray*) CallbackHandlers.cpp:853
tns::Runtime::CallJSMethodNative(_JNIEnv*, _jobject*, int, _jstring*, int, unsigned char, _jobjectArray*) Runtime.cpp:311
::Java_com_tns_Runtime_callJSMethodNative(JNIEnv *, jobject, jint, jint, jstring, jint, jboolean, jobjectArray) com_tns_Runtime.cpp:188
callJSMethodNative 0x000000008eddba1a
art_quick_invoke_stub_internal 0x00000000a57da776
art_quick_invoke_stub 0x00000000a57df8e8
art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*) 0x00000000a54842f6
art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*) 0x00000000a55d5976
bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d1b64
bool art::interpreter::DoInvoke<(art::InvokeType)1, true, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f76a2
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f403a
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d1b4c
bool art::interpreter::DoInvoke<(art::InvokeType)1, true, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f76a2
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f403a
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d1b4c
bool art::interpreter::DoInvoke<(art::InvokeType)1, true, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f76a2
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f403a
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d1b4c
bool art::interpreter::DoInvoke<(art::InvokeType)0, true, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f84f4
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f3a52
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0eec
bool art::interpreter::DoInvoke<(art::InvokeType)0, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f83d4
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f209e
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0eec
bool art::interpreter::DoInvoke<(art::InvokeType)0, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f83d4
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f209e
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0eec
bool art::interpreter::DoInvoke<(art::InvokeType)4, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f7ba4
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f3428
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0eec
bool art::interpreter::DoInvoke<(art::InvokeType)2, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f62ba
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f4ff6
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0eec
bool art::interpreter::DoInvoke<(art::InvokeType)4, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f7ba4
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f3428
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0eec
bool art::interpreter::DoInvoke<(art::InvokeType)2, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f62ba
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f4ff6
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0eec
bool art::interpreter::DoInvoke<(art::InvokeType)4, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f7ba4
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f3428
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0eec
bool art::interpreter::DoInvoke<(art::InvokeType)0, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f83d4
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f209e
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0eec
bool art::interpreter::DoInvoke<(art::InvokeType)2, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55f62ba
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55f4ff6
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b79a8
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x00000000a55bc01c
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0eec
MterpInvokeStatic 0x00000000a57c5a08
ExecuteMterpImpl 0x00000000a57cce18
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b7958
art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*) 0x00000000a55bbf64
artQuickToInterpreterBridge 0x00000000a57ba2d8
art_quick_to_interpreter_bridge 0x00000000a57decf4
art_quick_invoke_stub_internal 0x00000000a57da776
art_quick_invoke_static_stub 0x00000000a57df9ee
art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*) 0x00000000a548431a
art::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ArgArray*, art::JValue*, char const*) 0x00000000a572b254
art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int) 0x00000000a572c772
art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobject*) 0x00000000a56dbffc
invoke 0x000000007127e9b0
art_quick_invoke_stub_internal 0x00000000a57da776
art_quick_invoke_stub 0x00000000a57df8e8
art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*) 0x00000000a54842f6
art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*) 0x00000000a55d5976
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x00000000a55d0f04
MterpInvokeVirtual 0x00000000a57c49ee
ExecuteMterpImpl 0x00000000a57ccc98
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x00000000a55b7958
art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*) 0x00000000a55bbf64
artQuickToInterpreterBridge 0x00000000a57ba2d8
art_quick_to_interpreter_bridge 0x00000000a57decf4
main 0x000000007449b342
art_quick_invoke_stub_internal 0x00000000a57da776
art_quick_invoke_static_stub 0x00000000a57df9ee
art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*) 0x00000000a548431a
art::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ArgArray*, art::JValue*, char const*) 0x00000000a572b254
art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list) 0x00000000a572b044
art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list) 0x00000000a5679b4e
<unknown> 0x00000000a8835e88
android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool) 0x00000000a883790c
<unknown> 0x000000008cb7fb2c
__libc_init 0x00000000a760835e
<unknown> 0x000000008cb7f748 |
@adrian-branescu, thanks for the detailed analysis of the crash. We will provide a fix in the upcoming 6.1.0 release. |
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
I am running into a crash in libNativeScript.so during garbage collection.
I do not know if this is a bug in the code I am working with or whether I've uncovered a bug in NativeScript. I am posting this here in the hopes of getting some pointers to determine in which category it falls.
I am porting over the background geolocation plugin from Cordova.
https://github.com/mauron85/cordova-plugin-background-geolocation
That plugin is based on this library, which I have forked but not modified: https://github.com/Yermo/background-geolocation-android
I'm using the Plugin Seed and have the android side of the plugin working. However, after between 1 and 13 hours or so it crashes during garbage collection. The crash is happening in libNativeScript.so with a NULL reference SEGV during what appears to be garbage collection. If it was a case of the underlying library freeing an object and then NativeScript attempting to free it during it's GC I would have expected to see "attempt to use cleared object refererence" instead of a NULL pointer de-reference.
From the tombstone file:
I have attempted to use ndk-stack and addr2line to get an idea about the cause of the crash but I'm guessing the version of libNativeScript.so shipped out doesn't contain debugging symbols?
Is there some way to determine what was happening on the javascript side immediately before this crash? (Which would help me figure out if it's in my code)
Is there a guide or some information somewhere on how one can best approach tracking down an issue like this?
I should mention I am not using markingMode:none. Adding that seems to make the app much less stable. Maybe that's a clue?
To Reproduce
Expected behavior
Sample project
I do not yet have a small test case that reproduces the problem. With some pointers I'm hoping to narrow it down so I can provide a test case.
Additional context
The text was updated successfully, but these errors were encountered: