Unplanned
Last Updated: 04 Aug 2020 06:18 by ADMIN

The attached project causes a decompilation error in the DrawPixels() method:

 

Current member / type: System.Void ConwaysLife.LifeForm::DrawPixels()

Product version: 2019.1.118.0
Exception in: System.Void DrawPixels()

Value does not fall within the expected range.
at ??.??.??(ICodeNode ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Ast\BaseCodeTransformer.cs:line 237
at ??.??.Visit(ICodeNode ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Ast\BaseCodeTransformer.cs:line 276
at ??.??.Visit[??,??](?? ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Ast\BaseCodeTransformer.cs:line 286
at ??.??.Visit(? ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Ast\BaseCodeTransformer.cs:line 317
at ??.??.?(?? ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Ast\BaseCodeTransformer.cs:line 337
at ?.?.?.Match(?? ?, Int32 ?) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Steps\RebuildAnonymousDelegatesStep.cs:line 119
at ?.?.?(?? ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Steps\RebuildAnonymousDelegatesStep.cs:line 28
at ?.?.?(DecompilationContext ?, ?? ??) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Steps\RebuildAnonymousDelegatesStep.cs:line 21
at ??.??.(MethodBody ??, ?? ?, ILanguage ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:line 88
at ??.??.?(MethodBody ??, ILanguage ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:line 70
at Telerik.JustDecompiler.Decompiler.Extensions.??(?? ??, ILanguage , MethodBody ??, DecompilationContext& ?) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:line 95
at Telerik.JustDecompiler.Decompiler.Extensions.??(MethodBody ??, ILanguage , DecompilationContext& ?,  ??) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:line 58
at ??.??.?(ILanguage , MethodDefinition ?,  ??) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\WriterContextServices\BaseWriterContextService

 

The code from from here https://github.com/ericlippert/ConwaysLife/tree/episode28

but since the code is frequently changed I've attached a zip file.

Unplanned
Last Updated: 25 Jun 2020 06:51 by ADMIN
Created by: Yonghan
Comments: 3
Type: Bug Report
1

Code Viewer Font setting is reset every time.

Always Courier New,13 even changing Consolas.

Unplanned
Last Updated: 15 May 2020 07:02 by ADMIN
Created by: Michael
Comments: 2
Type: Bug Report
2

I've noticed that the program when exporting a project gives me cameraInfo.get_VerticalExtent()  instead of cameraInfo.VerticalExtent 

It seems to be making a method instead of a property of an object.

Unplanned
Last Updated: 23 Apr 2020 06:31 by ADMIN

Decompiling the following code in either DEBUG or RELEASE build gives the exception below:

 

        public IEnumerable<int> YieldTest(IEnumerable<int> sequenceA, List<int> sequenceB)
        {
            foreach (var i in sequenceA)
            {
                foreach (var j in sequenceB)
                {
                    yield return i*j;
                }
            }
        }

 

So a foreach nested inside another foreach...

 

Current member / type: System.Collections.Generic.IEnumerable`1<System.Int32> Tests.TestClass::YieldTest(System.Collections.Generic.IEnumerable`1<System.Int32>,System.Collections.Generic.List`1<System.Int32>)
File path: C:\Projects\Sandbox\Decompile Test\Tests\Tests\bin\Release\Tests.dll

Product version: 2019.1.118.0
Exception in: System.Collections.Generic.IEnumerable<System.Int32> YieldTest(System.Collections.Generic.IEnumerable<System.Int32>,System.Collections.Generic.List<System.Int32>)

Invalid state value
at €—..(‚ ž, Queue`1 , ILogicalConstruct ”) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\LogicFlow\YieldGuardedBlocksBuilder.cs:line 203
at €—..Ÿ(‚ ž) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\LogicFlow\YieldGuardedBlocksBuilder.cs:line 187
at €—..(‚ ž) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\LogicFlow\YieldGuardedBlocksBuilder.cs:line 129
at €—..š(„ ‚) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\LogicFlow\YieldGuardedBlocksBuilder.cs:line 76
at €—..() in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\LogicFlow\LogicalFlowBuilderStep.cs:line 126
at €—..œ(DecompilationContext ™, •Ÿ €–) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\LogicFlow\LogicalFlowBuilderStep.cs:line 51
at ‚–.™“.(MethodBody €–, •Ÿ Ÿ, ILanguage ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:line 88
at ‚–.™“.‹(MethodBody €–, ILanguage ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:line 70
at Telerik.JustDecompiler.Decompiler.Extensions.“(MethodBody €–, DecompilationContext †, Œ Ÿ“, Func`2 ”, DecompilationContext& ”“) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:line 104
at Telerik.JustDecompiler.Decompiler.Extensions.”(MethodBody €–, DecompilationContext †, ž& ž) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:line 139
at ž..–() in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Steps\RebuildYieldStatementsStep.cs:line 134
at ž..Match(‰ œ—) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Steps\RebuildYieldStatementsStep.cs:line 49
at ž..œ(DecompilationContext ™, •Ÿ €–) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Steps\RebuildYieldStatementsStep.cs:line 20
at ‚–.™“.(MethodBody €–, •Ÿ Ÿ, ILanguage ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:line 88
at ‚–.™“.‹(MethodBody €–, ILanguage ) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:line 70
at Telerik.JustDecompiler.Decompiler.Extensions.›“(™“ œ“, ILanguage , MethodBody €–, DecompilationContext& ™) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:line 95
at Telerik.JustDecompiler.Decompiler.Extensions.š“(MethodBody €–, ILanguage , DecompilationContext& ™,  œ–) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:line 58
at ——.ƒ˜.—(ILanguage , MethodDefinition €,  œ–) in C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\WriterContextServices\BaseWriterContextService.

 

I also send an email about this when I encountered it earlier but here is an actual code example.

Unplanned
Last Updated: 22 Apr 2020 12:13 by ADMIN

 

In certain situations with a for-loop nested inside another loop, a break-statement in the inner loop will decompile to a goto that also exits the outer loop.

If this code is compiled in RELEASE mode:

        public void NestedForTest(IEnumerable<char> line)
        {
            foreach (var ch in line)
            {
                for (int i = 0; i < 4; i++)
                {
                    Console.Write("-");     // If this line is removed it works
                    if (ch == 't') break;
                    Console.Write(ch);
                }
            }
            Console.WriteLine();
        }

 

The following code is decompiled:

        public void NestedForTest(IEnumerable<char> line)
        {
        Label0:
            foreach (char ch in line)
            {
                for (int i = 0; i < 4; i++)
                {
                    Console.Write("-");
                    if (ch == 't')
                    {
      goto Label0;   // THIS IS WRONG!
                    }
                    Console.Write(ch);
                }
            }
            Console.WriteLine();
        }

NOTE:

- It is only a problem when the code is compiled in a RELEASE configuration (in DEBUG it interpret it as a while-loop and the code is correct)

- If the line before the exit-check is removed (see comment in code) it decompiles correctly.

 

                 
Unplanned
Last Updated: 08 Jan 2020 15:54 by ADMIN

Compile the following code:

using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace BugReport {

	public class CustomObservableCollection<T> : ObservableCollection<T> {

		public void AddRange<S>(IEnumerable<S> list) where S : T {
			using (IEnumerator<S> enumerator = list.GetEnumerator()) {
				while (enumerator.MoveNext()) {
					base.Add(enumerator.Current);
				}
			}
		}

	}

}

Open the generated assembly in Just Decompile and look at the result. In my version (2019.1.118.0) I get the following incorrect (not compilable) results:

C#:

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace BugReport
{
    public class CustomObservableCollection<T> : ObservableCollection<T>
    {
        public CustomObservableCollection()
        {
        }

        public void AddRange<S>(IEnumerable<S> list)
        where S : T
        {
            foreach (S  in list)
            {
                base.Add((T)(object));
            }
        }
    }
}

VB:


Imports System
Imports System.Collections.Generic
Imports System.Collections.ObjectModel

Namespace BugReport
    Public Class CustomObservableCollection(Of T)
        Inherits ObservableCollection(Of T)
        Public Sub New()
            MyBase.New()
        End Sub

        Public Sub AddRange(Of S As T)(ByVal list As IEnumerable(Of S))
            For Each  As S In list
                MyBase.Add(DirectCast(, T))
            Next
        End Sub
    End Class
End Namespace

 

Unplanned
Last Updated: 21 Nov 2019 12:44 by ADMIN
Created by: Joe
Comments: 0
Type: Bug Report
0

I downloaded the following from Microsoft - these are used by the Azure Service Fabric Cluster - and they have issues:

http://download.microsoft.com/download/6/5/6/656AA596-B832-4F31-A026-D29A212E041D/ServiceFabricNodeBootstrapUpgradeAgent.1.0.0.188.zip

 

http://download.microsoft.com/download/6/5/6/656AA596-B832-4F31-A026-D29A212E041D/ServiceFabricNodeBootstrapAgent.1.0.0.188.zip

 

I am trying to determine where they build an http string. To read the code, it looks like they do nothing. My guess is there i something 'special" going on. Looks like an opportunity to build out Just-Decompile...

 

 

Upon de-compiling, the actual meat of the services is (whatever this means):

 

        private async void ThreadProc(object state)
        {
            Service.<ThreadProc>d__7 variable = new Service.<ThreadProc>d__7();
            variable.<>4__this = this;
            variable.<>t__builder = AsyncVoidMethodBuilder.Create();
            variable.<>1__state = -1;
            variable.<>t__builder.Start<Service.<ThreadProc>d__7>(ref variable);
        }

 

 

 

 

 

 


Unplanned
Last Updated: 21 Nov 2019 12:42 by ADMIN

When decompiling an enum and looking at it in IL, the whole type definitions of the underlying type are missing, the assignments are incorrect and there is a sort order issue (JustDecompile sorts according to the Name but should keep the original order how the elements have been compiled).

 

Current decompilation:

.class public auto ansi sealed Hafner.Testing.Enums.CharEnum
    extends [mscorlib]System.Enum
{
    Alpha = α
    Beta = β
    Chi = χ
    Delta = δ
    Epsilon = ϵ
    Eta = η
    Gamma = γ
    Iota = ι
    Kappa = κ
    Lambda = λ
    Mu = μ
    Nu = ν
    Omega = ω
    Omicron = o
    Phi = ϕ
    Pi = π
    Psi = ψ
    Rho = ρ
    Sigma = σ
    Tau = τ
    Theta = θ
    Upsilon = υ
    Xi = ξ
    Zeta = ζ
}

 

Expected decompilation:

.class public auto ansi sealed Hafner.Testing.Enums.CharEnum
       extends [mscorlib]System.Enum
{
	.field public specialname rtspecialname char value__
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Alpha = char(0x03B1)    //'α'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Beta = char(0x03B2)     //'β'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Gamma = char(0x03B3)    //'γ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Delta = char(0x03B4)    //'δ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Epsilon = char(0x03F5)  //'ϵ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Zeta = char(0x03B6)     //'ζ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Eta = char(0x03B7)      //'η'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Theta = char(0x03B8)    //'θ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Iota = char(0x03B9)     //'ι'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Kappa = char(0x03BA)    //'κ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Lambda = char(0x03BB)   //'λ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Mu = char(0x03BC)       //'μ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Nu = char(0x03BD)       //'ν'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Xi = char(0x03BE)       //'ξ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Omicron = char(0x006F)  //'o'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Pi = char(0x03C0)       //'π'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Rho = char(0x03C1)      //'ρ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Sigma = char(0x03C3)    //'σ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Tau = char(0x03C4)      //'τ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Upsilon = char(0x03C5)  //'υ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Phi = char(0x03D5)      //'ϕ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Chi = char(0x03C7)      //'χ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Psi = char(0x03C8)      //'ψ'
	.field public static literal valuetype Hafner.Testing.Enums.FlagsVanillaChar Omega = char(0x03C9)    //'ω'

}


The displayed IL code is not valid IL and lots of details are missing. It would be nice if that could be fixed.

I attach a test DLL (still status 'work in progress') with different valid and invalid enum definitions on which you can try out any fixed code.

Best regards
Christoph

Unplanned
Last Updated: 12 Nov 2019 08:39 by ADMIN
Created by: Michael
Comments: 0
Type: Bug Report
2

When I export a project, enums are not processed properly.  I get:

ViewType viewType1 = activeView.ViewType;
switch (viewType1)
{
     case 1:
          {
                break;
           }
     case 2:
           {
               return result;
           }
}

instead of:

                ViewType viewType1 = activeView.ViewType;
                switch (viewType1)
                {
                    case ViewType.FloorPlan:
                        {
                            break;
                        }
                    case ViewType.CeilingPlan:
                        {
                            return result;
                        }
                }
It's very time consuming to have to go through and figure out which enum to pick when there can be over a hundred options!
Unplanned
Last Updated: 26 Aug 2019 07:18 by ADMIN

Compile this simple code in VB Net


    Public Property Test(ByVal v As Integer) As Integer
        Get
            Return Math.Abs(v)
        End Get
        Set
            v = 1
        End Set
    End Property

   Then decompile it, what yo see is not working as C# code


        public int Test(int v)
        {
            get
                {
               return Math.Abs(v);
            }
            set
                {
                v = 1;
            }
        }

 

 

Unplanned
Last Updated: 09 Jul 2019 15:07 by ADMIN

i tried to de compile one app with just decompile but its not decompiling correctly , please check the screenshots and also i have attached the file 

 

thanks

sendpackage method 

 

 

Unplanned
Last Updated: 24 Jun 2019 07:24 by ADMIN

(Attached is a picture of the box I am referring to)

When I moused over Func<HttpContext> (seen in red as I had hit "skip" during load), the box seen in picture pops up, and it flickers in and out.  It's not possible to actually click the "Locate Assembly" button because as soon as I move the mouse the popup disappears.

 

Attached is the project I used to create the DLL.  It is a multi-target project.  It uses .NET Core 3.0 Preview 6 and net46 targets.  I was inspecting the .NET Core 3.0 version of the DLL.

Unplanned
Last Updated: 11 Mar 2019 13:04 by ADMIN

When clicking a particular recursive function call (go to definition) the entire application hangs and must be reopened.

I think I've whittled the problem down to the following components:

  • abstract generic class - Class1<T>
  • virtual method accepting T - Foo()
  • abstract method returning T - Bar()
  • recursive call of virtual function Foo() with call to abstract function Bar() as parameter

The sequence of events also seems to have a part. After decompiling, select Foo() in the tree to the left, then click the recursive call in the code.


Of course nothing should really happen when this is clicked, as one must be at said definition before clicking the recursive call so nothing would really happen, but still...