Bug 57414

Summary: [Qt] segfault on javascript alert()
Product: WebKit Reporter: Thijs <ttf11>
Component: WebKit QtAssignee: Ademar Reis <ademar>
Status: RESOLVED FIXED    
Severity: Normal CC: ademar, benjamin, jturcotte, kling, menard, wolfram
Priority: P3 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
URL: http://developer.qt.nokia.com/forums/viewthread/4760/
Bug Depends on:    
Bug Blocks: 54202    

Description Thijs 2011-03-29 19:02:16 PDT
Full bug report (including nice formatting + stack trace) here:
http://developer.qt.nokia.com/forums/viewthread/4760/

Summary: very simple demo application crashes after clicking the button on a javascript alert().
I'm using Qt Creator 2.1.0 (based on Qt 4.7.1 / 32 bit, Windows XP)). It's QtWebKit version is supposedly based on SVN version 56441, so I'm not sure which version to pick exactly.
Comment 1 Benjamin Poulain 2011-03-30 04:47:07 PDT
Confirming the P1 since it is a crash.

You are adding a blocking call in the frame loader, this is really nasty way of doing JavaScript, but that should not crash.
Comment 2 Andreas Kling 2011-03-30 12:16:54 PDT
Is this reproducible with WebKit trunk?
Comment 3 Thijs 2011-03-30 18:48:22 PDT
(In reply to comment #1)
> You are adding a blocking call in the frame loader, 
> this is really nasty way of doing JavaScript, but that should not crash.
Yes, it's mostly for testing, but I can imagine this situation will also happen in our product.

(In reply to comment #2)
> Is this reproducible with WebKit trunk?
Yesterday and today I'm trying to build QtWebKit 2.1 and/or WebKit from trunk. I'm not a Windows developer, so learning how to setup my environment & build everything from source is taking some time. If/when I get them compiled, I will try again.
Comment 4 Benjamin Poulain 2011-03-31 04:19:37 PDT
> (In reply to comment #2)
> > Is this reproducible with WebKit trunk?
> Yesterday and today I'm trying to build QtWebKit 2.1 and/or WebKit from trunk. I'm not a Windows developer, so learning how to setup my environment & build everything from source is taking some time. If/when I get them compiled, I will try again.

In case you have not seen it yet, here is the doc to build WebKit trunk on Windows: http://trac.webkit.org/wiki/BuildingQtOnWindows


Jocelyn, would you have a recent build to test this?
Comment 5 Jocelyn Turcotte 2011-03-31 08:14:49 PDT
(In reply to comment #4)
> > (In reply to comment #2)
> > > Is this reproducible with WebKit trunk?
> > Yesterday and today I'm trying to build QtWebKit 2.1 and/or WebKit from trunk. I'm not a Windows developer, so learning how to setup my environment & build everything from source is taking some time. If/when I get them compiled, I will try again.
> 
> In case you have not seen it yet, here is the doc to build WebKit trunk on Windows: http://trac.webkit.org/wiki/BuildingQtOnWindows
> 
> 
> Jocelyn, would you have a recent build to test this?

Loading the html with qttestbrowser on trunk doesn't crash.
Comment 6 Benjamin Poulain 2011-03-31 08:20:46 PDT
> Loading the html with qttestbrowser on trunk doesn't crash.

Reducing the priority since this is already fixed in trunk.
Comment 7 Alexis Menard (darktears) 2011-03-31 09:20:56 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > > (In reply to comment #2)
> > > > Is this reproducible with WebKit trunk?
> > > Yesterday and today I'm trying to build QtWebKit 2.1 and/or WebKit from trunk. I'm not a Windows developer, so learning how to setup my environment & build everything from source is taking some time. If/when I get them compiled, I will try again.
> > 
> > In case you have not seen it yet, here is the doc to build WebKit trunk on Windows: http://trac.webkit.org/wiki/BuildingQtOnWindows
> > 
> > 
> > Jocelyn, would you have a recent build to test this?
> 
> Loading the html with qttestbrowser on trunk doesn't crash.

Well it has to be on a server no? I believe loading local file triggers a different path and the report says it was on a server.
Comment 8 Benjamin Poulain 2011-03-31 09:35:23 PDT
(In reply to comment #7)
> Well it has to be on a server no? I believe loading local file triggers a different path and the report says it was on a server.

Good point, here is the test case: http://chaos.troll.no/~poulain/57414/ (trunk does not crash for me on Linux)
Comment 9 Jocelyn Turcotte 2011-03-31 09:37:05 PDT
(In reply to comment #8)
> (In reply to comment #7)
> > Well it has to be on a server no? I believe loading local file triggers a different path and the report says it was on a server.
> 
> Good point, here is the test case: http://chaos.troll.no/~poulain/57414/ (trunk does not crash for me on Linux)

Doesn't crash on Windows neither.
Comment 10 Alexis Menard (darktears) 2011-03-31 09:50:29 PDT
Ademar what you want to do from that bug?
Comment 11 Ademar Reis 2011-04-11 11:36:50 PDT
(In reply to comment #10)
> Ademar what you want to do from that bug?

I'm not sure yet. :P

I'm inclined to close it as FIXED (since it's fixed on trunk), but since it's a crash with a proper testcase, I'll keep it open until I finish my current list of pending issues, then I'll revisit it.
Comment 12 Ademar Reis 2011-04-12 06:03:26 PDT
Closing the bug as fixed and adding it to the qtwebkit-2.0 maintainance bug to keep track of it.
Comment 13 Thijs 2011-04-13 00:53:18 PDT
I just wanted to let you know that after upgrading to QtWebKit branch 2.1 (I finally got it to compile on Linux!) this was also solved for me. Good news it's also solved in the 2.0 trunk already!
Comment 14 Ademar Reis 2011-04-13 05:36:04 PDT
(In reply to comment #13)
> I just wanted to let you know that after upgrading to QtWebKit branch 2.1 (I finally got it to compile on Linux!) this was also solved for me. Good news it's also solved in the 2.0 trunk already!

Unfortunately it has not been fixed in 2.0. It's marked as a blocker, so it's a candidate for a future maintainance release, but the fix is not in the branch yet.
Comment 15 wolfy 2012-08-01 02:11:41 PDT
Could anybody reopen this? 

This bug appeared again in QT 4.8.1 and 4.8.2.