This is a migrated thread and some comments may be shown as answers.

Some weird things JustDecompile does

1 Answer 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 07 Dec 2011, 07:14 AM
JustDecompile just saved me a ton of work after VS ate my project.  It was close enough that I didn't have to rewrite everyting, but the project it created didn't compile when opened.

I can't find anywhere to report bugs for JustDecompile, so here's a thread for stuff I encountered tonight.

First up, it made this class:
internal class <Module>
{
 
}

and the compiler did not like it one bit.

After removing that code, the next errors I encountered were related to the common way of implementing IDisposable.  The code ended up implementing a Finalizer instead of a destructor:
public void Dispose()
{
    this.Dispose(true);
    GC.SuppressFinalize(this);
}
 
protected void Dispose(bool disposing)
{
    if (disposing != 0)
    {
        //Dispose of stuff
    }
}
 
protected override void Finalize()
{
    try
    {
        this.Dispose(false);
    }
    finally
    {
        this.Finalize();
    }
}


So  got this error next: "Do no override object.Finalize. Instead, provide a destructor"

Ok, next up, after fixing the finalizer to be a destructor, now I was hit with this error, "Operator '!=' cannot be applied to operands of type 'bool' and 'int' because the Dispose method was checking a bool against 0.

I had more errors as well, mainly on using out params and those methods needed to be fixed as well.

Overall, I like JustDecompile, especially since it saved me a lot of time, but there are a few rough edges that could be smoothed.

I do have the original exe if needed to repro these errors

thanks,
matt

1 Answer, 1 is accepted

Sort by
0
Yordan Dikov
Telerik team
answered on 14 Dec 2011, 09:24 AM
Hi Matt,

 Thank you for the nice words. We're glad to hear that JustDecompile saved you some time. As for the bug reports - you're in the right place.
Now for the bugs - we're aware that sometimes we compare bool to int and we're currently working really hard on this, as well on other decompilation problems we know about. We also know that we output compiler generated classes when we create projects and that it causes some issues when you try to recompile the result. About IDisposable and out parameters, we've logged it and we'll do our best to fix those soon as well.
In the end, I want to thank you for the time you spent writing this post. Stay tuned and don't hesitate to write us about anything else you don't like in JustDecompile.

All the best,
Yordan Dikov
the Telerik team

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

Tags
General Discussions
Asked by
Matt
Top achievements
Rank 1
Answers by
Yordan Dikov
Telerik team
Share this question
or