PDA

View Full Version : Editor exception


guy
03-17-2006, 12:42 PM
I was using the editor and typed in NinjaTrader. and as I pressed the . there was an exception. This is the call stack:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.ReflectionTypeLoadException: One or more of the types in the assembly unable to load.
at System.Reflection.Module.GetTypesInternal(StackCra wlMark& stackMark)
at System.Reflection.Assembly.GetTypes()
at ActiproSoftware.SyntaxEditor.IntelliPromptMemberLi st.GetItemReflectionForAssemblyNamespacesAndTypes( Assembly[] assemblies, IntelliPromptNamespaceAndTypeFlags[] flags, StringCollection namespaceNames, Type mustInheritFrom, Boolean ignoreCase)
at ActiproSoftware.SyntaxEditor.IntelliPromptMemberLi st.AddReflectionForAssemblyNamespacesAndTypes(Asse mbly[] assemblies, IntelliPromptNamespaceAndTypeFlags[] flags, StringCollection namespaceNames, Type mustInheritFrom, Boolean ignoreCase)
at NinjaTrader.Gui.Code.Editor.OnTrigger(Object sender, TriggerEventArgs e)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnTrigge r(TriggerEventArgs e)
at ActiproSoftware.SyntaxEditor.SyntaxEditor._1(Edito rView , Keys , Char , Boolean )
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyPre ss(KeyPressEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(M essage& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Mes sage& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc( Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

NinjaTrader_Dierk
03-18-2006, 01:03 AM
I can not reproduce here.

1) What release are you running on?
2) Please
- terminate NT
- remove <install>\bin\Custom\NinjaTrader.Custom.dll
- start NT
- pull up any custom or system indicator file
- right click -> compile
- try again typign in "NinjaTrader."

guy
03-18-2006, 01:40 AM
That fixed it - thanks.

After I posted that I discovered that it was happening will all packages and not just the NinjaTrader package so must have been something to do with the first time that I ran that version of Ninja.

I'm running the most recent version that could be downloaded as of yesterday (3/17).

NinjaTrader_Dierk
03-18-2006, 01:45 AM
Thanks. So it was 5.1.1000.1.

What version had you installed before?

guy
03-18-2006, 02:36 PM
Yes 5.1.1000.1

Previously installed was one of the betas that included Ninja Script - I can't remember which one.

NinjaTrader_Dierk
03-20-2006, 12:15 AM
Thanks for feedback.

Harry
12-06-2009, 08:47 AM
For both NT 6.5.1000.14 and NT 7.0.0.5

When you open an indicator with the NT editor and then quickly turn the mouse wheel to scroll down the code of an indicator, this may cause an exception. (This happens before any modification of the code, just looking at the indicator). I have observed this problem regularly for all versions of NT 6.5. and also NT 7. Restart of NT solves the issue, next time I turn the mouse wheel slowly.....

Please find below excerpt from the trace file of today relating to the exception:

2009-12-06 16:34:39:031 in OnUnhandledThreadException
2009-12-06 16:34:39:093 ********* exception trapped *********
2009-12-06 16:34:39:093 Die Auflistung wurde geändert. Der Enumerationsvorgang kann möglicherweise nicht ausgeführt werden.
2009-12-06 16:34:39:093 bei System.Collections.Hashtable.HashtableEnumerator.M oveNext()
bei d.a(IDomType[] A_0, String A_1, DomBindingFlags A_2)
bei ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.Dot NetProjectResolver.GetMember(IDomType contextType, IDomType targetType, String name, DomBindingFlags flags)
bei ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpC ontext.a(Document A_0, CompilationUnit A_1, DotNetProjectResolver A_2)
bei ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpC ontext.GetContextAtOffset(Document document, Int32 offset, CompilationUnit compilationUnit, DotNetProjectResolver projectResolver)
bei ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpS yntaxLanguage.GetContext(SyntaxEditor syntaxEditor, Int32 offset, Boolean beforeOffset, Boolean forParameterInfo)
bei ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.Dot NetSyntaxLanguage.a(DotNetLanguage A_0, SyntaxEditor A_1, Int32& A_2)
bei ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpS yntaxLanguage.OnSyntaxEditorViewMouseHover(SyntaxE ditor syntaxEditor, EditorViewMouseEventArgs e)
bei ActiproSoftware.SyntaxEditor.SyntaxLanguage.a(Synt axEditor A_0, EditorViewMouseEventArgs A_1)
bei ActiproSoftware.SyntaxEditor.SyntaxEditor.b(Editor ViewMouseEventArgs A_0)
bei ActiproSoftware.SyntaxEditor.EditorView.OnMouseHov er(MouseEventArgs e)
bei ActiproSoftware.WinUICore.UIElement.ActiproSoftwar e.WinUICore.IInputElement.RaiseMouseHoverEvent(Mou seEventArgs e)
bei ActiproSoftware.WinUICore.UIControl.OnMouseHover(E ventArgs e)
bei System.Windows.Forms.Control.WmMouseHover(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
bei ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc( Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Did not post it for NT 7, because it is a minor bug, but maybe you could check with ActiproSoftware the reasons for this.

NinjaTrader_Dierk
12-06-2009, 08:54 AM
Sorry, I could not reproduce on latest NT7B5. I started scrolling mouse wheel right after double clicking on the indicator file in the indicator dialog. Works no problem here.

Harry
12-06-2009, 10:43 AM
Thankyou for answering, Dierk. This does not happen every time, but it only causes exceptions from time to time.

I just tried 5 times and could not reprocude it either. But I know it will happen again.