Posted 20 years ago
by Jake Pearson
-
Software Developer,
Alion Science and Technology
Hi,
I was able to get a Win32Exception if I create a large number of SyntaxEditor objects. I believe I can mitigate the problem by cacheing the editors. Here is the stack trace:
Unhandled Exception: System.ComponentModel.Win32Exception: Element not found
at System.Drawing.Icon.Initialize(Int32 width, Int32 height)
at System.Drawing.Icon..ctor(Stream stream)
at ActiproSoftware.Products.Resources.GetIcon(Assembly assembly, String name)
at ActiproSoftware.Products.SyntaxEditor.Resources.GetIcon(IconResource icon)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.ResetReflectionImageList()
at ActiproSoftware.SyntaxEditor.SyntaxEditor..ctor()
at MAAD.Utilities.CodeEditor.CodeEditor..ctor() in c:\documents and settings\jpearson.maad\my documents\visual studio projects\simulator\maad.utilities.codeeditor\codeeditor.cs:line 46
at MAAD.Utilities.CodeEditor.CSharpEditor..ctor() in c:\documents and settings\jpearson.maad\my documents\visual studio projects\simulator\maad.utilities.codeeditor\csharpeditor.cs:line 31
at MAAD.Network.Utilities.VisualComponents.TargetPanel.InitializeComponent() in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TargetPanel.cs:line 85
at MAAD.Network.Utilities.VisualComponents.TargetPanel..ctor() in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TargetPanel.cs:line 49
at MAAD.Network.Utilities.VisualComponents.TaskPanel.Populate() in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TaskPanel.cs:line 922
at MAAD.Network.Utilities.VisualComponents.TaskObjectPanel.Populate() in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TaskObjectPanel.cs:line 345
at MAAD.Utilities.VisualComponents.BaseEditablePanel.LoadObject(IEditable editable) in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Utilities\VisualComponents\BaseEditablePanel.cs:line 66
at MAAD.Network.Utilities.VisualComponents.TaskObjectPanel.ShowObject(ENavigationDirection direction) in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TaskObjectPanel.cs:line 473
at MAAD.Network.Utilities.VisualComponents.TaskObjectPanel.buttonDirection_Click(Object sender, EventArgs e) in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TaskObjectPanel.cs:line 415
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
thanks,
Jake
I was able to get a Win32Exception if I create a large number of SyntaxEditor objects. I believe I can mitigate the problem by cacheing the editors. Here is the stack trace:
Unhandled Exception: System.ComponentModel.Win32Exception: Element not found
at System.Drawing.Icon.Initialize(Int32 width, Int32 height)
at System.Drawing.Icon..ctor(Stream stream)
at ActiproSoftware.Products.Resources.GetIcon(Assembly assembly, String name)
at ActiproSoftware.Products.SyntaxEditor.Resources.GetIcon(IconResource icon)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.ResetReflectionImageList()
at ActiproSoftware.SyntaxEditor.SyntaxEditor..ctor()
at MAAD.Utilities.CodeEditor.CodeEditor..ctor() in c:\documents and settings\jpearson.maad\my documents\visual studio projects\simulator\maad.utilities.codeeditor\codeeditor.cs:line 46
at MAAD.Utilities.CodeEditor.CSharpEditor..ctor() in c:\documents and settings\jpearson.maad\my documents\visual studio projects\simulator\maad.utilities.codeeditor\csharpeditor.cs:line 31
at MAAD.Network.Utilities.VisualComponents.TargetPanel.InitializeComponent() in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TargetPanel.cs:line 85
at MAAD.Network.Utilities.VisualComponents.TargetPanel..ctor() in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TargetPanel.cs:line 49
at MAAD.Network.Utilities.VisualComponents.TaskPanel.Populate() in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TaskPanel.cs:line 922
at MAAD.Network.Utilities.VisualComponents.TaskObjectPanel.Populate() in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TaskObjectPanel.cs:line 345
at MAAD.Utilities.VisualComponents.BaseEditablePanel.LoadObject(IEditable editable) in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Utilities\VisualComponents\BaseEditablePanel.cs:line 66
at MAAD.Network.Utilities.VisualComponents.TaskObjectPanel.ShowObject(ENavigationDirection direction) in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TaskObjectPanel.cs:line 473
at MAAD.Network.Utilities.VisualComponents.TaskObjectPanel.buttonDirection_Click(Object sender, EventArgs e) in C:\Documents and Settings\jpearson.MAAD\My Documents\Visual Studio Projects\Simulator\MAAD.Network\Utilities\VisualComponents\TaskObjectPanel.cs:line 415
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
thanks,
Jake