Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QFontDialog causing FileFormatException
Forum Updated to NodeBB v4.3 + New Features

QFontDialog causing FileFormatException

Scheduled Pinned Locked Moved Unsolved General and Desktop
qfontdialog
3 Posts 3 Posters 427 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CJhaC Offline
    CJhaC Offline
    CJha
    wrote on last edited by
    #1

    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?

    C C 2 Replies Last reply
    0
    • CJhaC CJha

      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?

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @CJha Qt does not use or throw C++ exceptions, so this is almost certainly coming from your code. You should run a debug build of your program in a debugger and inspect the backtrace to find a starting point in your code.

      1 Reply Last reply
      2
      • CJhaC CJha

        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?

        C Offline
        C Offline
        Chamile
        wrote on last edited by
        #3

        @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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved