[Mono-bugs] [Bug 511100] New: Crash when trying to use a jfreechart dll assembly

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jun 8 17:19:59 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=511100


           Summary: Crash when trying to use a jfreechart dll assembly
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: x86
        OS/Version: Kubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: serious.seb at orange.fr
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development


The goal of the entire process was to use the "jfreechart" library from a
net runtime context.
So first an assembly dll is generated for "jcommon" with "ikvmc".
Then the "jfreechart" dll assembly is generated with "ikvmc".
These dlls are used to build a simple C# application with "gmcs", the
compilation and linking work fine.
But when trying to run the generated PE application, the "Mono" runtime
crashes.

Here is a shell session that shows the problem :
<programlisting>
$ tree .
.
|-- Test.cs
|-- jcommon-1.0.16.jar
`-- jfreechart-1.0.13.jar

0 directories, 3 files
$ ikvmc.exe
IKVM.NET Compiler version 0.40.0.1
..
$ ikvmc.exe -reference:/opt/ikvm/bin/IKVM.OpenJDK.SwingAWT.dll
-reference:/opt/ikvm/bin/IKVM.OpenJDK.Misc.dll
-reference:/opt/ikvm/bin/IKVM.OpenJDK.Text.dll
-reference:/opt/ikvm/bin/IKVM.OpenJDK.Util.dll -target:library
jcommon-1.0.16.jar
Note IKVMC0002: output file is "jcommon-1.0.16.dll"
$ tree .
.
|-- Test.cs
|-- jcommon-1.0.16.dll
|-- jcommon-1.0.16.jar
`-- jfreechart-1.0.13.jar

0 directories, 4 files
$ ikvmc.exe -reference:jcommon-1.0.16.dll
-reference:/opt/ikvm/bin/IKVM.OpenJDK.SwingAWT.dll
-reference:/opt/ikvm/bin/IKVM.OpenJDK.Util.dll
-reference:/opt/ikvm/bin/IKVM.OpenJDK.Text.dll
-reference:/opt/ikvm/bin/IKVM.OpenJDK.XML.dll
-reference:/opt/ikvm/bin/IKVM.OpenJDK.Jdbc.dll
-reference:/opt/ikvm/bin/IKVM.OpenJDK.Misc.dll -target:library
jfreechart-1.0.13.jar
Note IKVMC0002: output file is "jfreechart-1.0.13.dll"
Warning IKVMC0117: emitted java.lang.NoSuchMethodError in
"org.jfree.data.jdbc.JDBCPieDataset.<init>(Ljava.lang.String;Ljava.lang.Str
ing;Ljava.lang.String;Ljava.lang.String;)V"

("java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.lang.String;
Ljava.lang.String;)Ljava.sql.Connection;")
Warning IKVMC0105: unable to compile class
"org.jfree.chart.servlet.DisplayChart"
(missing class "javax.servlet.http.HttpServlet")
Warning IKVMC0105: unable to compile class
"org.jfree.chart.servlet.ChartDeleter"
(missing class "javax.servlet.http.HttpSessionBindingListener")
Warning IKVMC0100: class "javax.servlet.http.HttpSession" not found
Warning IKVMC0100: class "org.jfree.chart.servlet.ChartDeleter" not found
Warning IKVMC0100: class "javax.servlet.http.HttpServletResponse" not
found
Warning IKVMC0100: class "javax.servlet.ServletOutputStream" not found
Warning IKVMC0111: emitted java.lang.NoClassDefFoundError in
"org.jfree.chart.servlet.ServletUtilities.registerChartForDeletion(Ljava.io
File;Ljavax.servlet.http.HttpSession;)V"
("javax.servlet.http.HttpSession")
Warning IKVMC0111: emitted java.lang.NoClassDefFoundError in
"org.jfree.chart.servlet.ServletUtilities.sendTempFile(Ljava.io.File;Ljavax
servlet.http.HttpServletResponse;Ljava.lang.String;)V"
("javax.servlet.http.HttpServletResponse")
Warning IKVMC0117: emitted java.lang.NoSuchMethodError in
"org.jfree.data.jdbc.JDBCCategoryDataset.<init>(Ljava.lang.String;Ljava.lan
g.String;Ljava.lang.String;Ljava.lang.String;)V"

