[IKVM 0.41.3524] causes mono to crash on Linux (SIGSEGV trigged)

View: New views
1 Messages — Rating Filter:   Alert me  

[IKVM 0.41.3524] causes mono to crash on Linux (SIGSEGV trigged)

by denilsson31 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm hobbyist and newbie in .NET.

So, I guess I'm doing something wrong.

I've tried to run this Java program with mono.

/*
 * HelloWorldSwing.java requires no other files.
 */
import javax.swing.*;        

public class t {
    /**
     * Create the GUI and show it.  For thread safety,
     * this method should be invoked from the
     * event-dispatching thread.
     */
    private static void createAndShowGUI() {
        //Create and set up the window.
        JFrame frame = new JFrame("HelloWorldSwing");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        //Add the ubiquitous "Hello World" label.
        JLabel label = new JLabel("Hello World");
        frame.getContentPane().add(label);

        //Display the window.
        frame.pack();
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        //Schedule a job for the event-dispatching thread:
        //creating and showing this application's GUI.
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
            }
        });
    }
}


After set PATH to ikvmc location and MONO_PATH to ./ikvm/bin/ containing all the ikvm DLL,

I've compiled my swing program with the following command :
ikvmc t.class t\$1.class

All is fine : t.exe is generated without error.

when invoking :
mono t.exe

mono crashes like this :

Stacktrace:

  at (wrapper managed-to-native) System.Reflection.Assembly.InternalGetType (System.Reflection.Module,string,bool,bool) <0x00004>
  at (wrapper managed-to-native) System.Reflection.Assembly.InternalGetType (System.Reflection.Module,string,bool,bool) <0xffffffff>
  at System.Reflection.Assembly.GetType (string,bool,bool) <0x00025>
  at System.Reflection.Assembly.GetType (string) <0x00019>
  at IKVM.Internal.ClassLoaderWrapper.GetAssemblyClassLoader (System.Reflection.Assembly) <0x000e0>
  at IKVM.Internal.ClassLoaderWrapper.GetWrapperFromType (System.Type) <0x0013a>
  at IKVM.Internal.DotNetTypeWrapper.MakeMethodDescriptor (System.Reflection.MethodBase,string&,string&,IKVM.Internal.TypeWrapper[]&,IKVM.Internal.TypeWrapper&) <0x00324>
  at IKVM.Internal.DotNetTypeWrapper.LazyPublishMembers () <0x008fc>
  at IKVM.Internal.TypeWrapper.GetMethods () <0x00026>
  at IKVM.NativeCode.java.lang.Class.getDeclaredConstructors0 (object,bool) <0x0010a>
  at java.lang.Class.getDeclaredConstructors0 (bool) <0x00017>
  at java.lang.Class.privateGetDeclaredConstructors (bool) <0x001a8>
  at java.lang.Class.getConstructor0 (java.lang.Class[],int) <0x00025>
  at java.lang.Class.newInstance0 (ikvm.internal.CallerID) <0x00058>
  at java.lang.Class.newInstance (ikvm.internal.CallerID) <0x0003e>
  at java.awt.Toolkit$2.run () <0x0033b>
  at java.security.AccessController.doPrivileged (object,java.security.AccessControlContext,ikvm.internal.CallerID) <0x00207>
  at java.security.AccessController.doPrivileged (java.security.PrivilegedAction,ikvm.internal.CallerID) <0x00015>
  at java.awt.Toolkit.getDefaultToolkit () <0x00071>
  at java.awt.Toolkit.getEventQueue () <0x0000a>
  at java.awt.EventQueue.invokeLater (java.lang.Runnable) <0x0000a>
  at javax.swing.SwingUtilities.invokeLater (java.lang.Runnable) <0x00010>
  at t.main (string[]) <0x00030>
  at <Module>.main () <0x0002d>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono [0x80fba2f]
        mono [0x813efea]
        mono [0x80642dd]
        [0xb7f2f440]
        mono [0x8192933]
        mono [0x8192d84]
        mono(mono_reflection_get_type+0x2d) [0x8192bda]
        mono [0x816f37d]
        [0xb6253465]
        [0xb62533fe]
        [0xb62533c2]
        [0xb64d2d79]
        [0xb6254f0b]
        [0xb5e91455]
        [0xb621ca6d]
        [0xb622f08f]
        [0xb622edcb]
        [0xb622ec58]
        [0xb623fad9]
        [0xb623f77e]
        [0xb623f461]
        [0xb623f3bf]
        [0xb621ae94]
        [0xb78c3720]
        [0xb78c3506]
        [0xb621a602]
        [0xb622ab83]
        [0xb78c2c1b]
        [0xb78c0941]
        [0xb78c0909]
        [0xb78ba2ce]
        [0xb78ba1fa]
        mono [0x80640ad]
        mono(mono_runtime_invoke+0x65) [0x81fb8b0]
        mono(mono_runtime_exec_main+0x245) [0x81fce57]
        mono(mono_runtime_run_main+0x2ec) [0x81fc8dc]
        mono(mono_jit_exec+0xbd) [0x80de1ff]
        mono [0x80de38e]
        mono(mono_main+0x174f) [0x80dfeb5]
        mono [0x805af70]
        /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7cdf450]
        mono [0x805aee1]

