You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Application crashes with "Parent class failed to load, due to: Invalid generic instantiation assembly" #71424
Hello, we are developing DevExpress .NET MAUI controls and experienced crashes when trying to run our DevExpress.Data library on real iPhone. It seems that the issue related to iOS linker. This issue doesn't appear on Xamarin.Forms and doesn't appear on android or iOS simulator.
It's severe for us because we can't run full-functionality DataGrid without DevExpress.Data library.
Thanks
Steps to Reproduce
Please contact David Ortinau and Jonathan Dick to download the ZIP archive with the sample reproducing the issue- we emailed them this repro info, because we cannot make it public here. Alternatively, please email [email protected] and we will share the attachment with you directly.
Activity
PureWeen commentedon Jun 22, 2022
@rolfbjarne
rolfbjarne commentedon Jun 27, 2022
I can reproduce this with the provided test case, I'll look into what's happening
rolfbjarne commentedon Jun 29, 2022
This is weird, but I believe it's a runtime bug, and whatever the linker does just exposes that runtime bug, because:
This is the class hierarchy that fails to load:
A couple this I've tried that can randomly change the results:
TransformBuilder2with exactly the same base class. Now bothTransformBuilderandTransformBuilder2work...TransformBuilderwith dummy implementations that just throw an exception.I debugged in lldb, and this is what I've found:
The error message:
comes from here:
runtime/src/mono/mono/metadata/class-init.c
Line 2948 in 705ec75
Debugging in lldb reveals that the check fails here:
runtime/src/mono/mono/metadata/verify.c
Lines 120 to 122 in 705ec75
And that happens because the
mono_class_has_parentcheck fails here, when I believe it should succeed:runtime/src/mono/mono/metadata/class.c
Lines 4314 to 4315 in 705ec75
At the entry to
mono_class_has_parent, this is what inspection of the two arguments and their class hierarchy shows:and this is the candidate MonoClass:
In particular notice how
candidate->supertypes[1] != target->supertypes[1]Here's a dump of both in case that's helpful: https://gist.github.com/rolfbjarne/4b5cb4c4d6baa59ac2ef310c1b32491f
I'm not really sure what's going on here, but this looks like a runtime bug to me, so I've moved it here.
rolfbjarne commentedon Jun 29, 2022
CC @vargaz @steveisok @akoeplinger
12 remaining items
rolfbjarne commentedon Jun 30, 2022
I've sent repro case privately.
vargaz commentedon Jul 4, 2022
What is the stacktrace when the failure happens ?
rolfbjarne commentedon Jul 4, 2022
@vargaz https://gist.github.com/rolfbjarne/5c5ece64ceadc848ffa55a37c1bb6aaa
[mono] Avoid calling mono_metadata_type_hash () on the container clas…
[mono] Avoid calling mono_metadata_type_hash () on the container clas…
[mono] Avoid calling mono_metadata_type_hash () on the container clas…