[Mono-bugs] [Bug 581679] New: System.InvalidCastException: Cannot cast from source type to destination type.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Feb 22 02:53:10 EST 2010


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

http://bugzilla.novell.com/show_bug.cgi?id=581679#c0


           Summary: System.InvalidCastException: Cannot cast from source
                    type to destination type.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: x86
        OS/Version: openSUSE 11.2
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: Kulichkin at kvy.com.ua
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=343712)
 --> (http://bugzilla.novell.com/attachment.cgi?id=343712)
The full project in Visual Studio 2010

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.1.7)
Gecko/20091222 SUSE/3.5.7-1.1.1 Firefox/3.5.7

I created the project in Visual Studio 2010 for MS Windows. This is a windows
form, which must work in .Net Framework 2.0. That form has two DataGridView
objects. At start the program creates two tables (DataTable), adds them to 
DataSet object and links those tables. The program works in Windows 7 and XP
without any problems. But when I moved it to openSUSE 11.2 with Mono 2.6.1:

Mono JIT compiler version 2.6.1 (tarball Thu Dec 17 17:24:22 UTC 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

the program crashed at start. The full project is attached to this report.      

Reproducible: Always

Steps to Reproduce:
1. Run program  

mono KVYadmin.exe


Actual Results:  
After start I get the exception:

SUSE32:/home/d # mono KVYadmin.exe

Unhandled Exception: System.InvalidCastException: Cannot cast from source type
to destination type.
  at System.Data.DataViewManager.CollectionToListChangeEventArgs
(System.ComponentModel.CollectionChangeEventArgs e) [0x00000] in <filename
unknown>:0
  at System.Data.DataViewManager.RelationCollectionChanged (System.Object
sender, System.ComponentModel.CollectionChangeEventArgs e) [0x00000] in
<filename unknown>:0
  at System.Data.DataRelationCollection.OnCollectionChanged
(System.ComponentModel.CollectionChangeEventArgs ccevent) [0x00000] in
<filename unknown>:0
  at System.Data.DataRelationCollection.Add (System.Data.DataRelation relation)
[0x00000] in <filename unknown>:0
  at System.Data.DataRelationCollection.Add (System.String name,
System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn)
[0x00000] in <filename unknown>:0
  at KVYadmin.KVYadmin..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) KVYadmin.KVYadmin:.ctor ()
  at KVYadmin.Program.Main () [0x00000] in <filename unknown>:0



Expected Results:  
The windows form with two tables into two DataGridView objects.

The crash met in KVYadmin at the following string:

 m_dataSet.Relations.Add(m_relationNameTables,
m_dataSet.Tables[m_nameHostsTable].Columns[m_colMACHostsTable],
               
m_dataSet.Tables[m_nameSitesTable].Columns[m_colMACSitesTable]);

-- 
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