QFontDialog causing FileFormatException
-
Hi, whenever the
QFontDialog::getFont()
is opened for the first time it causes an error:Exception thrown at 0x00007FFBF86D531C in LogViewer_Standalone.exe: Microsoft C++ exception: FileFormatException at memory location 0x000000B3BECF02B0.
Exception thrown at 0x00007FFBF86D531C in LogViewer_Standalone.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.I am unable to understand why is this happening and searching for this did not produce any results. Any ideas?
-
Hi, whenever the
QFontDialog::getFont()
is opened for the first time it causes an error:Exception thrown at 0x00007FFBF86D531C in LogViewer_Standalone.exe: Microsoft C++ exception: FileFormatException at memory location 0x000000B3BECF02B0.
Exception thrown at 0x00007FFBF86D531C in LogViewer_Standalone.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.I am unable to understand why is this happening and searching for this did not produce any results. Any ideas?
-
Hi, whenever the
QFontDialog::getFont()
is opened for the first time it causes an error:Exception thrown at 0x00007FFBF86D531C in LogViewer_Standalone.exe: Microsoft C++ exception: FileFormatException at memory location 0x000000B3BECF02B0.
Exception thrown at 0x00007FFBF86D531C in LogViewer_Standalone.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.I am unable to understand why is this happening and searching for this did not produce any results. Any ideas?
@CJha I also run in this problem and debugged a little. The reason is in my case a dynamic loaded otf-font (with QFontDatabase::addApplicationFont). When this font-family is used in a QFont and with setFont to a widget - strangely not with all widgets, but e.g. QTableWidget is one that triggers it always - this exception is thrown, or better, is shown in the output window.
Nevertheless, everything is working as expected, the loaded font is used in the widget and the exception doesn't break the application. You also cannot catch it with "try" (it doesn't branch into the catch-path), so I think it is more a kind of warning.And even stranger: when you install the font and use it from system instead loading it from a file, there is no such exception, so I expect the font loading engine doesn't like something in the font file. I tested around and all font files I downloaded from the net force this behaviour.