-
Notifications
You must be signed in to change notification settings - Fork 44
[Android] ThaliTest app crashes during start-up #563
Comments
The things that has broken the code has happened after 9b58dbf88f0f3cc7922802f1f50034f2c357665d in vNext branch. |
Commenting out stuff in app.js (UnitTest_app.js) makes the bug go away: //testUtils.toggleRadios(true)
//.then(function () {
Mobile('GetDeviceName').callNative(function (name) {
console.log('My device name is: %s', name);
testUtils.setName(name);
require('./runTests.js');
});
//})
//.catch(function (error) {
// console.log('Something went wrong: ' + error);
//}); |
Without commenting out anything, i.e., when the crash occurs, I see something like this in logcat:
@obastemur: We will continue investigating this on our side, but if you have any thoughts on why we would see such an error, please comment. |
@vjrantal do you have something more? looks like this happening while trying to call back to external method (see Guess, multiple threads are reaching to jxcore. |
@obastemur: Looks like this commit 1da7827 gets rid of the crash, but I have no idea why. What I was thinking is that would there be any value in building a debug version of libjxcore to get more detailed backtrace? |
I bet that is just a temporary solution. you might enable logging inside jxcore and build and share the output. see https://github.com/jxcore/jxcore/blob/master/src/jx/Proxy/EngineLogger.h enable both
|
@obastemur: Do you happen to have any jxcore-cordova build machine where you could easily build a |
unfortunately I don't have it on my second laptop. A bit away from the first one. Hey, guess you will need it later too. |
@obastemur: Yep - no worries :) Thanks for the comments! |
There may be calls from Java code JXcore from other than the main thread. |
@obastemur: Do you think this could be somehow related to jxcore/jxcore-cordova#60? Should we somehow change our code now that we started using jxcore-cordova > 0.1.0? |
Indeed tou should update to latest |
@obastemur: We have updated to the latest and now seeing this issue. My question was, now that we have already updated to latest, do we need to change our code, because the reference issue said "anyone depending on UI - JXcore JS thread may need to update their code"? |
@obastemur: As further debugging information, with jxcore-cordova 0.1.1 I get 100% repro rate with our test app and without changing anything else, but downgrading to jxcore-cordova 0.0.7 (using |
The radio toggling at the beginning of the tests was removed as a workaround for #563. That would be good to put back once a root cause and fix is found, but even then, it should not be necessary to turn off radios at the end of tests. This was originally done for CI where devices didn't reboot in between tests, but now devices do reboot and thus tests always start from clean radio states.
@obastemur: Was able to get a build with the I can think of two possibilities:
If you know the exact sha1 of the jxcore that is bundled with jxcore-cordova 0.1.1, I'll try once more with that one. |
We still see this very frequently with jxcore-cordova >= 0.1.0. This jxcore/jxcore#401 looked a bit related, but we are not calling |
@obastemur: Since we can reliably reproduce this crash in our CI, it would be fairly easy to try out potential fix candidates if there would be any. We also now have the capability to build jxcore and jxcore-cordova ourselves so the fix proposals could include changes to them as well. If possible, please let us know if you have any suggestions. For clarity, the title of this issue implies that this happens on app startup (which was the case initially), but when we added workarounds for that, the crash may happen later on like in this example which is a CI run I had today:
|
Note that others are seeing something very much like this in a scenario identical to ours - jxcore/jxcore-cordova#143 |
We think this might be #22. Diego is investigating. We think something changed in Lollipop that causes this bug and is why we didn't see it in KitKat. |
Diego will now try to reproduce #22 on Lollipop since we now know enough to know what to look for. |
Diego is back and investigating and we hope to have a report tomorrow. |
We have a work around that will keep the application from crashing but we haven't actually identified where the access violation is from so we still need to fix this. For now we are waiting to see if this will repo again and if so then we can try to fix it. |
This is the same crash reported by #1592 |
Reproduced with commit
8e7e29ab668e5569dc9c8c212030295f41ed47bd
and on Lollipop.No clear reason, but saw this: https://github.com/jxcore/jxcore-cordova/blob/master/src/android/java/io/jxcore/node/jxcore.java#L168
In addition, commenting out line 84 in ThaliPermissions.java (
Thali_CordovaPlugin/src/android/java/org/thaliproject/p2p/ThaliPermissions.java
Line 84 in 8e7e29a
fixed the problem, but is obviously not an actual fixremoves the crash, but nothing is happening after - the app just freezes functionality-wise.The text was updated successfully, but these errors were encountered: