Gtk_print_run_page_setup_dialog problem on Windows 11

I have a problem with gtk_print_run_page_setup_dialog on Windows 11/x86_64. To add to the complexity, I am using GTK4 with Haskell (latest package gi-gtk-4.0.12). The underlying MSYS2 library is mingw-w64-x86_64-gtk4 4.16.12-2.

The problem is as follows. With this simple code:

onPageSetupButtonClicked :: IO ()
onPageSetupButtonClicked = do
  pageSetup <- Gtk.pageSetupNew
  printSettings <- Gtk.printSettingsNew
  void $ Gtk.printRunPageSetupDialog (Just window) (Just pageSetup) printSettings

when the button is clicked, a page setup dialog is displayed:

but also an error message is sent to the console:

(gtk-print.EXE:32248): GLib-CRITICAL **: 22:37:31.401: g_utf8_to_utf16: assertion 'str != NULL' failed

I would, at least, like to understand if this is a Haskell-only problem by understanding if others can get this simple example to work on their Windows 11 platform.