Title: SIGSEGV in libNativeScript.so on callback from java with console.log when displaying an object. · Issue #1366 · NativeScript/android · GitHub
Open Graph Title: SIGSEGV in libNativeScript.so on callback from java with console.log when displaying an object. · Issue #1366 · NativeScript/android
X Title: SIGSEGV in libNativeScript.so on callback from java with console.log when displaying an object. · Issue #1366 · NativeScript/android
Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 5.3.2 Cross-platform modules: 5.3.1 (core m...
Open Graph Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 5.3...
X Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 5.3...
Opengraph URL: https://github.com/NativeScript/android/issues/1366
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SIGSEGV in libNativeScript.so on callback from java with console.log when displaying an object.","articleBody":"**Environment**\r\nProvide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project):\r\n - CLI: 5.3.2\r\n - Cross-platform modules: 5.3.1 (core modules)\r\n - Android Runtime: 5.3.1\r\n - iOS Runtime (if applicable):\r\n - Plugin(s): working on developing a background geolocation plugin\r\n\r\n**Describe the bug**\r\n\u003c!-- A clear and concise description of what the bug is. Please, explain whether it's a build time error or a runtime error. More detailed logs can be easily obtained by following the instructions in this guide: https://docs.nativescript.org/get-support#how-to-obtain-diagnostic-reports. -->\r\n\r\nI am running into a crash in libNativeScript.so during garbage collection.\r\n\r\nI 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.\r\n\r\nI am porting over the background geolocation plugin from Cordova. \r\n\r\nhttps://github.com/mauron85/cordova-plugin-background-geolocation\r\n\r\nThat plugin is based on this library, which I have forked but not modified: https://github.com/Yermo/background-geolocation-android\r\n\r\nI'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.\r\n\r\nFrom the tombstone file:\r\n\r\n```\r\n*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\r\nBuild fingerprint: 'Lenovo/TB-8504F/TB-8504F:8.1.0/OPM1.171019.019/8504F_S001011_181016_ROW:user/release-keys'\r\nRevision: '0'\r\nABI: 'arm64'\r\npid: 12292, tid: 12292, name: location.ngdemo >>> com.flyingbricksoftware.backgroundgeolocation.ngdemo \u003c\u003c\u003c\r\nsignal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0\r\nCause: null pointer dereference\r\n x0 000000769e780058 x1 0000000000000000 x2 000000769e780068 x3 0000000000000001\r\n x4 4c271b83f1119a75 x5 0000000000000005 x6 0000000000107020 x7 00000000009261ce\r\n x8 0000000000000000 x9 0000000000009330 x10 0000000000000018 x11 0000000000000030\r\n x12 0000000000009340 x13 000000769441b0a1 x14 000000769441b0a1 x15 0000000000000001\r\n x16 000000769dcc0608 x17 000000769d222230 x18 0000000000000001 x19 0000007fc9bc3100\r\n x20 0000007fc9bc3190 x21 0000007fc9bc30f8 x22 000000769e6a3c00 x23 000000769e780068\r\n x24 000000769e780058 x25 000000769e780058 x26 0000000000000005 x27 0000000000000001\r\n x28 0000000000000000 x29 0000007fc9bc2f30 x30 000000769d222224\r\n sp 0000007fc9bc2e70 pc 000000769d222250 pstate 0000000080000000\r\n v0 00000000000000010000000000000001 v1 000000000000dc030000000000933dd1\r\n v2 00000000000000003f7573c559b0c412 v3 000000000000000040a5700000000000\r\n v4 00000000000000000000000000000ab8 v5 00000000000000000000000000000000\r\n v6 00000000cc004fb40000000000000000 v7 00000000540060900000000000000000\r\n v8 00000000000000000000000000000000 v9 00000000000000000000000000000000\r\n v10 00000000000000000000000000000000 v11 00000000000000000000000000000000\r\n v12 00000000000000000000000000000000 v13 00000000000000000000000000000000\r\n v14 00000000000000000000000000000000 v15 00000000000000000000000000000000\r\n v16 00000000000000000000000000000000 v17 00000000540060900000000000000000\r\n v18 00000000000000000000000000000000 v19 00000000540060900000000000000000\r\n v20 00000000000000000000000000000000 v21 00000000540060900000000000000000\r\n v22 00000000000000000000000000000000 v23 00000000540060900000000000000000\r\n v24 00000000000000000000000000000000 v25 00000000540060900000000000000000\r\n v26 00000000000000000000000000000000 v27 00000000540060900000000000000000\r\n v28 00000000000000000000000000000000 v29 00000000540060900000000000000000\r\n v30 00000000000000000000000000000000 v31 00000000540060900000000000000000\r\n fpsr 00000013 fpcr 00000000\r\n\r\nbacktrace:\r\n #00 pc 0000000000386250 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so (v8::Object::HasOwnProperty(v8::Local\u003cv8::Context>, v8::Local\u003cv8::Name>)+32)\r\n #01 pc 0000000000386220 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so (v8::Object::HasPrivate(v8::Local\u003cv8::Context>, v8::Local\u003cv8::Private>)+8)\r\n #02 pc 000000000022c66c /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so\r\n #03 pc 0000000000201e90 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so\r\n #04 pc 000000000021a4dc /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so\r\n #05 pc 000000000049ab30 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so\r\n #06 pc 000000000049b3b0 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so\r\n #07 pc 00000000004a5548 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so\r\n #08 pc 00000000004a3964 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so (v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageColl\r\nectionReason, v8::GCCallbackFlags)+1328)\r\n #09 pc 00000000004ad744 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so\r\n #10 pc 00000000004ad7c4 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so\r\n #11 pc 0000000000472920 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so (v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace)+48)\r\n #12 pc 00000000009f6c00 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so\r\n #13 pc 0000000000b10a88 /data/app/com.flyingbricksoftware.backgroundgeolocation.ngdemo-1Lh3czgPMLXfgVYeCePdOA==/lib/arm64/libNativeScript.so\r\n```\r\nI 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?\r\n\r\nIs 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)\r\n\r\nIs there a guide or some information somewhere on how one can best approach tracking down an issue like this? \r\n\r\nI should mention I am not using markingMode:none. Adding that seems to make the app much less stable. Maybe that's a clue?\r\n\r\n**To Reproduce**\r\n\u003c!-- Add commands used or steps taken to reproduce the behaviour. -->\r\n\r\n**Expected behavior**\r\n\r\n**Sample project**\r\n\u003c!-- If possible, provide a link from the [Playground](https://play.nativescript.org) with reproduction of the problem. If not, consider attaching a sample project or link to a repository with such project. -->\r\n\r\nI 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.\r\n\r\n**Additional context**\r\n\u003c!-- Add any other context about the problem here. -->\r\n","author":{"url":"https://github.com/Yermo","@type":"Person","name":"Yermo"},"datePublished":"2019-05-02T19:06:25Z","url":"https://github.com/NativeScript/android/issues/1366"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5af3ef80-7319-ec5a-ec34-6068e0de52a9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8CF4:1D86C4:1779971:1DD31C7:6B013B84 |
| html-safe-nonce | d6eafac19dac046347e86a9f89d486e9799931b11bc249914858d6ff149873a2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0Y0OjFEODZDNDoxNzc5OTcxOjFERDMxQzc6NkIwMTNCODQiLCJ2aXNpdG9yX2lkIjoiNDY0MDk4OTMzNjU0MjcyMjk0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 36d9f9252f8e6298d2a203dd61d5e6a2ab46c70396712e4acec6ceaeb9321cfd |
| hovercard-subject-tag | issue:439741452 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/android/1366/issue_layout |
| twitter:image | https://opengraph.githubassets.com/097815d504b9a2adfa6639e1b8544c6348e79cc3809e4756e77634314523453d/NativeScript/android/issues/1366 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/097815d504b9a2adfa6639e1b8544c6348e79cc3809e4756e77634314523453d/NativeScript/android/issues/1366 |
| og:image:alt | Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 5.3... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Yermo |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/android git https://github.com/NativeScript/android.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 29137950 |
| octolytics-dimension-repository_nwo | NativeScript/android |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 29137950 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/android |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width