[Mono-devel-list] Segmentation fault in mono_class_from_name

Torstensson, Patrik patrik.torstensson at intel.com
Wed Jun 23 17:59:16 EDT 2004


I had the same problem and that was related to an old system.dll being
in the path, therefore the process failed to load system assembly
correctly (didn't have time to debug why it didn't warn me correctly.).

 Can you check if you have any system.dll in the path and in that case
just temporary removing them to check if that solves the problem.

Maybe this is an issue with system.dll being both in path and GAC.

-- Patrik

-----Original Message-----
From: mono-devel-list-admin at lists.ximian.com
[mailto:mono-devel-list-admin at lists.ximian.com] On Behalf Of Kamil
Skalski
Sent: den 23 juni 2004 23:36
To: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-devel-list] Segmentation fault in
mono_class_from_name

Wednesday 23 June 2004 22:28, Kamil Skalski wrote:
> Wednesday 23 June 2004 21:48, Paolo Molaro wrote:
> > Are you sure that image is non-NULL? What is image->ref_count if
it's
> > not NULL?
>
> You are right, image pointer is null... But why for the following code
>
> 	g_message(G_GNUC_PRETTY_FUNCTION ": monoclasstep 3: %d", enter);
> 	nspace_table = g_hash_table_lookup (image->name_cache,
name_space);
> 	g_message(G_GNUC_PRETTY_FUNCTION ": monoclasstep 4: %d", enter);
>
> ** Message: : monoclasstep 3: 22788
> occurs, but
> ** Message: : monoclasstep 4: 22788
> doesn't before crash (is g_hash_table_lookup a macro inlining return
or
> this segfault is really occuring inside lookup?)
>
> Anyway, crash occurs inside mono_class_from_name, because
> 	g_message(G_GNUC_PRETTY_FUNCTION ": famstep 1");
> 	socket_class = mono_class_from_name (system_assembly,
> 					     "System.Net.Sockets",
"Socket");
> 	g_message(G_GNUC_PRETTY_FUNCTION ": famstep 2");
>
> it never get to famstep 2

Ergh, of course if image is NULL, image -> name_case is causing
segfault... 
So how is it possible that system_assembly is NULL here? I assume this
is not 
a valid state, so I need to debug why it is not properly initialized...

Kamil Skalski
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list