webView causes Android to crash right after loading the content

You must Login before you can answer or comment on any questions.

Application type: mobile

Titanium SDK version: 2.0.3 (08/06/12 15:16 4d99a43)

Device: Android emulator

Operating System: OSX 10.7.3

Titanium Studio: 2.1.1.201207271312

The page is rather big so I've tried to separate out only the relevant code, sorry if I've missed anything. What basically happens is that I have a webview where I add some content. When the page is opened, the content shows up initially and I can see it for a few seconds but then the app crashes and android restarts it.

var self = Ti.UI.createWindow({
    title:'test',
    backgroundColor:'white',
    tabBarHidden:true,
});
 
var wrapper = Titanium.UI.createScrollView({
    contentWidth:'auto',
    contentHeight:'auto',
    top:0,
    showVerticalScrollIndicator:true,
    showHorizontalScrollIndicator:true,
    disableBounce: true,
});
 
var wrapperView = Titanium.UI.createView({
    layout:'vertical',
    height:'100%',
});
 
var jView = Ti.UI.createView({
    width: '100%',
    height: '100px',
    layout: 'vertical',
});
 
longDescription = '<b>test</b>';
var contentWebView = Titanium.UI.createWebView({                
    html: longDescription,
    width: 'auto',
    height: 'auto',
    disableBounce: true,
});
 
jView.add(contentWebView);
wrapperView.add(jView); 
wrapper.add(wrapperView);
self.add(wrapper);
self.open();
It's not clear which part of the log is relevant to the crash but it appears to be this one http://pastebin.com/1ESyPpMv

Any insight would be highly appreciated because my numerous random attempts to find what exactly is causing the problem haven't had any results so far and I don't have many debugging options left.

1 Answer

Accepted Answer

What android emulator? 2.3 has a bug that makes the webview to crash the app. Is a bug inside the emulator, not Ti or SDK.

Your Answer

Think you can help? Login to answer this question!