+2009-10-05 Zoltan Varga <vargaz@gmail.com>
+
+ * domain.c (mono_init_internal): Print a useful error message when encountering
+ an old mscorlib, instead of crashing. Fixes #544307.
+
2009-10-04 Zoltan Varga <vargaz@gmail.com>
* appdomain.c (copy_app_domain_setup): Fix a warning.
mono_defaults.internal_thread_class = mono_class_from_name (
mono_defaults.corlib, "System.Threading", "InternalThread");
- g_assert (mono_defaults.internal_thread_class != 0);
+ if (!mono_defaults.internal_thread_class) {
+ /* This can happen with an old mscorlib */
+ fprintf (stderr, "Corlib too old for this runtime.\n");
+ fprintf (stderr, "Loaded from: %s\n",
+ mono_defaults.corlib? mono_image_get_filename (mono_defaults.corlib): "unknown");
+ exit (1);
+ }
mono_defaults.appdomain_class = mono_class_from_name (
mono_defaults.corlib, "System", "AppDomain");