Hello,
I'm using a webview inside my application in order to display a web
interface. One part of the web interface is a javascript that opens a
popup.
I'm currently attempting to use onCreateWindow exactly as documented,
and after the call finishes (And a new window is supposed to be
created), there's a native crash in libwebcore.so:
09-20 19:36:53.953: INFO/DEBUG(1523): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
09-20 19:36:53.953: INFO/DEBUG(1523): Build fingerprint: 'google/
passion/passion/mahimahi:2.2/FRF91/43546:user/release-keys'
09-20 19:36:53.953: INFO/DEBUG(1523): pid: 5185, tid: 5215 >>>
com.fring <<<
09-20 19:36:53.964: INFO/DEBUG(1523): signal 11 (SIGSEGV), fault addr
00000064
09-20 19:36:53.973: INFO/DEBUG(1523): r0 00000000 r1 0035b8b4 r2
00000000 r3 419df178
09-20 19:36:53.973: INFO/DEBUG(1523): r4 00000000 r5 00408f20 r6
00000000 r7 00000001
09-20 19:36:53.983: INFO/DEBUG(1523): r8 47788101 r9 49880000 10
a87dcb20 fp 4879e2b8
09-20 19:36:53.983: INFO/DEBUG(1523): ip afc010c4 sp 4879de00 lr
a8490047 pc a83dac90 cpsr 00000030
09-20 19:36:53.993: INFO/DEBUG(1523): d0 643a64696f72646e d1
6472656767756265
09-20 19:36:53.993: INFO/DEBUG(1523): d2 002e0034002f0064 d3
006f004d00200000
09-20 19:36:53.993: INFO/DEBUG(1523): d4 0065006c00690062 d5
0066006100530020
09-20 19:36:54.003: INFO/DEBUG(1523): d6 002f006900720061 d7
002e003300330035
09-20 19:36:54.003: INFO/DEBUG(1523): d8 4000000043540000 d9
000000000000006a
09-20 19:36:54.013: INFO/DEBUG(1523): d10 0000000000000000 d11
0000000000000000
09-20 19:36:54.013: INFO/DEBUG(1523): d12 0000000000000000 d13
0000000000000000
09-20 19:36:54.013: INFO/DEBUG(1523): d14 0000000000000000 d15
0000000000000000
09-20 19:36:54.013: INFO/DEBUG(1523): d16 0000145f44a048b8 d17
0000000000000000
09-20 19:36:54.023: INFO/DEBUG(1523): d18 4129d13200000000 d19
4020000000000000
09-20 19:36:54.023: INFO/DEBUG(1523): d20 3ff0000000000000 d21
0000000000000000
09-20 19:36:54.023: INFO/DEBUG(1523): d22 0000000000000000 d23
0000000000000000
09-20 19:36:54.023: INFO/DEBUG(1523): d24 0000000000000000 d25
3fd5555560000000
09-20 19:36:54.023: INFO/DEBUG(1523): d26 0000000000000000 d27
3fd5555560000000
09-20 19:36:54.023: INFO/DEBUG(1523): d28 002000200020001b d29
3ff0000000000000
09-20 19:36:54.023: INFO/DEBUG(1523): d30 0000000000000000 d31
3ff0000000000000
09-20 19:36:54.033: INFO/DEBUG(1523): scr 60000013
09-20 19:36:54.053: INFO/DEBUG(1523): #00 pc 000dac90 /
system/lib/libwebcore.so
09-20 19:36:54.053: INFO/DEBUG(1523): #01 pc 00190042 /
system/lib/libwebcore.so
09-20 19:36:54.063: INFO/DEBUG(1523): code around pc:
09-20 19:36:54.063: INFO/DEBUG(1523): a83dac70 ef98f790 b1086e78
e0023004 18e44b02
09-20 19:36:54.063: INFO/DEBUG(1523): a83dac80 bdfe68a0 003f8778
00006080 4604b570
09-20 19:36:54.063: INFO/DEBUG(1523): a83dac90 460d6e40 3004b138
fd98f030 6e60b918
09-20 19:36:54.073: INFO/DEBUG(1523): a83daca0 f0014621 4628fed3
fd90f030 b1104606
09-20 19:36:54.073: INFO/DEBUG(1523): a83dacb0 66636e23 6e20e00a
ffa8f7ff 46286626
09-20 19:36:54.073: INFO/DEBUG(1523): code around lr:
09-20 19:36:54.073: INFO/DEBUG(1523): a8490024 f0084630 4606fb2f
f741b158 4606f98b
09-20 19:36:54.073: INFO/DEBUG(1523): a8490034 f7414620 f74af987
4601fe01 f74a4630
09-20 19:36:54.073: INFO/DEBUG(1523): a8490044 b145fe23 2b01682b
3b01d002 e002602b
09-20 19:36:54.083: INFO/DEBUG(1523): a8490054 f6dc4628 4630feff
ecbdb003 bdf08b02
09-20 19:36:54.083: INFO/DEBUG(1523): a8490064 f6dc2008 4621ff11
f74e4605 f896f81f
09-20 19:36:54.083: INFO/DEBUG(1523): stack:
09-20 19:36:54.083: INFO/DEBUG(1523): 4879ddc0 419df178 /dev/
ashmem/dalvik-LinearAlloc (deleted)
09-20 19:36:54.083: INFO/DEBUG(1523): 4879ddc4 80844e51 /system/
lib/libdvm.so
09-20 19:36:54.083: INFO/DEBUG(1523): 4879ddc8 a87d9df4 /system/
lib/libwebcore.so
09-20 19:36:54.094: INFO/DEBUG(1523): 4879ddcc a87d33c0 /system/
lib/libwebcore.so
09-20 19:36:54.094: INFO/DEBUG(1523): 4879ddd0 a87d9440 /system/
lib/libwebcore.so
09-20 19:36:54.094: INFO/DEBUG(1523): 4879ddd4 a87d9444 /system/
lib/libwebcore.so
09-20 19:36:54.094: INFO/DEBUG(1523): 4879ddd8 00259bd8 [heap]
09-20 19:36:54.094: INFO/DEBUG(1523): 4879dddc afd0cd31 /system/
lib/libc.so
09-20 19:36:54.094: INFO/DEBUG(1523): 4879dde0 a87d9444 /system/
lib/libwebcore.so
09-20 19:36:54.094: INFO/DEBUG(1523): 4879dde4 afc00877 /system/
lib/libstdc++.so
09-20 19:36:54.104: INFO/DEBUG(1523): 4879dde8 a87d33c0 /system/
lib/libwebcore.so
09-20 19:36:54.104: INFO/DEBUG(1523): 4879ddec a83dac75 /system/
lib/libwebcore.so
09-20 19:36:54.104: INFO/DEBUG(1523): 4879ddf0 00259bd8 [heap]
09-20 19:36:54.104: INFO/DEBUG(1523): 4879ddf4 00000000
09-20 19:36:54.104: INFO/DEBUG(1523): 4879ddf8 df002777
09-20 19:36:54.113: INFO/DEBUG(1523): 4879ddfc e3a070ad
09-20 19:36:54.113: INFO/DEBUG(1523): #00 4879de00 00357608 [heap]
09-20 19:36:54.113: INFO/DEBUG(1523): 4879de04 00408f20 [heap]
09-20 19:36:54.113: INFO/DEBUG(1523): 4879de08 00000000
09-20 19:36:54.113: INFO/DEBUG(1523): 4879de0c a8490047 /system/
lib/libwebcore.so
09-20 19:36:54.113: INFO/DEBUG(1523): #01 4879de10 003578b4 [heap]
09-20 19:36:54.123: INFO/DEBUG(1523): 4879de14 00259a20 [heap]
09-20 19:36:54.123: INFO/DEBUG(1523): 4879de18 4879df90
09-20 19:36:54.123: INFO/DEBUG(1523): 4879de1c 3f800000
09-20 19:36:54.123: INFO/DEBUG(1523): 4879de20 40000000 /dev/
ashmem/system_properties (deleted)
09-20 19:36:54.123: INFO/DEBUG(1523): 4879de24 a848ff4d /system/
lib/libwebcore.so
09-20 19:36:54.123: INFO/DEBUG(1523): 4879de28 00259c80 [heap]
09-20 19:36:54.123: INFO/DEBUG(1523): 4879de2c 00357630 [heap]
09-20 19:36:54.133: INFO/DEBUG(1523): 4879de30 4879df48
09-20 19:36:54.133: INFO/DEBUG(1523): 4879de34 a83c977d /system/
lib/libwebcore.so
09-20 19:36:54.133: INFO/DEBUG(1523): 4879de38 00259c80 [heap]
09-20 19:36:54.133: INFO/DEBUG(1523): 4879de3c 00357608 [heap]
09-20 19:36:54.133: INFO/DEBUG(1523): 4879de40 4879de70
09-20 19:36:54.143: INFO/DEBUG(1523): 4879de44 4879e19c
09-20 19:36:54.143: INFO/DEBUG(1523): 4879de48 4879df90
09-20 19:36:54.143: INFO/DEBUG(1523): 4879de4c a83b9ea3 /system/
lib/libwebcore.so
09-20 19:36:54.143: INFO/DEBUG(1523): 4879de50 0058e3c8 [heap]
09-20 19:36:54.143: INFO/DEBUG(1523): 4879de54 4879df40
The device is Nexus One with Froyo.
Here's the code that uses it:
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_PROGRESS);
setTitle("test");
setContentView(R.layout.web);
mWebView = (WebView) findViewById(R.id.webview);
mWebViewPopup = (WebView) findViewById(R.id.webviewPopup);
mWebViewPopup.getSettings().setJavaScriptEnabled(true);
WebViewClient webViewClient = new MyWebViewClient();
mWebView.setWebViewClient(webViewClient);
mWebView.setWebChromeClient(new WebChromeClient()
{
public void onProgressChanged(WebView view, int
progress)
{
WebActivity.this.setProgress(progress * 100);
}
@Override
public boolean onConsoleMessage(ConsoleMessage
consoleMessage)
{
Log.out.d("WebActivity: onConsoleMessage: " +
consoleMessage.message() + " line " + consoleMessage.lineNumber() + "
source ID" + consoleMessage.sourceId());
return false;
}
@Override
public boolean onCreateWindow(WebView view, boolean
dialog, boolean
userGesture, Message resultMsg)
{
Log.out.d("WebActivity.onCreate(...).new
WebChromeClient() {...}:
onCreateWindow");
mWebViewPopup.setVisibility(View.VISIBLE);
((WebViewTransport)resultMsg.obj).setWebView(mWebViewPopup);
resultMsg.sendToTarget();
return true;
}
@Override
public void onCloseWindow(WebView window)
{
Log.out.d("WebActivity.onCreate(...).new
WebChromeClient() {...}:
onCloseWindow");
mWebViewPopup.setVisibility(View.GONE);
}
});
mWebView.getSettings().setBuiltInZoomControls(true);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mWebView.getSettings().setSupportMultipleWindows(true);
mWebView.getSettings().setUserAgentString(CUSTOM_USER_AGENT);
// Use
a desktop-like user agent
mWebView.loadUrl(URL);
}
The log "WebActivity.onCreate(...).new WebChromeClient() {...}:
onCreateWindow" gets displayed, then it happens.
I would appreciate any help - if it turns out that I'm doing things
right, I'll open an issue.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en