Bug 2593 - Assertion in GetType() method
Summary: Assertion in GetType() method
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2011-12-21 02:37 UTC by Nikita Kareev
Modified: 2012-07-01 16:54 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Nikita Kareev 2011-12-21 02:37:34 UTC
I have a following code:

foreach (var entityComponent in _components)
    string ctypename = entityComponent.GetType().ToString();

And it sometimes crashes with this stacktrace: 

12-20 13:29:13.629: A/(26294): * Assertion: should not be reached at ../../../../mono/metadata/sgen-scan-object.h:109
12-20 13:29:13.629: I/mono(26294): Stacktrace:
12-20 13:29:13.629: I/mono(26294):   at System.MonoType.ToString () <0x0001b>
Comment 1 Jonathan Pryor 2012-07-01 16:33:07 UTC
Does this still fail on 4.2.3?

This is a GC-related bug. We'll need a complete project with execution instructions in order to track this down.

 - Jon
Comment 2 Nikita Kareev 2012-07-01 16:50:48 UTC
No, it's fixed. It was related to another GC bug, which was fixed a few months ago, so this ticked should also be closed. Bug #2594 is also the same bug and should be closed.  

Comment 3 Jonathan Pryor 2012-07-01 16:54:02 UTC