Dynamic Proxy issue 115

3 views
Skip to first unread message

Krzysztof Koźmic

unread,
Oct 11, 2009, 5:41:38 PM10/11/09
to castle-pro...@googlegroups.com
I spent better time of the weekend trying to get to the bottom of this
issue,
http://support.castleproject.org/projects/DYNPROXY/issues/view/DYNPROXY-ISSUE-115
There's a backlog of my "progress" with the issue, along with some
unanswered questions.

I think I may have found the cause of it, but I'd like someone else to
take a look at it, and verify I'm not insane until I start digging in
the actual code.

Thanks in advance,

Krzysztof

krzysztof.vcf

Fabian Schmied

unread,
Oct 12, 2009, 5:08:34 AM10/12/09
to castle-pro...@googlegroups.com
I've reviewed your sample and experimented a little on my own, and
here are my findings (mostly reflecting your own):

- It's definitely a (.NET/debugger) bug related to in-memory
assemblies. If you reference the saved assembly from disk, the
exception doesn't occur.
- It seems that in order for the bug to appear, you need a combination
of nested generic types, generic methods, type initializers, and type
constraints.
- The bug occurs with differenct combinations of the above, depending
on the order of emitted items. As your last example shows, it even
goes so far that a successfully emitted type may trigger the bug for
the next emitted nested type.

I think, there's probably some internal metadata structure being
corrupted. As you say, we could switch to non-nested types, but it's
still a bug that should be fixed. If you report it on Connect (include
your sample code in the bug report! that makes a fix much more likely)
and post the link here so that we can vote for it.

Cheers,
Fabian

> >
>

Krzysztof Koźmic

unread,
Oct 12, 2009, 2:24:22 PM10/12/09
to castle-pro...@googlegroups.com
I checked with Visual Studio 2010 and all the tests pass with debugger
attached, which means they fixed the issue.
As such I'm closing DP-115 as won't fix. The workaround is to upgrade to
VS10 :)

José F. Romaniello

unread,
Oct 12, 2009, 2:37:06 PM10/12/09
to castle-pro...@googlegroups.com
nice! I will take a look!
thank you.

2009/10/12 Krzysztof Koźmic <krzyszto...@gmail.com>
Reply all
Reply to author
Forward
0 new messages