| Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 1 | |
Hi,
The attached example crashed QtWebKit.
Seems that calling setHtml() in a slot connected to unsupportedContent() leads to a crash
Any ideas what might be going wrong ?
Qt 4.4 beta, Debian testing, g++ 4.2.3
Here's how I compiled the attached file:
export PKG_CONFIG_PATH=/home/mohammed/qt4/lib/pkgconfig/
export PATH=/home/mohammed/qt4/bin/:$PATH
moc webkit_crash.cc > webkit_crash.cpp
g++ -o webkit webkit_crash.cc `pkg-config QtWebKit QtCore QtGui --cflags --libs` -Wl,-rpath /home/mohammed/qt4/lib/
./webkit
clicking "Crash me :(" leads to a crash.
Cheers,
--
[ signature omitted ]
#include <qobject.h>
#include <qapplication.h>
#include <qwebview.h>
#include <qmainwindow.h>
#include <qwebpage.h>
class WebView : public QWebView {
Q_OBJECT
public:
WebView() {
setHtml(QString("<a href=\"file:///home\">Crash me :(</a>"));
page()->setForwardUnsupportedContent(true);
QObject::connect(page(), SIGNAL(unsupportedContent(QNetworkReply *)), SLOT(handleUnsupportedContent(QNetworkReply *)));
}
public slots:
void handleUnsupportedContent(QNetworkReply *reply) {
setHtml(QString("Bye!"));
}
};
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
WebView v;
v.show();
return a.exec();
}
#include "webkit_crash.cpp"
Attachment:
Attachment:
signature.asc
Attachment:
signature.asc
Attachment:
signature.asc
Description: Digital signature
Message 2 in thread
On Thursday 13 March 2008 16:34:05 Mohammed Sameer wrote:
> Hi,
>
> The attached example crashed QtWebKit.
> Seems that calling setHtml() in a slot connected to unsupportedContent()
> leads to a crash
Yes, the beta1 had this crash and it was fixed on the 5th of March [1] so any
more recent snapshot should have this fixed. I assume you want to display
error messages inline as HTML. Is that right? I wonder if these pages end up
in the history, I assume they do.
z.
[1]
http://code.staikos.net/cgi-bin/gitweb.cgi?p=webkit;a=commit;h=d07298f512b168975b7bf84c1000ef2398aca1ab
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx
Message 3 in thread
On Fri, Mar 14, 2008 at 12:09:31AM +0100, Holger Freyther wrote:
> On Thursday 13 March 2008 16:34:05 Mohammed Sameer wrote:
> > Hi,
> >
> > The attached example crashed QtWebKit.
> > Seems that calling setHtml() in a slot connected to unsupportedContent()
> > leads to a crash
>
> Yes, the beta1 had this crash and it was fixed on the 5th of March [1] so any
> more recent snapshot should have this fixed. I assume you want to display
> error messages inline as HTML. Is that right? I wonder if these pages end up
> in the history, I assume they do.
Thanks Benjamin and Holger!
Actually, I'm writing a Qt4/QtWebKit based browser so I'm trying to
implement error pages, FTP handling and local directories browsing!
Problem with the git repository is I can only access it from home.
Is there an HTTP gateway ?
Cheers,
--
[ signature omitted ]
Description: Digital signature
Message 4 in thread
On Friday 14 March 2008 00:23:09 Mohammed Sameer wrote:
> Problem with the git repository is I can only access it from home.
> Is there an HTTP gateway ?
I do not know if code.staikos.net has it running but there is a repo.or.cz
mirror of a mirror [1] and it has http support. It is getting the webkit copy
from the labs repository, which is mirroring the code.staikos.net one.
z.
[1] http://repo.or.cz/w/webkit-qt.git
>
> Cheers,
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx
Message 5 in thread
On Fri, Mar 14, 2008 at 01:10:09AM +0100, Holger Freyther wrote:
> On Friday 14 March 2008 00:23:09 Mohammed Sameer wrote:
>
> > Problem with the git repository is I can only access it from home.
> > Is there an HTTP gateway ?
>
> I do not know if code.staikos.net has it running but there is a repo.or.cz
> mirror of a mirror [1] and it has http support. It is getting the webkit copy
> from the labs repository, which is mirroring the code.staikos.net one.
>
> z.
>
>
> [1] http://repo.or.cz/w/webkit-qt.git
That's great. Really many thanks!
--
[ signature omitted ]
Description: Digital signature