Details
-
Bug
-
Resolution: Cannot Reproduce
-
P1: Critical
-
5.2.1, 5.3.0 Alpha
-
Windows
-
d16508a285a5423ae9a5034e969801bce74ffb98, 909b0de5d16f2af3b3d6a3ca4c7e53b84836ad37
Description
This is on windows only.
Use the attached application to reproduce the problem .
Click on More Information to load the second page.
While the page is loading pull out the network connection or switch off the wifi.
The application crashes.
This is hard to reproduce as it generally happens with poor internet connection.
The crash log is attached.
Using a debug statement as below shows that when it is crashed, one of the fontdata's loaded has wrong size compared with the correct loading.
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -215,7 +215,7 @@ namespace { TableDirectory *nameTableDirectoryEntry = tableDirectoryEntry("name"); if (nameTableDirectoryEntry == 0) return QString(); - + qDebug()<<"Changing "<< newFamilyName << m_fontData.size(); QString oldFamilyName = familyName(nameTableDirectoryEntry);
Checking of Null or trailing with \O doesn't help
--- a/Source/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp +++ b/Source/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp @@ -28,6 +28,7 @@ #include "WOFFFileFormat.h" #endif #include <QStringList> +#include <QDebug> namespace WebCore { @@ -55,6 +56,9 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer) #endif // USE(ZLIB) const QByteArray fontData(buffer->data(), buffer->size()); + if(fontData.isNull() || !fontData.endsWith("\0")) + return 0; + qDebug()<<"Font Data Size : "<<fontData.size(); #if !USE(ZLIB) if (fontData.startsWith("wOFF")) { qWarning("WOFF support requires QtWebKit to be built with zlib support.");
Attachments
Issue Links
- relates to
-
QTBUG-36573 Font loaded from network crashes application on quit
-
- Closed
-
-
QTBUG-37710 Qt Webkit Access Violation on Staples.com
-
- Closed
-
- replaces
-
QTBUG-39028 Crash while loading a webpage
-
- Closed
-
-
QTBUG-38356 Crash with webview while loading fonts.
-
- Closed
-
-
QTBUG-38433 Windows font engine does not handle invalid data gracefully / qwebpage crashes when viewing www.asda.com
-
- Closed
-
-
QTBUG-38560 Windows: Font with empty name string not handled.
-
- Closed
-