Bug 35970 - Abort: Assertion at /Users/builder/data/lanes/2098/3efa14c4/source/mono/mono/metadata/class.c:5078, condition `class' not met
Summary: Abort: Assertion at /Users/builder/data/lanes/2098/3efa14c4/source/mono/mono/...
Status: RESOLVED DUPLICATE of bug 34239
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 6.0.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: João Matos
URL:
Depends on:
Blocks:
 
Reported: 2015-11-17 22:44 UTC by ydang
Modified: 2015-12-01 21:24 UTC (History)
7 users (show)

Tags: BZCU
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:
Status:
RESOLVED DUPLICATE of bug 34239

Description ydang 2015-11-17 22:44:10 UTC
I use xamarin for visual studio 2013 to develop android apps. My xamarin version is 5.10(build 871)

For my app, the compile is ok, but when app is launching, the it crashed! I deeply invested this issue, and I found maybe is a KeyPress EventHandler issue. Because in my app, I attached a KeyPress to EditText. When I comment out this code everything is ok!

So I guess this issue can easily be reproduced.
I hope I offer you enough information for your investigation this issue. I really hope you can help me and other developers to fix this problem as soon as possible. Or an alternative solution can be introduced for us.
Thanks a lot 

Here is my output log:

1-18 03:30:32.414 I/dalvikvm(  642): Wrote stack traces to '/data/anr/traces.txt'
11-18 03:30:32.424 D/Mono    (  642): Assembly Loader probing location: '/mnt/sdcard/Android/data/InductionAndroid.InductionAndroid/files/.__override__/mscorlib.dll'.
11-18 03:30:32.484 D/Mono    (  642): Image addref mscorlib[0x1236a0] -> /mnt/sdcard/Android/data/InductionAndroid.InductionAndroid/files/.__override__/mscorlib.dll[0x11c120]: 2
11-18 03:30:32.484 D/Mono    (  642): AOT module '/mnt/sdcard/Android/data/InductionAndroid.InductionAndroid/files/.__override__/mscorlib.dll.so' not found: Cannot load library: load_library[1091]: Library '/data/data/InductionAndroid.InductionAndroid/lib/libaot-mscorlib.dll.so' not found
11-18 03:30:32.494 D/Mono    (  642): AOT module '/Users/builder/data/lanes/2098/3efa14c4/source/monodroid/builds/install/mono-armv7/lib/mono/aot-cache/arm/mscorlib.dll.so' not found: Cannot load library: load_library[1091]: Library '/data/data/InductionAndroid.InductionAndroid/lib/libaot-mscorlib.dll.so' not found
11-18 03:30:32.494 D/Mono    (  642): Assembly Loader loaded assembly from location: '/mnt/sdcard/Android/data/InductionAndroid.InductionAndroid/files/.__override__/mscorlib.dll'.
11-18 03:30:32.494 D/Mono    (  642): Config attempting to parse: '/mnt/sdcard/Android/data/InductionAndroid.InductionAndroid/files/.__override__/mscorlib.dll.config'.
11-18 03:30:32.494 D/Mono    (  642): Config attempting to parse: '/Users/builder/data/lanes/2098/3efa14c4/source/monodroid/builds/install/mono-armv7/etc/mono/assemblies/mscorlib/mscorlib.config'.
11-18 03:30:32.604 F/        (  642): * Assertion at /Users/builder/data/lanes/2098/3efa14c4/source/mono/mono/metadata/class.c:5078, condition `class' not met
11-18 03:30:32.604 E/mono-rt (  642): 
11-18 03:30:32.604 E/mono-rt (  642): Attempting native Android stacktrace:
11-18 03:30:32.604 E/mono-rt (  642): 
11-18 03:30:32.604 E/mono-rt (  642): 	Could not unwind with `libunwind.so`: Cannot load library: load_library[1091]: Library '/data/data/InductionAndroid.InductionAndroid/lib/libunwind.so' not found
11-18 03:30:32.604 E/mono-rt (  642): 	Could not unwind with `libcorkscrew.so`: Cannot load library: load_library[1091]: Library '/data/data/InductionAndroid.InductionAndroid/lib/libcorkscrew.so' not found
11-18 03:30:32.604 E/mono-rt (  642): 
11-18 03:30:32.604 E/mono-rt (  642): 	No options left to get a native stacktrace :-(
11-18 03:30:32.604 E/mono-rt (  642): 
11-18 03:30:32.604 E/mono-rt (  642): =================================================================
11-18 03:30:32.604 E/mono-rt (  642): Got a SIGSEGV while executing native code. This usually indicates
11-18 03:30:32.604 E/mono-rt (  642): a fatal error in the mono runtime or one of the native libraries 
11-18 03:30:32.604 E/mono-rt (  642): used by your application.
11-18 03:30:32.604 E/mono-rt (  642): =================================================================
11-18 03:30:32.604 E/mono-rt (  642): 
11-18 03:30:32.614 F/libc    (  642): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)
11-18 03:30:32.925 I/dalvikvm(  642): threadid=3: reacting to signal 3
11-18 03:30:32.935 I/dalvikvm(  642): Wrote stack traces to '/data/anr/traces.txt'
11-18 03:30:33.415 I/dalvikvm(  642): threadid=3: reacting to signal 3
11-18 03:30:33.425 I/dalvikvm(  642): Wrote stack traces to '/data/anr/traces.txt'
11-18 03:30:33.944 I/dalvikvm(  642): threadid=3: reacting to signal 3
11-18 03:30:33.944 I/dalvikvm(  642): Wrote stack traces to '/data/anr/traces.txt'
11-18 03:30:34.434 I/dalvikvm(  642): threadid=3: reacting to signal 3
11-18 03:30:34.464 I/dalvikvm(  642): Wrote stack traces to '/data/anr/traces.txt'
11-18 03:30:34.934 I/dalvikvm(  642): threadid=3: reacting to signal 3
11-18 03:30:34.944 I/dalvikvm(  642): Wrote stack traces to '/data/anr/traces.txt'
Could not connect to the debugger.
Comment 1 Jonathan Pryor 2015-11-18 11:42:45 UTC
The problem isn't the attempted loading of libunwind.so or libcorkscrew.so; the problem is this assert, which causes the process to abort, during which Mono tries to load libunwind.so or libcorkscrew.so so as to obtain a native stack trace:

