[Mono-bugs] [Bug 356938] New: Dynamic Assemblies: GetTypes (): System. OverflowException : Number overflow
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jan 29 07:07:00 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=356938
Summary: Dynamic Assemblies: GetTypes ():
System.OverflowException : Number overflow
Product: Mono: Runtime
Version: 1.2.6
Platform: 64bit
OS/Version: Windows Vista
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: gordon.milligan at realtimeworlds.com
QAContact: mono-bugs at lists.ximian.com
Found By: Other
Created an attachment (id=192148)
--> (https://bugzilla.novell.com/attachment.cgi?id=192148)
Example project to create a dynamic assembly and show lack of access to types
and exception
We are having an issue with our application where when we create a dynamic
assembly and then later try to access its types, using GetTypes, that we get a
System.OverflowException : Number overflow error if the assembly that has been
created is in memory or if we save it out to disk and then reload it then we
don't get any type info.
The callstack for the exception is:
Unhandled Exception: System.OverflowException: Number overflow.
at (wrapper managed-to-native) System.Reflection.Module:InternalGetTypes ()
at System.Reflection.Module.GetTypes () [0x00000]
at mono_bug_createDynamicAssembly.CreateDynamicAssembly.DumpAssemblyInfo
(Syst
em.Reflection.Module[] modules) [0x00000]
at
mono_bug_createDynamicAssembly.CreateDynamicAssembly.CreateDynamicAssemblyB
yInjectingIL () [0x00000]
at mono_bug_createDynamicAssembly.Program.Main (System.String[] args)
[0x00000
]
I have created a small app to demonstrate this. The source code and VS2005
project file for this are attached. It demonstrates that I don't get access to
the DLL's types when it is loaded in and also the crash when access the
assemblies types in memory.
I am compiling the project using VS2005 and then running it under mono-1.2.6 on
Windows Vista. The output below indicates two tests, TEST1 and 2 which are
labeled in the code.
The output from the Microsoft CLR is:
---
The result of adding the inputted values is: 3
---
TEST1:
Assembly loaded from disk (IL Injection):
Module: test_assembly.dll
m.GetTypes == No. Entries: 0
Module: myDynamicModule.dll
m.GetTypes == No. Entries: 1
Type: myDynamicModuleType
Method: testDynamic
Method: GetType
Method: ToString
Method: Equals
Method: GetHashCode
TEST2:
Assembly in memory (IL Injection):
Module: <In Memory Module>
m.GetTypes == No. Entries: 0
Module: <In Memory Module>
m.GetTypes == No. Entries: 1
Type: myDynamicModuleType
Method: testDynamic
Method: GetType
Method: ToString
Method: Equals
Method: GetHashCode
Output from MONO runtime:
TEST1:
Assembly loaded from disk (IL Injection):
Module: test_assembly.dll
m.GetTypes == No. Entries: 0
Module: myDynamicModule.dll
m.GetTypes == No. Entries: 0
TEST2:
Assembly in memory (IL Injection):
Module: myDynamicAssembly
Unhandled Exception: System.OverflowException: Number overflow.
at (wrapper managed-to-native) System.Reflection.Module:InternalGetTypes ()
at System.Reflection.Module.GetTypes () [0x00000]
at mono_bug_createDynamicAssembly.CreateDynamicAssembly.DumpAssemblyInfo
(Syst
em.Reflection.Module[] modules) [0x00000]
at
mono_bug_createDynamicAssembly.CreateDynamicAssembly.CreateDynamicAssemblyB
yInjectingIL () [0x00000]
at mono_bug_createDynamicAssembly.Program.Main (System.String[] args)
[0x00000
]
--
Configure bugmail: https://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