Bug 53483

Summary: [Qt] Crashes during QWebView::load (KERN-EXEC 3)
Product: WebKit Reporter: Vasyl Pasternak <vasyl.pasternak+webkit>
Component: WebKit QtAssignee: Janne Koskinen <koshuin>
Status: RESOLVED WORKSFORME    
Severity: Major CC: benjamin, koshuin, laszlo.gombos, suresh.voruganti
Priority: P1 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: S60 Hardware   
OS: S60 3rd edition   
Attachments:
Description Flags
A project, that reproduces this bug
none
Test project, build with Qt 4.6.3 and works on S60 v5 and Symbian ^3 devices with Qt 4.6.4 installed
none
The same browser demo, but it loads http://norvig.com instead www.nokia.com none

Description Vasyl Pasternak 2011-02-01 04:27:29 PST
Redirected from http://bugreports.qt.nokia.com/browse/QTBUG-17070

Please look at the following code:

#include <QtGui>
#include <QWebView>

int main(int argc, char** argv)
{ 
QApplication app(argc, argv); 
QWebView view; 
view.load(QUrl("http://www.nokia.com")); 
view.showMaximized(); 
return app.exec(); 
}

It compiles with Qt 4.6 and Qt 4.7.1, and runs successfully on Linux and Symbian^3 with Qt 4.6.4 installed. But on Symbian^3 (Nokia N8) with developer versions of Qt 4.7.0 and Qt 4.7.1 it crashes with KERN-EXEC 3 during loading the page.

In that time, QML project with WebView component successfully loads all pages.

In the attachment I provide the complete project (cpp and pro files).

-Best regards,
Vasyl
Comment 1 Benjamin Poulain 2011-02-01 04:55:58 PST
You forgot the attachment.
Comment 2 Vasyl Pasternak 2011-02-01 05:13:25 PST
Created attachment 80745 [details]
A project, that reproduces this bug
Comment 3 Janne Koskinen 2011-02-01 05:30:02 PST
Increase the epocheapsize in .pro and try again.
Set it to 64MB with:
TARGET.EPOCHEAPSIZE = 0x20000 0x4000000
Comment 4 Vasyl Pasternak 2011-02-01 05:51:23 PST
Doesn't help, I tried to increase heap up to 256 Mb, but it still fails. The similar QML project has 32Mb heap size. 