> F/        (  642): * Assertion at /Users/builder/data/lanes/2098/3efa14c4/source/mono/mono/metadata/class.c:5078, condition `class' not met
Comment 2 ydang 2015-11-18 17:41:49 UTC
Thanks
I found another bug 34293 has similar problem.
I have no idea about this situation. Here is my code:

txtOpenQuestion.KeyPress += (object sender, View.KeyEventArgs e) =>
                {
                    e.Handled = false;
                    if ((e.Event.Action == KeyEventActions.Down) && (e.KeyCode == Keycode.Enter))
                    {
                        txtOpenQuestion.ClearFocus();
                        //Hide the keyboard
                        InputMethodManager imm = (InputMethodManager)GetSystemService(Context.InputMethodService);
                        imm.HideSoftInputFromWindow(m_txtOpenQuestion.WindowToken, 0);
                        Window.SetSoftInputMode(SoftInput.StateHidden);

                        e.Handled = true;

                    }
                };

I comment out this code, everything is ok~ 
Thanks
Comment 3 ydang 2015-11-18 18:27:51 UTC
Hi, If you need my support, feel free to contact me. 
Thanks a lot
Comment 4 ydang 2015-11-18 18:30:12 UTC
Sorry , the similar bug is 34239
Comment 5 João Matos 2015-11-24 15:07:12 UTC

*** This bug has been marked as a duplicate of bug 34239 ***
Comment 6 Alex Rønne Petersen 2015-12-01 21:24:51 UTC
Hi,

Could you provide a full repro project as well as information about the device you're using? I tried to create a repro based on the code you provided but could not reproduce on a Nexus 6.

Thanks!