{ "id": "171483", "key": "TIMOB-25948", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-04-12T08:44:32.000+0000", "created": "2018-04-09T21:30:47.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "issuelinks": [], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2018-04-12T23:55:44.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When trying to run the hyperloop examples app on an android emulator on a Windows computer( Issue can also be seen on devices for some people). The application will crash and show the following error: \r\n\r\n{code:java}\r\n[DEBUG] : AndroidRuntime: Shutting down VM\r\n \t[ERROR] : TiApplication: (main) [14,547] Sending event: exception on thread: main msg:java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol \"_ZNSt3__112__next_primeEj\" referenced by \"/data/app/com.appc.a11-2/lib/x86/libhyperloop.so\"...; Titanium 7.1.1,2018/04/04 11:05,undefined\r\n \t[ERROR] : TiApplication: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol \"_ZNSt3__112__next_primeEj\" referenced by \"/data/app/com.appc.a11-2/lib/x86/libhyperloop.so\"...\r\n \t[ERROR] : TiApplication: at java.lang.Runtime.loadLibrary0(Runtime.java:989)\r\n \t[ERROR] : TiApplication: at java.lang.System.loadLibrary(System.java:1530)\r\n \t[ERROR] : TiApplication: at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:142)\r\n \t[ERROR] : TiApplication: at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:109)\r\n \t[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:207)\r\n \t[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:113)\r\n \t[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:135)\r\n \t[ERROR] : TiApplication: at com.appc.a11.A11Application.onCreate(A11Application.java:93)\r\n \t[ERROR] : TiApplication: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)\r\n \t[ERROR] : TiApplication: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5403)\r\n \t[ERROR] : TiApplication: at android.app.ActivityThread.-wrap2(ActivityThread.java)\r\n \t[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)\r\n \t[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)\r\n \t[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:154)\r\n \t[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:6119)\r\n \t[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)\r\n \t[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)\r\n \t[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)\r\n{code}\r\n\r\n*Test Steps*\r\n+ Download and import the Hyperloop examples application [Hyperloop examples App|https://github.com/appcelerator/hyperloop-examples]\r\n+ Download and add Hyperloop 3.0.4 in to the imported project. [Hyperloop 3.0.4|https://github.com/appcelerator/hyperloop.next/releases/tag/v3.0.4]\r\n+ Run the application \r\n\r\n*Expected result*\r\nApplication should not crash and run without issues.\r\n\r\n*Actual result* \r\nApplication shows the above error.", "attachment": [], "flagged": false, "summary": "[Android] Hyperloop 3.0.4 throws an error when building for Android ", "creator": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "APPC Studio: 5.0.0.201712081732\r\nCLI core: 7.0.3-master.27\r\nappc npm: 4.2.13-2\r\nNexus 6p (8.1)\r\nNexux 5x (API 25 emulator)\r\nOperating System:\r\nName = Microsoft Windows 10 Pro\r\nVersion = 10.0.15063\r\nArchitecture = 64bit\r\nCPUs = 4\r\nMemory = 16.0GB\r\nNode.js:\r\nNode.js Version = 8..9.1", "comment": { "comments": [ { "id": "436706", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Adding some more info as I was able to repro this\r\n\r\n- For me, it happens on OSX and Windows on device and emulators.\r\n- Walking through the master builds produced by jenkins, everything up to https://github.com/appcelerator/hyperloop.next/pull/278 works\r\n- But, building hyperloop locally with the SDK that is selected as the default in that PR works for me\r\n- https://github.com/appcelerator/hyperloop.next/pull/287 works for me, which appears to indicate that between 7.0.0 and 7.1.1 _something_ has broken. I don't think we should merge that PR", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-04-10T12:17:01.000+0000", "updated": "2018-04-10T12:17:01.000+0000" }, { "id": "436791", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Decided to take a walk through build histories to track this down in https://github.com/appcelerator/hyperloop.next/pull/288\r\n\r\nHere's what I found,\r\n\r\n* Builds of hyperloop built on Jenkins are broken since 7.0.0.v20171113133758\r\n* Git hash for that build, refers to this PR https://github.com/appcelerator/titanium_mobile/pull/9265\r\n* I've tried the following Android versions with that module\r\n** Devices\r\n*** Note 3 on lineage OS 14.1 (Android 7.1.2), crashes (x)\r\n*** Oneplus 3 on their stock (Android 7.1.1), crashes (x)\r\n*** Samsung Galaxy S8 (Android 8.0.0), no crash (/)\r\n** Emulators\r\n*** Android Nexus 6 Emulator with 8.1, no crash (/)\r\n*** Android Nexus 5X Emulator with 7.1.1, crash (x)\r\n*** Android Nexus 5X Emulator with 6.0, no crash (/)\r\n\r\n\r\nSo there seems to almost definitely a pattern here (unless I'm crazy, which is possible). I don't understand that change enough to know what the potential variables at play here are. My thoughts are maybe NDK version? For the life of me I can't figure out what version of the NDK Jenkins uses, anyone any clues?\r\n\r\ncc [~gmathews] [~jquick] [~amukherjee]", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-04-11T16:42:12.000+0000", "updated": "2018-04-11T20:03:22.000+0000" }, { "id": "436794", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Step {{cat $ANDROID_NDK/RELEASE.txt}} on https://jenkins.appcelerator.org/blue/organizations/jenkins/titanium-sdk%2Fhyperloop.next/detail/PR-288/14/pipeline/30 (release.txt was removed in NDK 11....) shows this is r10e (64-bit) being used, downloading and building hyperloop locally to test the theory", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-04-11T17:25:56.000+0000", "updated": "2018-04-11T17:30:54.000+0000" }, { "id": "436798", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Confirmed building locally with ndk r10e causes a bad build. Filed some tickets TIMOB-25959 to fail the build on invalid NDK, TIMOB-25958 to log the NDK used.\r\n\r\nSo here's the lay of the land\r\n\r\n* The root cause for this failure is because Jenkins is building modules with NDK r10e\r\n* NDK r10e has been marked as unsupported in our package.json since https://github.com/appcelerator/titanium_mobile/pull/9274, I have no idea what the docs say\r\n\r\nHere's what I think we should do\r\n\r\n* Fix the tickets I filed if possible\r\n* Update Jenkins to a newer NDK\r\n* Cut a hyperloop 3.0.5 with either https://github.com/appcelerator/hyperloop.next/pull/287 merged, or the above fixed (because of this I'm escalating this ticket to a blocker for SDK 7.1.1 release)\r\n\r\nIt seems like this is possible causing bugs for others, I saw someone else run into a similar error on tislack https://ti-slack.slack.com/archives/C03CVQX2A/p1523439818000326", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-04-11T17:56:40.000+0000", "updated": "2018-04-11T17:56:40.000+0000" }, { "id": "436803", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~eharris], I'm thinking the devices the app crashed on are 64-bit and the hyperloop build system using the older NDK failed to produce an ARM64 \"libhyperloop.so\" library file, but likely produced an *.so library for the ARMv7 and x86 architectures. Since Titanium 7.0.0, we now produce ARM64 binaries for the core. Since the an ARM64 Android OS sees that the APK has an ARM64 binary directory, it'll only load C/C++ libraries from that directory.\r\n\r\nI recommend that you confirm this for yourself by doing the following:\r\n# Building the Android APK with the old NDK installed.\r\n# Go to the built APK directory in Finder: {{./build/android/bin/}}\r\n# Renamed APK file extension from {{*.apk}} to {{*.zip}}.\r\n# Unzip the APK.\r\n# Go to the unzipped APK's \"lib/arm64-v8a\" directory.\r\n# Verify that a \"libhyperloop.so\" file exists. _(If not, then there's the problem.)_\r\n# Go to the APK's \"lib/armeabi-v7a\" directory.\r\n# Verify that a \"libhyperloop.so\" file exists. _(I suspect it does.)_\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-11T19:10:05.000+0000", "updated": "2018-04-11T19:10:05.000+0000" }, { "id": "436807", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~jquick] I'll take a look tomorrow, but I think the Note 3 isn't 64 bit", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-04-11T20:03:13.000+0000", "updated": "2018-04-11T20:03:13.000+0000" }, { "id": "436808", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~jquick] Got curious and took a look\r\n\r\nUsing the below, I see libhyperloop.so in arm64-v8a, armeabi-v7a, and x86 directories when checking the apk\r\n \r\n* Oneplus 3\r\n* Hyperloop 3.0.4\r\n* SDK 7.1.1.v20180406141533\r\n* Android NDK set to r10e\r\n* Android SDK 25\r\n \r\n\r\nI've put up a PR to use NDK 12 on Jenkins: (https://github.com/appcelerator/hyperloop.next/pull/289) and verified that the built module works for me on my Oneplus", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-04-11T20:53:00.000+0000", "updated": "2018-04-11T20:53:00.000+0000" }, { "id": "436811", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Confirmed https://github.com/appcelerator/hyperloop.next/pull/290 fixes this issue:\r\n - 3.0.4 crashes on my Pixel device running Android 7.1.1\r\n- 3.0.5 works on my Pixel device running Android 7.1.1\r\n\r\n*titanium_mobile*\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/9997\r\n7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9998", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-11T21:50:35.000+0000", "updated": "2018-04-11T21:50:35.000+0000" }, { "id": "436812", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Okay. Then it's like you said. The older NDK r10e is not \"ABI\" compatible with the newest NDK versions.\r\n\r\nWe should refuse to compile with any NDK version that's outside of our supported NDK version range. We can only support versions that have been proven to be ABI compatible with each other.\r\n\r\nFor your info, this is the downside of publicly exporting C++ APIs. There's no standard when it comes to C++ name mangling rules and it often differs between C/C++ compiler vendors and between versions from the same vendor. You typically avoid this issue by ensuring all C++ libraries are compiled with the same compiler and version... or avoid the issue entirely and only export C APIs from C++.\r\n\r\nCase-in-point, Microsoft has recently documented that their VisualC++ compiler included with Visual Studio 2017 is (mostly) ABI compatible with 2015. Not Android related, but my point is C++ ABI compatibility is something to be concerned about on all platforms.\r\nhttps://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-11T21:51:20.000+0000", "updated": "2018-04-11T21:51:20.000+0000" }, { "id": "436819", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FRs passed once CRs have been passed the following can be merged: \r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/9997\r\n7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9998\r\nHyperloop: https://github.com/appcelerator/hyperloop.next/pull/290", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-12T03:46:57.000+0000", "updated": "2018-04-12T03:46:57.000+0000" }, { "id": "436845", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified hyperloop 3.0.5 (in 7.1.1.v20180412101616) does not throw error on android 7.1.1.\r\n\r\n[~smohammed], Can you please confirm on windows with the latest SDK & close the ticket.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-12T18:30:41.000+0000", "updated": "2018-04-12T18:30:41.000+0000" }, { "id": "436856", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified hyperloop fix 3.0.5 in SDK version 7.1.1.v20180412101616 and SDK 7.2.0.v20180412111125.\r\n\r\nTest and other information can be found at: \r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/9997\r\n7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9998\r\nHyperloop: https://github.com/appcelerator/hyperloop.next/pull/290", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-12T23:55:32.000+0000", "updated": "2018-04-12T23:55:32.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }