[TIMOB-3510] Android evalJS crashing with SIGSEGV
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2011-04-15T03:46:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, defect |
Reporter | KT |
Assignee | Don Thorp |
Created | 2011-04-15T03:46:05.000+0000 |
Updated | 2017-03-29T22:15:05.000+0000 |
Description
I've been going over this, and I'm fairly certain this is a bug.
Here's the minimal test that will crash on Android with SIGSEGV:
var win = Ti.UI.createWindow({
// Android
navBarHidden: false,
exitOnClose: true
}); var view = Ti.UI.createWebView({
scalesPageToFit: false,
url: 'something.html'
}); view.addEventListener('load', function() {
view.evalJS("test");
}); win.add(view);
win.open();
(Although I find it hard to believe people aren't somehow using evalJS() on Android. You'd think it would be a higher-profile issue.)
Anyway, that code gives a crash dump similar to http://pastie.org/1754641">http://pastie.org/1754641.
Sorry about that formatting. I just realized how it pasted. Hopefully this is better.
(Also, confirming that this crash also happens with 1.7 beta.)
Just as some further background and to help try to pinpoint it regression-wise, this issue seems to go back at least a year:
http://developer.appcelerator.com/question/117750/android-evaljs">http://developer.appcelerator.com/question/117750/android-evaljs
http://developer.appcelerator.com/question/67431/js-to-webview-working-on-iphone-not-in-android"> http://developer.appcelerator.com/question/67431/js-to-webview-working-on-iphone-not-in-android
http://developer.appcelerator.com/question/41671/problem-with-webviewevaljs---doesnt-seem-to-work-at-all-with-android-emulator"> http://developer.appcelerator.com/question/41671/problem-with-webviewevaljs---doesnt-seem-to-work-at-all-with-android-emulator
http://developer.appcelerator.com/question/13431/evaljs-not-working-anymore-since-12x-upgrade-on-android-16"> http://developer.appcelerator.com/question/13431/evaljs-not-working-anymore-since-12x-upgrade-on-android-16
This is, strangely, in direct contravention to your drillbit test in:
https://github.com/appcelerator/titanium_mobile/commit/597a4878af606e255811964cc5cbc9b93df5dfb2"> https://github.com/appcelerator/titanium_mobile/commit/597a4878af606e255811964cc5cbc9b93df5dfb2
If that works, then what is drillbit doing differently so that it works whereas the app.js above crashes hard immediately?
Further information: This crash doesn't seem to happen on 3.0. But the necessary Ti Javascript seems to never get injected, as is the case with 1.6 (i.e., no crash, but no Ti injection).
The information in this ticket has been moved to http://appc.me/timob-3554" title="Ticket #3554">#3554
Closing ticket as duplicate.