Debug info from gdb:

(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb7ca06d0 (LWP 22708)]
[New Thread 0xb74c6b90 (LWP 22710)]
[New Thread 0xb78b9b90 (LWP 22709)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xb7f2f402 in __kernel_vsyscall ()
  3 Thread 0xb78b9b90 (LWP 22709)  0xb7f2f402 in __kernel_vsyscall ()
  2 Thread 0xb74c6b90 (LWP 22710)  0xb7f2f402 in __kernel_vsyscall ()
  1 Thread 0xb7ca06d0 (LWP 22708)  0xb7f2f402 in __kernel_vsyscall ()

Thread 3 (Thread 0xb78b9b90 (LWP 22709)):
#0  0xb7f2f402 in __kernel_vsyscall ()
#1  0xb7e4a196 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x08228451 in ?? ()
#3  0xb7e424fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb7d9fe5e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xb74c6b90 (LWP 22710)):
#0  0xb7f2f402 in __kernel_vsyscall ()
#1  0xb7e48d05 in sem_wait@@GLIBC_2.1 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x0820b334 in ?? ()
#3  0x0815e9c0 in ?? ()
#4  0x08218a19 in ?? ()
#5  0x0824bc0b in ?? ()
#6  0xb7e424fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7  0xb7d9fe5e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb7ca06d0 (LWP 22708)):
#0  0xb7f2f402 in __kernel_vsyscall ()
#1  0xb7e4999b in read () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x080fbcc1 in ?? ()
#3  0x0813efea in ?? ()
#4  0x080642dd in ?? ()
#5  <signal handler called>
#6  0x081b80aa in mono_class_from_name ()
#7  0x08192933 in ?? ()
#8  0x08192d84 in ?? ()
#9  0x08192bda in mono_reflection_get_type ()
#10 0x0816f37d in ?? ()
#11 0xb6253465 in ?? ()
#12 0xb62533fe in ?? ()
#13 0xb62533c2 in ?? ()
#14 0xb64d2d79 in ?? ()
#15 0xb6254f0b in ?? ()
#16 0xb5e91455 in ?? ()
#17 0xb621ca6d in ?? ()
#18 0xb622f08f in ?? ()
#19 0xb622edcb in ?? ()
#20 0xb622ec58 in ?? ()
#21 0xb623fad9 in ?? ()
#22 0xb623f77e in ?? ()
#23 0xb623f461 in ?? ()
#24 0xb623f3bf in ?? ()
#25 0xb621ae94 in ?? ()
#26 0xb78c3720 in ?? ()
#27 0xb78c3506 in ?? ()
#28 0xb621a602 in ?? ()
#29 0xb622ab83 in ?? ()
#30 0xb78c2c1b in ?? ()
#31 0xb78c0941 in ?? ()
#32 0xb78c0909 in ?? ()
#33 0xb78ba2ce in ?? ()
#34 0xb78ba1fa in ?? ()
#35 0x080640ad in ?? ()
#36 0x081fb8b0 in mono_runtime_invoke ()
#37 0x081fce57 in mono_runtime_exec_main ()
#38 0x081fc8dc in mono_runtime_run_main ()
#39 0x080de1ff in mono_jit_exec ()
#40 0x080de38e in ?? ()
#41 0x080dfeb5 in mono_main ()
#42 0x0805af70 in ?? ()
#43 0xb7cdf450 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#44 0x0805aee1 in ?? ()
#0  0xb7f2f402 in __kernel_vsyscall ()

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================


My configuration:

Ubuntu 8.04

Mono JIT compiler version 2.4.2.3 (tarball dimanche 30 août 2009, 13:53:22 (UTC+0200))
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none

IKVM 0.41.3524


If anyone has solved this problem, don't hesitate to communicate.

Regards