CacheOverflowException in pangomm

Happy new year.
I want to start with gtkmm on windows/linux development and port/move my application from Qt to gtkmm.

When I try to build the hello world example (Chapter 3. Basics)

class MyWindow : public Gtk::Window
{
public:
    MyWindow();
};

MyWindow::MyWindow()
{
    set_title("Basic application");
    set_default_size(200, 200);
}

int main(int argc, char* argv[])
{
    auto app = Gtk::Application::create("org.gtkmm.examples.base");

    return app->make_window_and_run<MyWindow>(argc, argv);
}

and I get CacheOverflowException
at hr = font->CreateFontFace (&face); in pangowin32-dwrite-fontmap.cpp

static IDWriteFontFace *
_pango_win32_get_dwrite_font_face_from_dwrite_font (IDWriteFont *font)
{
  IDWriteFontFace *face = NULL;
  HRESULT hr;

  g_return_val_if_fail (font != NULL, NULL);

  hr = font->CreateFontFace (&face);
  if (SUCCEEDED (hr) && face != NULL)
    return face;

  g_warning ("IDWriteFont::CreateFontFace failed with error code %x\n", (unsigned)hr);
  return NULL;
}

I am running on Windows 11, with vcpgk with latest updates (gtkmm 4.14, pangomm 2.50.1)

Can someone has any ideas why this is happening

Hi @xumepoc, happy new year to you as well!

Windows structured exceptions are sometimes used internally by Direct2D / DirectWrite as a signalling mechanism. See:

Does the debugger stop execution when detecting the exception, or does it just print a message?

Luca

Hi,
The debugger was stopping the execution, but after your post I checked the exception settings in Visual Studio and the option <All C++ exceptions not in this list> was ticked :slight_smile: Removing it solved the problem, there are still messages for the exception in the output window, but the program runs :slight_smile:

Thank you for the reply and the “idea” :slightly_smiling_face:

1 Like