[Mono-dev] Crash using Crystal Reports on Linux Mono
Joshua Kugler
joshua.kugler at uaf.edu
Wed Feb 8 16:27:52 EST 2006
I'm working on a database application that uses Crystal reports. I took all
the CR managed DLL's and added them to the cache on my Linux install of mono.
I ran the app, which did start up, and displayed the report control But when
I tried to invoke the report, I got a nasty crash:
[joshua at otter ~/tmp/DatasetGenerator/bin]$ mono DatasetGenerator.exe
Mono System.Windows.Forms Assembly [Revision: 54007; built: 2005/12/6
14:35:24]
Keyboard: United States keyboard layout (phantom key version)
KDE colorscheme read
=================================================================
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.
=================================================================
Stacktrace:
in <0xffffffff>
CrystalDecisions.CrystalReports.Engine.ReportDocument:InternalInit ()
in <0x52> CrystalDecisions.CrystalReports.Engine.ReportDocument:InternalInit
()
in <0x36> CrystalDecisions.CrystalReports.Engine.ReportDocument:.ctor ()
in <0xfffffcb6> (wrapper remoting-invoke-with-check)
CrystalDecisions.CrystalReports.Engine.ReportDocument:.ctor ()
in <0x4e> DatasetGenerator.frmDSC:btnTestRpt_Click (object,System.EventArgs)
in <0xffcf2d25> (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_object_EventArgs
(object,System.EventArgs)
in <0x1d> System.Windows.Forms.Control:OnClick (System.EventArgs)
in <0xdd> System.Windows.Forms.Button:OnClick (System.EventArgs)
in <0xf8> System.Windows.Forms.ButtonBase:OnMouseUp
(System.Windows.Forms.MouseEventArgs)
in <0xd> System.Windows.Forms.Button:OnMouseUp
(System.Windows.Forms.MouseEventArgs)
in <0x699> System.Windows.Forms.Control:WndProc
(System.Windows.Forms.Message&)
in <0x60> System.Windows.Forms.ButtonBase:WndProc
(System.Windows.Forms.Message&)
in <0xd> System.Windows.Forms.Button:WndProc (System.Windows.Forms.Message&)
in <0x14> ControlNativeWindow:WndProc (System.Windows.Forms.Message&)
in <0x11e> System.Windows.Forms.NativeWindow:WndProc
(intptr,System.Windows.Forms.Msg,intptr,intptr)
in <0x16> System.Windows.Forms.XplatUIX11:DispatchMessage
(System.Windows.Forms.MSG&)
in <0x15> System.Windows.Forms.XplatUI:DispatchMessage
(System.Windows.Forms.MSG&)
in <0x61d> System.Windows.Forms.Application:RunLoop
(bool,System.Windows.Forms.ApplicationContext)
in <0x24> System.Windows.Forms.Application:Run (System.Windows.Forms.Form)
in <0x1f> DatasetGenerator.frmDSC:Main ()
in <0x508d3fc7> (wrapper runtime-invoke) System.Object:runtime_invoke_void
(object,intptr,intptr,intptr)
Native stacktrace:
mono(mono_handle_native_sigsegv+0xba) [0x814c43a]
mono [0x813890f]
[0xffffe440]
mono [0x812b2e5]
mono [0x813747f]
mono [0x81381bb]
mono [0x81384c7]
mono [0x81384fa]
mono(mono_compile_method+0x3a) [0x80d385a]
mono(mono_magic_trampoline+0x1a) [0x814d72a]
[0xb7fad032]
[0xb6e3cd77]
[0xb6e3cc4a]
[0xb6e3c8df]
[0xb7149212]
[0xb6e3bef6]
[0xb6e3beb6]
[0xb6e3bdc1]
[0xb6e3bcbe]
[0xb6e745c2]
[0xb6e759c1]
[0xb6e75956]
[0xb712a3c5]
[0xb712a24f]
[0xb6e73497]
[0xb6e73476]
[0xb712da16]
[0xb712d33d]
[0xb7865930]
[0xb786481e]
mono [0x81387c0]
mono(mono_runtime_invoke+0x27) [0x80d5067]
mono(mono_runtime_exec_main+0x5c) [0x80d617c]
mono(mono_runtime_run_main+0x171) [0x80d5da1]
mono(strftime+0x1b52) [0x805ce52]
mono(mono_main+0x786) [0x805d766]
mono(__fxstat64+0x12b) [0x805c21b]
/lib/tls/libc.so.6(__libc_start_main+0xcb) [0x4c709e4b]
mono(sinh+0x41) [0x805c171]
Aborted (core dumped)
The crystal reports DLL's used were:
CRVsPackageLib.dll
CrystalDecisions.CrystalReports.Engine.dll
CrystalDecisions.ReportSource.dll
CrystalDecisions.Shared.dll
CrystalDecisions.Web.dll
CrystalDecisions.Windows.Forms.dll
CrystalEnterpriseLib.dll
CrystalInfoStoreLib.dll
CrystalKeyCodeLib.dll
CrystalPluginMgrLib.dll
CrystalReportPluginLib.dll
Linux otter.cde.uaf.edu 2.6.11-12mdksmp #1 SMP Mon Jun 27 21:21:32 MDT 2005
i686 Intel(R) Xeon(TM) CPU 2.40GHz unknown GNU/Linux
mono -V
Mono JIT compiler version 1.1.13.2, (C) 2002-2005 Novell, Inc and
Contributors. www.mono-project.com
TLS: normal
GC: Included Boehm (with typed GC)
SIGSEGV : normal
This is a VisualBasic.NET application. Am I missing something (like, DON'T DO
THAT), or should Crystal Reports Viewer run under mono since the code is
managed and it all imported into the cache OK (no errors on import).
The code that causes the crash:
Private Sub btnTestRpt_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnTestRpt.Click
Dim myReport As New ReportDocument
Dim myData As New DataSet
Dim myConn As MySqlConnection
Dim cmd As New MySqlCommand
Dim myAdapter As New MySqlDataAdapter
Dim strConn As String
Dim bolProcessOK As Boolean = True
If Not myConn Is Nothing Then myConn.Close()
strConn = String.Format("server='{0}'; user id='{1}'; password='{2}';
database='{3}'; pooling='false'", _
Me.txtServer.Text, Me.txtUserName.Text, Me.txtPassword.Text,
Me.txtDatabase.Text)
Try
myConn = New MySqlConnection(strConn)
myConn.Open()
cmd.CommandText = "SELECT * FROM user"
cmd.Connection = myConn
myAdapter.SelectCommand = cmd
myAdapter.Fill(myData)
myReport.Load("MyTestReport.rpt")
myReport.SetDataSource(myData)
'myViewer is the form Crystal Reports form control
myViewer.ReportSource = myReport
Catch ex As Exception
MessageBox.Show(ex.Message, "Report could not be created",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
If Not myConn Is Nothing Then
If myConn.State = ConnectionState.Open Then
myConn.Close()
End If
End If
End Sub
Just FYI...and if you can offer any tips to get around this. :)
j----- k-----
--
Joshua Kugler PGP Key: http://pgp.mit.edu/
CDE System Administrator ID 0xDB26D7CE
http://distance.uaf.edu/
More information about the Mono-devel-list
mailing list