WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
38759
[Qt] Initializing the icon database twice in a row raise an assert
https://bugs.webkit.org/show_bug.cgi?id=38759
Summary
[Qt] Initializing the icon database twice in a row raise an assert
Jocelyn Turcotte
Reported
2010-05-07 09:38:01 PDT
Created
attachment 55387
[details]
Test app See the attached test for a common possible case: QWebSettings::enablePersistentStorage(); QWebSettings::globalSettings()->setIconDatabasePath("."); When we call QWebSettings::setIconDatabasePath() we don't make sure that the icon database has been closed before opening it again. There is protection for that in IconDatabase::open() by checking if the sqlite database is open, however it don't work here since the state only change when the database is opened on the spawned thread. I don't know what happens in release, there might be an opened sqlite database on the first path specified to setIconDatabasePath. Reproduced on MSVC2008.
Attachments
Test app
(518 bytes, application/octet-stream)
2010-05-07 09:38 PDT
,
Jocelyn Turcotte
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2010-11-10 06:54:55 PST
Works for me. Your example crashes because there is no QApplication instance so threads are not working properly. By changing it to: #include <QApplication> #include <QWebSettings> int main(int argc, char** argv) { QApplication app(argc, argv); QWebSettings::enablePersistentStorage(); QWebSettings::globalSettings()->setIconDatabasePath("."); return 0; } Everything works for me.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug