//
// Initial testcase for bug #535295
//
// This doesn't crash consistently. But, compile and execute with this:
//
// 	gcc crash-test.c -std=c99 `pkg-config --libs --cflags gthread-2.0 gtk+-2.0` \
// 		-o crash-test && for i in $(seq 1 100); do echo $i; ./crash-test; done
//
// and on my system (ubuntu hardy - glib 2.16.3, gtk+ 2.12.9) this produces a bunch of:
// 
// 	GLib-GObject-ERROR **: g_type_plugin_*() invalidly modified type `GFileInfo'
//	aborting...
//	Aborted
//	
// and occasionally:
//
//	(crash-test:14553): GLib-GObject-WARNING **: IA__g_object_new_valist: object class `GThemedIcon' has no property named `names'
//
//	(crash-test:14553): GLib-GIO-CRITICAL **: g_themed_icon_constructed: assertion `themed->names != NULL && themed->names[0] != NULL' failed
//
//	(crash-test:14553): GLib-CRITICAL **: g_strv_length: assertion `str_array != NULL' failed
//
//	(crash-test:14553): GLib-GObject-WARNING **: IA__g_object_notify: object class `GThemedIcon' has no property named `names'
//
//  
// Sam Thursfield
// 

#include <gtk/gtk.h>

int main(int argc, char **argv) {
	// Comment out this line and the crashing stops.
	g_thread_init(NULL);

	gtk_init(&argc, &argv);

	// Any file chooser action gives the same result and any GtkFileChooser
	// gives the same result.
	//
	GtkWidget *filechooserbutton=gtk_file_chooser_button_new("title", GTK_FILE_CHOOSER_ACTION_OPEN);
//	GtkWidget *filechooserdialog=gtk_file_chooser_dialog_new("title", NULL, GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER, NULL);
//	GtkWidget *filechooserwidget=gtk_file_chooser_widget_new(GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER);
	return 0;	
};
