Posted 13 years ago by Alex
Avatar
I just installed a new release. It looks great and thanks for addressing many issues. Nevertheless I immediately started to see one big problem. With the new release when I edit my code in the editor sometimes the Exception pops up “Unable to cast object of type “ad” to the type “ActiproSoftware.SyntaxEditor.Addons.Dotnet.Dom.IDomType”. After this the application always hangs up and I need to kill it.

First of all, there is no type “ad" neither in my application, nor in the code I am trying to edit. At the same time if I switch back to the old version, everything is working fine.
Do you have any ideas what can be wrong?

Thanks,
Alex

Comments (7)

Posted 13 years ago by Alex
Avatar
I just reproduced the problem with you test applcaition

Here is the code snippet

namespace SMLibrary
{
   
    using AsOneTech.SDP.Core;
    class Test
    {
        void Do()
        {
            IAgent a;
            a.
        }
    }
    
}
As soon as I type a. the following exception occurs. Please let me know if I can provide any additional information.

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

************** Exception Text **************
System.InvalidCastException: Unable to cast object of type 'ad' to type 'ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.IDomType'.
at ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.DotNetProjectResolver.a(IDomType A_0, String A_1)
at ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.DotNetProjectResolver.GetTypeInheritanceHierarchy(IDomType type)
at ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.DotNetProjectResolver.GetMembers(IDomType contextType, IDomType targetType, String name, DomBindingFlags flags)
at ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.DotNetProjectResolver.b(Hashtable A_0, IDomType A_1, IDomType A_2, DomBindingFlags A_3)
at ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpSyntaxLanguage.b(SyntaxEditor A_0, Boolean A_1)
at ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpSyntaxLanguage.ShowIntelliPromptMemberList(SyntaxEditor syntaxEditor)
at ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpSyntaxLanguage.OnSyntaxEditorKeyTyped(SyntaxEditor syntaxEditor, KeyTypedEventArgs e)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.a(EditorView A_0, Keys A_1, Char A_2, Boolean A_3)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyPress(KeyPressEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
TestApplication
Assembly Version: 1.0.2524.15684
Win32 Version: 1.0.2524.15684
CodeBase: file:///C:/Program%20Files/Actipro%20Software/SyntaxEditor/v4.0.0235/TestApplication-CSharp.Net20/bin/Debug/TestApplication.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ActiproSoftware.Shared.Net20
Assembly Version: 1.0.84.0
Win32 Version: 1.0.84.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/ActiproSoftware.Shared.Net20/1.0.84.0__36ff2196ab5654b9/ActiproSoftware.Shared.Net20.dll
----------------------------------------
ActiproSoftware.SyntaxEditor.Net20
Assembly Version: 4.0.235.0
Win32 Version: 4.0.235.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/ActiproSoftware.SyntaxEditor.Net20/4.0.235.0__21a821480e210563/ActiproSoftware.SyntaxEditor.Net20.dll
----------------------------------------
ActiproSoftware.SyntaxEditor.Addons.DotNet.Net20
Assembly Version: 4.0.235.0
Win32 Version: 4.0.235.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/ActiproSoftware.SyntaxEditor.Addons.DotNet.Net20/4.0.235.0__21a821480e210563/ActiproSoftware.SyntaxEditor.Addons.DotNet.Net20.dll
----------------------------------------
ActiproSoftware.WinUICore.Net20
Assembly Version: 1.0.84.0
Win32 Version: 1.0.84.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/ActiproSoftware.WinUICore.Net20/1.0.84.0__1eba893a2bc55de5/ActiproSoftware.WinUICore.Net20.dll
----------------------------------------
System.Design
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The "ad" type might be an internal type obfuscated name. Would you be able to post a small code sample in here that we can paste in our sample project and shows the problem occur? We can get a fix out for you if you can tell us how to repro it. We have some new features for the Grammar Designer that we need to get out soon anyhow.


Actipro Software Support

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I assume you are doing that in the .NET Reflection QuickStart?

If so, can you email over a ZIP file containing the assembly that defines the IAgent
definition? Be sure to include any assemblies that it references.
That way we can load it up and debug it to see what you are seeing.


Actipro Software Support

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Nevermind... I found a way to dupe it. Seems like if you have an interface that inherits another interface defined in code then it blows up. This will be resolved immediately and we'll try and get a new build out tomorrow.


Actipro Software Support

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok, seems to be fixed now. We'll try and get a new maintenance release out tomorrow.


Actipro Software Support

Posted 13 years ago by Alex
Avatar
Guys, you are awesome!
Frankly speaking, this is one of the best products and one of the best supports I've had during my long career.
Thanks!
And yes, the definition of IAgent is

INamedObject
{
string Name {get;}
}
IAgent:INamedObject
{
}
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Thanks for the praise Alex. We appreciate it. The fix is now up.


Actipro Software Support

The latest build of this product (v2020.1 build 0400) was released 29 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.