Hi, I have a problem when loading one of my dll. I have a main class that
would load a winform in another dll using reflection. When I load it using
Assembly.CreateInstance(DLLName.DLLFormName), an exception is thrown with the
message: "Exception has been thrown by the target of an invocation."
?ex.Source
"mscorlib"
?ex.GetType.AssemblyQualifiedName
"System.Reflection.TargetInvocationException, mscorlib, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
?ex.StackTrace
" at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder
binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes)
at System.Reflection.Assembly.CreateInstance(String typeName, Boolean
ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args,
CultureInfo culture, Object[] activationAttributes)
at System.Reflection.Assembly.CreateInstance(String typeName)
at ..."
?ex.GetBaseException
{System.ComponentModel.Win32Exception}
[System.ComponentModel.Win32Exception]:
{System.ComponentModel.Win32Exception}
HelpLink: Nothing
InnerException: Nothing
Message: "Not enough storage is available to process this command"
Source: "System.Drawing"
StackTrace: " at System.Drawing.Icon.Initialize(Int32 width, Int32
height)
at System.Drawing.Icon..ctor(SerializationInfo info, StreamingContext
context)"
TargetSite: {System.Reflection.RuntimeMethodInfo}
As from ex.GetBaseException, I found that it states there is no enough
storage. When I try to remove some code operation (that retrieve lots of
information, create classes, and display in a listview), I no longer have the
problem and the dll/form loads properly. So, is this really that it is a
memory problem and that memory is running low? How can I fix this if I must
have those removed code to run? How does .net actually allocates the memory?
Is it that the memory of the whole computer has been used up, or is that
there is a limited allocation for my program? Would by increasing the virtual
memory, or let it autogrow helps?
Thanks
Eugene 2 45439
Anybody, any idea?
"Eugene" wrote: Hi, I have a problem when loading one of my dll. I have a main class that would load a winform in another dll using reflection. When I load it using Assembly.CreateInstance(DLLName.DLLFormName), an exception is thrown with the message: "Exception has been thrown by the target of an invocation."
?ex.Source "mscorlib"
?ex.GetType.AssemblyQualifiedName "System.Reflection.TargetInvocationException, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
?ex.StackTrace " at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName) at ..."
?ex.GetBaseException {System.ComponentModel.Win32Exception} [System.ComponentModel.Win32Exception]: {System.ComponentModel.Win32Exception} HelpLink: Nothing InnerException: Nothing Message: "Not enough storage is available to process this command" Source: "System.Drawing" StackTrace: " at System.Drawing.Icon.Initialize(Int32 width, Int32 height) at System.Drawing.Icon..ctor(SerializationInfo info, StreamingContext context)" TargetSite: {System.Reflection.RuntimeMethodInfo}
As from ex.GetBaseException, I found that it states there is no enough storage. When I try to remove some code operation (that retrieve lots of information, create classes, and display in a listview), I no longer have the problem and the dll/form loads properly. So, is this really that it is a memory problem and that memory is running low? How can I fix this if I must have those removed code to run? How does .net actually allocates the memory? Is it that the memory of the whole computer has been used up, or is that there is a limited allocation for my program? Would by increasing the virtual memory, or let it autogrow helps?
Thanks Eugene
My guess would be that at the times it blows-up, you are passing bad
values for the icon's height & width (ie, it thinks you want it to
create an massive icon).
When you moved things around, you stoped corrupting these values.
Eugene wrote: Hi, I have a problem when loading one of my dll. I have a main class that would load a winform in another dll using reflection. When I load it using Assembly.CreateInstance(DLLName.DLLFormName), an exception is thrown with the message: "Exception has been thrown by the target of an invocation."
?ex.Source "mscorlib"
?ex.GetType.AssemblyQualifiedName "System.Reflection.TargetInvocationException, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
?ex.StackTrace " at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName) at ..."
?ex.GetBaseException {System.ComponentModel.Win32Exception} [System.ComponentModel.Win32Exception]: {System.ComponentModel.Win32Exception} HelpLink: Nothing InnerException: Nothing Message: "Not enough storage is available to process this command" Source: "System.Drawing" StackTrace: " at System.Drawing.Icon.Initialize(Int32 width, Int32 height) at System.Drawing.Icon..ctor(SerializationInfo info, StreamingContext context)" TargetSite: {System.Reflection.RuntimeMethodInfo}
As from ex.GetBaseException, I found that it states there is no enough storage. When I try to remove some code operation (that retrieve lots of information, create classes, and display in a listview), I no longer have the problem and the dll/form loads properly. So, is this really that it is a memory problem and that memory is running low? How can I fix this if I must have those removed code to run? How does .net actually allocates the memory? Is it that the memory of the whole computer has been used up, or is that there is a limited allocation for my program? Would by increasing the virtual memory, or let it autogrow helps?
Thanks Eugene This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Noah |
last post by:
How does Image.putdata() work? I am using PIL 1.1.3.
This simple script throws an exception on putdata():
import Image
width = 10
height = 10
im = Image.new ("RGB", (width, height))
L =...
|
by: Lionel B |
last post by:
Greetings,
Using gcc (GCC) 3.3.3 (cygwin special) on Win2K
Does anyone know if there is a convenient mechanism to cause a C++
exception to be thrown whenever a IEEE 754 floating-point...
|
by: hazz |
last post by:
I have spent more time than I care to admit trying to track down a very
subtle error.
Here is my app's xx.exe.config file.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>...
|
by: hazz |
last post by:
this is a repost with more concise code (well, for me) and better questions
(I hope....) .
given the following two classes, my intent is to use either
Activator.CreateInstance or InvokeMember pass...
|
by: Chris Newcombe |
last post by:
Please could someone on the VC++ 7.0 compiler team (note; not 7.1)
tell me if this code is handled 'correctly' (i.e. as the original
poster suggests) in all cases?
...
|
by: Carlitos |
last post by:
Hi there,
I got a web application in vb.net that uploads a .zip file to a subfolder
inside the root folder of the web application.
c:\Inetpub\wwwroot\MyWebApp\uploaddir
Then, a c# library...
|
by: Fabian |
last post by:
Hi,
I work with asp.net 2.0 and I have a intermittent error, only happens a few
times a day.
In the page I evaluate a Query String and then I get data form a database.
The code snipped:
...
|
by: cmay |
last post by:
I have changed my config files to set the limit for files being uploaded to
30 MB, but every now and then someone tries to upload a file larger than this.
All I want, is to be able to trap the...
|
by: Monty |
last post by:
I have a GridView in an update panel, and the GridView has an
ObjectDataSource. Under certain conditions the Object that is the
ObjectDataSource will throw an exception with a specific error...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |