[gtkmm] Uncaught exception: gtkmm-2.4 and win32



Wondering if anyone else has run into this. The enclosed test case attempts to load a non-existent icon using Gtk::IconTheme::load_icon().

Running on x86 Gentoo, gcc 3.3.4, no problem - it catches an exception of type Glib::Exception and exits normally.

Running on cygwin Win32, gcc 3.3.1 (cygming special), and using the excellent "gtkmm Developer Environment 2.4.5 for Mingw" from http://www.pcpm.ucl.ac.be/~gustin/win32_ports/, it does not catch any exception, and displays a dialog box "This application has requested the Runtime to terminate it in an unusual way" and terminates, despite the catch(...) block.

Anybody have any thoughts?

Cheers,
Tim Shead

#include <gtkmm/icontheme.h>
#include <gtkmm/main.h>

#include <iostream>

int main(int argc, char* argv[])
{
	Gtk::Main gtk_main(argc, argv);

	Glib::RefPtr<Gtk::IconTheme> theme = Gtk::IconTheme::create();

	try
		{
			theme->load_icon("bull", 24, Gtk::ICON_LOOKUP_USE_BUILTIN);
		}
	catch(Glib::Exception& e)
		{
			std::cerr << "Glib::Exception: " << e.what() << std::endl;
		}
	catch(Glib::Error& e)
		{
			std::cerr << "Glib::Error: " << e.what() << std::endl;
		}
	catch(...)
		{
			std::cerr << "Unknown exception" << std::endl;
		}

	return 0;
}




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]