Bug 319936 (MONO77134) - Problem with events in generic classes.
Summary: Problem with events in generic classes.
Status: RESOLVED MOVED
Alias: MONO77134
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-01 01:23 UTC by Peter Johanson
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Tarball with test files and simple makefile (916 bytes, application/x-compressed-tar)
2006-01-01 01:24 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:43:10 UTC


---- Reported by latexer@gentoo.org 2005-12-31 18:23:15 MST ----

There seems to be a runtime problem with events in generic classes. Generic
classes seem to be generated properly, but the runtime seems unable to
actually find the event for the class after that. As a result gmcs spits
some odd errors about the visibility of the event, etc usually, which is
actually a result of the generated backing field being the only item with
the name found for the class, e.g. class Foo<T> has an event "Ev", which
results in the event and the field "Ev" created, but only the private field
"Ev" is seen by the compiler, so it warns about it not being visible.

I will attach a small tarball that demonstrates the problem, with both the
non-generic and generic classes. monodis seems to show everything generated
properly for the classes. One works compiled with gmcs, one doesn't. This
has been tested both with mono-1.1.10.1 and mono-1.1.12.1. I've not had a
chance to test with SVN mono.

In trying to debug this, I think I tracked down the problem to
mono/metadata/metadata.c:3448 in the function
mono_metadata_events_from_typedef. The bsearch seems to fail, so no table
indexes are returned. I don't know the runtime internals well enough to
even begin to ponder *why* this might be the case, how to debug further, etc.



---- Additional Comments From latexer@gentoo.org 2005-12-31 18:24:31 MST ----

Created an attachment (id=169029)
Tarball with test files and simple makefile




---- Additional Comments From martin@ximian.com 2006-01-09 05:48:07 MST ----

Post-GUAM bug-fixing pass; week #2/2006.



---- Additional Comments From martin@ximian.com 2006-01-10 17:08:44 MST ----



*** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO76440 ***

Imported an attachment (id=169029)

Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>Gentoo Linux</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".
This bug was marked DUPLICATE in the database it was moved from.
    Changing resolution to "MOVED"