In next attachment, I'll put the sis file of this project, build with Qt 4.6.3. It works on Symbian S60 v5 and Symbian ^3 with Qt 4.6.4 libraries installed, and fails with Qt 4.7.0 and upper.
Comment 5 Vasyl Pasternak 2011-02-01 05:52:25 PST
Created attachment 80751 [details]
Test project, build with Qt 4.6.3 and works on S60 v5 and Symbian ^3 devices with Qt 4.6.4 installed
Comment 6 Janne Koskinen 2011-02-01 06:25:02 PST
(In reply to comment #5)
> Created an attachment (id=80751) [details]
> Test project, build with Qt 4.6.3 and works on S60 v5 and Symbian ^3 devices with Qt 4.6.4 installed

I just want to make sure,
I'm sceptical as I've seen so many false positives because of epocheapsize.
I checked the epocheapsize from your sis package and that is now 64MB.

We've had least one issue where www.nokia.com doesn't load, I take it that you can load other pages?
Comment 7 Vasyl Pasternak 2011-02-01 07:28:32 PST
Created attachment 80759 [details]
The same browser demo, but it loads http://norvig.com instead www.nokia.com

I see, but I tried with different URLs, and ended up with the same result. Here is sis package with browser, which opens http://norvig.com site (the simplest site, I know). It works ok with Qt 4.6.4, but KERN-EXECs 3 on Qt 4.7.0 and above.
Comment 8 Janne Koskinen 2011-02-02 01:17:13 PST
I'll take a look at this, but I need some questions answered so I can reproduce this:

What compiler and what version did you use to create the exe ?
What specific environment you used to create the sis?
 -Did you use Qt Nokia SDK or did you use S60 SDKs?
 -Do you know if you had SBSv1 or SBSv2 in use?

The issue is that building on top of 5.0 S60 SDK using Qt 4.6.3 crashes on N8 when running either the tech preview or the developer version of Qt 4.7.0/4.7.1 QtWebkit SIS package and you did not compile these yourself. correct?

And building the same code using Qt 4.7.x works on N8 or still crashes ?
Comment 9 Vasyl Pasternak 2011-02-02 02:51:59 PST
(In reply to comment #8)
> I'll take a look at this, but I need some questions answered so I can reproduce this:
> 
> What compiler and what version did you use to create the exe ?

I use several compilers but the result is the same:

 Symbian S60 v3 FP2 SDK, Qt 4.6.3 on Linux (gnupoc)

 Symbian S60 v3 FP2 SDK, Qt 4.6.3 on Windows (standard)

 Symbian S60 v5 SDK, Qt 4.6.3 on Windows

 Symbian S60 v3 FP2 SDK, Qt 4.7.1 on Linux (gnupoc)
 
 Latest Nokia Qt SDK with Qt 4.7.1 (from this distribution I took sis packages for Nokia N8)

Everywhere I use GCCE build.

> What specific environment you used to create the sis?
>  -Did you use Qt Nokia SDK or did you use S60 SDKs?
>  -Do you know if you had SBSv1 or SBSv2 in use?

 I know nothing about SBSv1 and SBSv2, but looks like I'm using SBSv1

> 
> The issue is that building on top of 5.0 S60 SDK using Qt 4.6.3 crashes on N8 when running either the tech preview or the developer version of Qt 4.7.0/4.7.1 QtWebkit SIS package and you did not compile these yourself. correct?

I also buit it with Qt 4.7.1 and it still crashes with developer version of Qt.

Yes, I didn't compile the QtWebkit and Qt, they both were taken from the latest Nokia Qt SDK. 

> 
> And building the same code using Qt 4.7.x works on N8 or still crashes ?

It still crashes. The only loading web page through the QML works fine (where I'm using WebView component).
Comment 10 Janne Koskinen 2011-02-03 02:54:32 PST
You've set the stacksize explicitly. Qt defaults to maximum stack size possible which is 80kB. You halved that with your 40kB statement.

good news:
Tested this on upcoming 4.7.2 and QtWebkit 2.1 and it doesn't crash anymore.
bad news:
Running the same sis on 4.7.1 indeed crashes and looks like there is something eating the stack. If I increase the stack back to maximum I get little bit further. Unfortunately I don't have any workarounds to offer, Anomaly that comes with the release does work and I have a bad feeling I know why yours doesn't. Problem is that Symbian specific QtWebkit.sis is a random snapshot of the repo and is not exactly what is in the release.

I'll test this a bit more to make sure GCCE isn't the culprit, but for now I say not much else is there to do than to wait for official Symbian^3 release of Qt 4.7.x.
Comment 11 Vasyl Pasternak 2011-02-03 03:26:34 PST
Thanks Janne,

that's good news anyway. So I can freely develop on Qt 4.6.3, and wait official release (or second beta)

-Best regards,
 Vasyl

(In reply to comment #10)
> You've set the stacksize explicitly. Qt defaults to maximum stack size possible which is 80kB. You halved that with your 40kB statement.
> 
> good news:
> Tested this on upcoming 4.7.2 and QtWebkit 2.1 and it doesn't crash anymore.
> bad news:
> Running the same sis on 4.7.1 indeed crashes and looks like there is something eating the stack. If I increase the stack back to maximum I get little bit further. Unfortunately I don't have any workarounds to offer, Anomaly that comes with the release does work and I have a bad feeling I know why yours doesn't. Problem is that Symbian specific QtWebkit.sis is a random snapshot of the repo and is not exactly what is in the release.
> 
> I'll test this a bit more to make sure GCCE isn't the culprit, but for now I say not much else is there to do than to wait for official Symbian^3 release of Qt 4.7.x.
Comment 12 Janne Koskinen 2011-02-03 07:23:09 PST
GCCE isn't the problem. It is showMaximized() that causes this.
Here is a workaround, call showFullScreen() instead. this is why Anomaly works and your example doesn't.
Comment 13 Janne Koskinen 2011-02-08 06:18:29 PST
The issue is BC break with Qt 1.1 SDK and the binaries installed.

I created issue about the BC break http://bugreports.qt.nokia.com/browse/QTSDK-511 , so you can do follow up.