("java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.lang.String;
Ljava.lang.String;)Ljava.sql.Connection;")
Warning IKVMC0117: emitted java.lang.NoSuchMethodError in
"org.jfree.data.jdbc.JDBCXYDataset.<init>(Ljava.lang.String;Ljava.lang.Stri
ng;Ljava.lang.String;Ljava.lang.String;)V"

("java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.lang.String;
Ljava.lang.String;)Ljava.sql.Connection;")
$ tree .
.
|-- Test.cs
|-- jcommon-1.0.16.dll
|-- jcommon-1.0.16.jar
|-- jfreechart-1.0.13.dll
`-- jfreechart-1.0.13.jar

0 directories, 5 files
$ cat Test.cs
using System;

using javax.swing;

using org.jfree.chart;
using org.jfree.chart.plot;
using org.jfree.data.xy;


class Test
{
static void Main()
{
double[][] xDatas = new double[2][]{new double[10], new
double[10]};
double[][] x2Datas = new double[2][]{new double[10], new
double[10]};
double[][] x3Datas = new double[2][]{new double[10], new
double[10]};

for (Int32 i = 0; i < 10; i++)
{
xDatas[0][i] = x2Datas[0][i] = x3Datas[0][i] =
(double)i;

xDatas[1][i] = (double)i;
x2Datas[1][i] = (double)(i * i);
x3Datas[1][i] = (double)(i * i * i);
}

DefaultXYDataset dataset = new DefaultXYDataset();

dataset.addSeries("x", xDatas);
dataset.addSeries("x^2", x2Datas);
dataset.addSeries("x^3", x3Datas);

JFreeChart chart = ChartFactory.createXYLineChart("Graph of
x, x^2 and x^3", "x", "y", null, PlotOrientation.VERTICAL, true, false,
false);

JPanel chartPanel = new ChartPanel(chart);

JFrame frame = new JFrame();

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.add(chartPanel);

frame.pack();

frame.setVisible(true);
}
}
$ gmcs --version
Mono C# compiler version 135.93.0.0
$ MONO_PATH=/opt/ikvm/bin/ gmcs
-reference:/opt/ikvm/bin/IKVM.OpenJDK.SwingAWT.dll
-reference:jcommon-1.0.16.dll -reference:jfreechart-1.0.13.dll -target:exe
Test.cs
$ mono --version
Mono JIT compiler version 135093 (tarball Sun May 31 14:56:46 CEST 2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
$ MONO_PATH=/opt/ikvm/bin/ ./Test.exe


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) <0x0001f>

at System.Reflection.Assembly.GetType (string) <0x00014>

at IKVM.Internal.ClassLoaderWrapper.GetAssemblyClassLoader
(System.Reflection.Assembly) <0x000c0>
at IKVM.Internal.AssemblyClassLoader.LoadReferenced (string) <0x00075>

at IKVM.NativeCode.ikvm.runtime.AssemblyClassLoader.LoadClass
(object,System.Reflection.Assembly,string) <0x00082>
at ikvm.runtime.AssemblyClassLoader.LoadClass
(java.lang.ClassLoader,System.Reflection.Assembly,string) <0x00011>

at ikvm.runtime.AssemblyClassLoader.loadClass (string,bool) <0x00015>

at java.lang.ClassLoader.loadClass (string) <0x00011>

at Control.newBundle
(string,java.util.Locale,string,java.lang.ClassLoader,bool) <0x0008f>

at java.util.ResourceBundle.loadBundle
(java.util.ResourceBundle/CacheKey,java.util.List,java.util.ResourceBundle/
Control,bool) <0x00109>
at java.util.ResourceBundle.findBundle
(java.util.ResourceBundle/CacheKey,java.util.List,java.util.List,int,java.u
til.ResourceBundle/Control,java.util.ResourceBundle) <0x006ee>
at java.util.ResourceBundle.findBundle
(java.util.ResourceBundle/CacheKey,java.util.List,java.util.List,int,java.u
til.ResourceBundle/Control,java.util.ResourceBundle) <0x0014f>
at java.util.ResourceBundle.findBundle
(java.util.ResourceBundle/CacheKey,java.util.List,java.util.List,int,java.u
til.ResourceBundle/Control,java.util.ResourceBundle) <0x0014f>
at java.util.ResourceBundle.getBundleImpl
(string,java.util.Locale,java.lang.ClassLoader,java.util.ResourceBundle/Con
trol) <0x001b0>
at java.util.ResourceBundle.getBundle (string,ikvm.internal.CallerID)
<0x0003f>

at org.jfree.chart.util.ResourceBundleWrapper.getBundle (string)
<0x00037>

at org.jfree.chart.plot.XYPlot..cctor () <0x000c1>


at (wrapper runtime-invoke) System.Object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>

at org.jfree.chart.ChartFactory.createXYLineChart
(string,string,string,org.jfree.data.xy.XYDataset,org.jfree.chart.plot.Plot
Orientation,bool,bool,bool) <0xffffffff>
at org.jfree.chart.ChartFactory.createXYLineChart
(string,string,string,org.jfree.data.xy.XYDataset,org.jfree.chart.plot.Plot
Orientation,bool,bool,bool) <0x000be>
at Test.Main () <0x00301>


at (wrapper runtime-invoke) System.Object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>


Native stacktrace:

/usr/bin/cli [0x806d944]
/usr/bin/cli [0x808616b]
[0xb809e410]
/usr/bin/cli [0x80ab200]
/usr/bin/cli [0x80aaf6c]
/usr/bin/cli [0x80c6eb1]
[0xb6527be7]
[0xb6527b80]
[0xb6527b4d]
[0xb6527151]
[0xb5e9b5ee]
[0xb50a0f5b]
[0xb50a0e9a]
[0xb50a0e6e]
[0xb50a0e4a]
[0xb50a0818]
[0xb50a053a]
[0xb509de4f]
[0xb509d8b0]
[0xb509d8b0]
[0xb51c5fd9]
[0xb507bcc0]
[0xb507bc58]
[0xb507b9d2]
[0xb7a211ae]
/usr/bin/cli [0x80be75d]
/usr/bin/cli(mono_runtime_class_init+0x19) [0x80bee19]
/usr/bin/cli [0x81b1d6e]
/usr/bin/cli [0x807029f]
[0xb7ca8066]
[0xb7a21562]
[0xb7a211ae]
/usr/bin/cli(mono_runtime_exec_main+0xe5) [0x80bad75]
/usr/bin/cli(mono_runtime_run_main+0x16b) [0x80bb4eb]
/usr/bin/cli(mono_main+0x1727) [0x805c917]
/usr/bin/cli [0x805ac62]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7e2c775]
/usr/bin/cli [0x805aba1]

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 0xb7de26e0 (LWP 23854)]
[New Thread 0xb5e8ab90 (LWP 23858)]
[New Thread 0xb7626b90 (LWP 23857)]
[New Thread 0xb808ab90 (LWP 23856)]
(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)
0xb809e430 in __kernel_vsyscall ()
4 Thread 0xb808ab90 (LWP 23856) 0xb809e430 in __kernel_vsyscall ()
3 Thread 0xb7626b90 (LWP 23857) 0xb809e430 in __kernel_vsyscall ()
2 Thread 0xb5e8ab90 (LWP 23858) 0xb809e430 in __kernel_vsyscall ()
1 Thread 0xb7de26e0 (LWP 23854) 0xb809e430 in __kernel_vsyscall ()

Thread 4 (Thread 0xb808ab90 (LWP 23856)):
#0 0xb809e430 in __kernel_vsyscall ()
#1 0xb7fac8f6 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x081492e8 in ?? ()
#3 0xb7fa54ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4 0xb7efa49e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 3 (Thread 0xb7626b90 (LWP 23857)):
#0 0xb809e430 in __kernel_vsyscall ()
#1 0xb7fa90e5 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/tls/i686/cmov/libpthread.so.0
#2 0x0814c607 in ?? ()

#3 0x0814f1f4 in ?? ()

#4 0x0814f25c in ?? ()

#5 0x08169b02 in ?? ()

#6 0x080d565a in ?? ()

#7 0x080f7639 in ?? ()

#8 0x081653b6 in ?? ()

#9 0x081833b5 in ?? ()

#10 0xb7fa54ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0

#11 0xb7efa49e in clone () from /lib/tls/i686/cmov/libc.so.6


Thread 2 (Thread 0xb5e8ab90 (LWP 23858)):
#0 0xb809e430 in __kernel_vsyscall ()
#1 0xb7eefae7 in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb50a19f4 in ?? ()
#3 0xb50a1527 in ?? ()
#4 0xb509b3a2 in ?? ()
#5 0xb51c6578 in ?? ()
#6 0xb51c4f02 in ?? ()
#7 0xb51c494f in ?? ()
#8 0xb51c1b0b in ?? ()
#9 0xb51c1939 in ?? ()
#10 0xb5eaa593 in ?? ()
#11 0xb7a25981 in ?? ()
#12 0x080b8974 in mono_runtime_delegate_invoke ()
#13 0x080f76bf in ?? ()
#14 0x081653b6 in ?? ()
#15 0x081833b5 in ?? ()
#16 0xb7fa54ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#17 0xb7efa49e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb7de26e0 (LWP 23854)):
#0 0xb809e430 in __kernel_vsyscall ()
#1 0xb7fac0fb in read () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x0806da5e in ?? ()
#3 0x0808616b in ?? ()
#4 <signal handler called>
#5 0x0813febd in mono_class_from_name ()
#6 0x080ab200 in ?? ()
#7 0x080aaf6c in ?? ()
#8 0x080c6eb1 in ?? ()
#9 0xb6527be7 in ?? ()
#10 0xb6527b80 in ?? ()
#11 0xb6527b4d in ?? ()
#12 0xb6527151 in ?? ()
#13 0xb5e9b5ee in ?? ()
#14 0xb50a0f5b in ?? ()
#15 0xb50a0e9a in ?? ()
#16 0xb50a0e6e in ?? ()
#17 0xb50a0e4a in ?? ()
#18 0xb50a0818 in ?? ()
#19 0xb50a053a in ?? ()
#20 0xb509de4f in ?? ()
#21 0xb509d8b0 in ?? ()
#22 0xb509d8b0 in ?? ()
#23 0xb51c5fd9 in ?? ()
#24 0xb507bcc0 in ?? ()
#25 0xb507bc58 in ?? ()
#26 0xb507b9d2 in ?? ()
#27 0xb7a211ae in ?? ()
#28 0x080be75d in ?? ()
#29 0x080bee19 in mono_runtime_class_init ()
#30 0x081b1d6e in ?? ()
#31 0x0807029f in ?? ()
#32 0xb7ca8066 in ?? ()
#33 0xb7a21562 in ?? ()
#34 0xb7a211ae in ?? ()
#35 0x080bad75 in mono_runtime_exec_main ()
#36 0x080bb4eb in mono_runtime_run_main ()
#37 0x0805c917 in mono_main ()
#38 0x0805ac62 in ?? ()
#39 0xb7e2c775 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#40 0x0805aba1 in ?? ()
#0 0xb809e430 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.
=================================================================

Aborted
</programlisting>

Same problem with a recent SVN checkout :
<programlisting>
$ /opt/mono/bin/gmcs --version
Mono C# compiler version 2.5.0.0
$ /opt/mono/bin/mono --version
Mono JIT compiler version 2.5 (/trunk/mono r135096 Mon Jun  8 21:47:32 CEST
2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC and Parallel Mark)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none
</programlisting>

System informations :
<programlisting>
$ uname -a
Linux self 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
i686 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"
</programlisting>

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list