Ooops - a few glitches

6 posts, 0 answers
  1. Espen
    Espen avatar
    1 posts
    Member since:
    Jun 2011

    Posted 18 Jun 2011 Link to this post

    Just a few observations:
    1: Globalization - code doesn't change between cultures
    Don't do this:
    // 1.0 ends up as 1,0 in code
    (1.0).ToString();

    This is better:
    // 1.0 ends up as 1.0 in code:
    (1.0).ToString(System.Globalization.
    CultureInfo.InvariantCulture);


    2: Alpha stage??
    When decompiling interfaces:
     properties ends up as field declarations
     methods are declared as abstract

    3: Error handling
    Please don't use the output window for error output - even a 99.9999% succesful conversion becomes 100% useless when all the generated code is replaced by the exception dump - adding a separate window (like Visual Studio) for the error message, and rendering the offending IL in a

    // FIXME: <IL code>

    block, as part of the generated code, would provide a quick temporary fix for this issue

    Unrecognized type in ternary conditonal assignment, UnaryExpression at .‰."() at .‰."() at .‰.() at Telerik.JustDecompiler.Decompiler.StatementDecompiler.€(InstructionBlock block) at Telerik.JustDecompiler.Decompiler.StatementDecompiler.() at Telerik.JustDecompiler.Decompiler.StatementDecompiler.Process(DecompilationContext context, BlockStatement body) at Telerik.JustDecompiler.Decompiler.DecompilationPipeline.Run(MethodBody body, ILanguage language) at Telerik.JustDecompiler.Decompiler.Extensions.(DecompilationPipeline pipeline, ILanguage language, MethodBody body) at Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.Write(MethodDefinition method) at Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.•ƒ(IMemberDefinition member, Boolean isFirstMember) at Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.WriteTypeMembers(TypeDefinition type, Func`3 writeMember, Boolean writeNewLine, Boolean showCompilerGeneratedMembers) at Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.Write(TypeDefinition type, Func`3 writeMember, Boolean writeNewLine, Boolean showCompilerGeneratedMembers) at Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.WriteType(TypeDefinition type, Boolean showCompilerGeneratedMembers) at JustDecompile.CodeViewer.ViewModels.CodeViewerViewModel.(AssemblyMemberNode member, CancellationToken cancellationToken) in c:\B\Behemoth\JustDecompile Production Build\Sources\UI\JustDecompile.CodeViewer\ViewModels\CodeViewerViewModel.cs:line 107

    Best regards
    Espen Harlinn

  2. Tsviatko Yovtchev
    Admin
    Tsviatko Yovtchev avatar
    409 posts

    Posted 27 Jun 2011 Link to this post

    Hello Espen,

     Thanks for getting back to us. We really find user's feedback highly valuable.

    1: I am not completely sure I fully understand what you have in mind. Could you provide the MSIL snippet that generated this code? It's much easier to judge code correctness that way.

    2: That definitely should not be the case. What are you trying to decompile? Can we get a copy of it? If that's not possible can we get the MSIL that results in this?

    3: Well, rather unfortunately, if we end up throwing an exception the chances are we produce nothing useful after that point. We could, though, display what we have by that point together with the MSIL for the complete memeber. That's gonna make error reporting much easier. Thanks for the insight. 

    Also, again could we get the asembly or the MSIL that resulted in this error?

    All the best,
    Tsviatko Yovtchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. DevCraft banner
  4. Paul Dhertoghe
    Paul Dhertoghe avatar
    13 posts
    Member since:
    Oct 2012

    Posted 29 Jun 2011 Link to this post

    Hello,

    I encountered exactly the same problem when looking at the RadMenuItem class of "Telerik RadControls Q3 2010 SP1", assembly "Telerik.Windows.Controls.Navigation.dll", and in the code window clicking on "Expand all members":

    Current member / type: Telerik.Windows.Controls.RadMenuItemFile path: C:\projects\Recomatics\NxGProduct\Tools\Telerik RadControls Q3 2010 SP1\Binaries\Silverlight\Telerik.Windows.Controls.Navigation.dllUnrecognized type in ternary conditonal assignment, UnaryExpression at .‰."() at .‰."() at .‰.() at Telerik.JustDecompiler.Decompiler.StatementDecompiler.€(InstructionBlock block) at Telerik.JustDecompiler.Decompiler.StatementDecompiler.() at Telerik.JustDecompiler.Decompiler.StatementDecompiler.Process(DecompilationContext context, BlockStatement body) at Telerik.JustDecompiler.Decompiler.DecompilationPipeline.Run(MethodBody body, ILanguage language) at Telerik.JustDecompiler.Decompiler.Extensions.(DecompilationPipeline pipeline, ILanguage language, MethodBody body) at Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.Write(MethodDefinition method) at Telerik.JustDecompiler.Languages.BaseLanguageWriter.•ƒ(IMemberDefinition member, Boolean isFirstMember) at Telerik.JustDecompiler.Languages.BaseLanguageWriter.(TypeDefinition type, Func`3 writeMember, Boolean writeNewLine, Boolean showCompilerGeneratedMembers) at Telerik.JustDecompiler.Languages.BaseLanguageWriter.Write(TypeDefinition type, Func`3 writeMember, Boolean writeNewLine, Boolean showCompilerGeneratedMembers) at Telerik.JustDecompiler.Languages.BaseLanguageWriter.WriteType(TypeDefinition type, Boolean showCompilerGeneratedMembers) at JustDecompile.CodeViewer.ViewModels.CodeViewerViewModel.(AssemblyMemberNode member, CancellationToken cancellationToken) in c:\B\Behemoth\JustDecompile Production Build\Sources\UI\JustDecompile.CodeViewer\ViewModels\CodeViewerViewModel.cs:line 107

     

    With kind regards,

    Paul D'hertoghe

  5. Nathan
    Nathan avatar
    6 posts
    Member since:
    Apr 2011

    Posted 04 Jul 2011 Link to this post

    "When decompiling interfaces:
    properties ends up as field declarations
      methods are declared as abstract"

    Just noticed I have the same problem with my application. (created in Visual studio 2005) 

    In my interface I have a property declared like this:
    string ErrorMessage { get; }

    In JustDecompile it gets shown like this:
    string ErrorMessage;

      This last line results in a "interfaces cannot contain fields" error messages (in visual studio). 
    And functions like:
    void RepairDatabase();

    are shown by JustDecompile as:
    abstract void RepairDatabase();

    As far as I know they shouldn't be abstract...

    "What are you trying to decompile? Can we get a copy of it?"
    I'm trying to decompile an application I write in my free time. It can connect to an sqlserver, sqlite, mysql and access 2000 database. It can show the data in the tables, execute query and ... transfer data from any table in any database to any other table in any database. The program has 1 interface and 4 classes derived (is the correct word?) from that interface (1 class for each type of supported database type)
    I can upload the source code somewhere, if you wish...
  6. Yordan Dikov
    Admin
    Yordan Dikov avatar
    69 posts

    Posted 05 Jul 2011 Link to this post

    Hello Paul Dhertoghe,

     Thank you for the example given here. It really helps us to know which assemblies cause problems. We will most definitely fix this issue in some of our next versions. Please, update regularly.
    Kind regards,

    Yordan Dikov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  7. Paul Dhertoghe
    Paul Dhertoghe avatar
    13 posts
    Member since:
    Oct 2012

    Posted 05 Jul 2011 Link to this post

    Hi Yordan,

    glad I could help, I know how difficult it can be to reproduce a bug or to know its context.

    Regarding your answer, I hope you meant: "We will most definitely fix this issue in one of the next versions"
    "in some of our next versions" means: in some of the next versions it will be fixed, in some of the next versions it will not be fixed :-(

    With kind regards,

    Paul D'hertoghe
Back to Top
DevCraft banner