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

Bug report of "Array"

4 Answers 60 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
maledong
Top achievements
Rank 1
maledong asked on 18 Aug 2013, 08:21 AM
Hi all, here's the report you can see:
1) Go to "Array" class.
2) expand and go to "CreateInstance".
3) expand the methods one by one (in VISUAL BASIC NOT C#), you can see error;this also happens "SetValue" or "GetValue" in Visual Basic.

 Public Function GetValue(ByVal ParamArray indices As Integer()) As Object
            Dim numPointer As Integer*
            If (indices = Nothing) Then
                Throw New ArgumentNullException("indices")
            End If
            If (Me.Rank <> CInt(indices.Length)) Then
                Throw New ArgumentException(Environment.GetResourceString("Arg_RankIndices"))
            End If
            Dim numArray As Integer() = indices
            Dim numArray1 As Integer() = numArray
            If (numArray = Nothing OrElse CInt(numArray1.Length) = 0) Then
                numPointer = Nothing
            Else
                numPointer =
Current member / type: System.Object System.Array::GetValue(System.Int32[])
File path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll

Product version: 2013.2.613.0
Exception in: System.Object GetValue(System.Int32[])

The unary opperator AddressReference is not supported in VisualBasic
在 Ÿ.Ÿ.ToString(UnaryOperator –š) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:行号 660
在 Ÿ.Ÿ.•( ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:行号 988
在 †”.–.Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:行号 150
在 Ÿ˜..Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1057
在 Ÿ˜..œ(Boolean œ, – , String œ, String œ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 3074
在 Ÿ˜..•(Ÿ ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 782
在 Ÿ.Ÿ.•(Ÿ ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:行号 736
在 †”.–.Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:行号 153
在 Ÿ˜..Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1057
在 Ÿ˜..•( ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1985
在 †”.–.Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:行号 96
在 Ÿ˜..Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1057
在 Ÿ˜..Visit(IEnumerable €) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1979
在 Ÿ˜..˜.”() 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1941
在 Ÿ.Ÿ.Œœ(Action , String šš) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:行号 401
在 Ÿ˜..”(•Ÿ ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1939
在 †”.–.Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:行号 81
在 Ÿ˜..Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1057
在 Ÿ.Ÿ.•( ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:行号 126
在 †”.–.Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:行号 90
在 Ÿ˜..Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1057
在 Ÿ˜..Visit(IEnumerable €) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1979
在 †”.–.Ž•(’ ž•) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:行号 320
在 †”.–.Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:行号 78
在 Ÿ˜..Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1057
在 Ÿ˜..Visit(IEnumerable €) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1979
在 Ÿ˜..˜.”() 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1941
在 Ÿ.Ÿ.Œœ(Action , String šš) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:行号 401
在 Ÿ˜..”(•Ÿ ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1939
在 †”.–.Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:行号 81
在 Ÿ˜..Visit(„” ) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1057
在 Ÿ˜..Write(Ž” Ž”) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1032
在 Ÿ˜..Write(MethodDefinition €) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:行号 1719
在 Ÿ˜.š.WriteInternal(IMemberDefinition , Boolean ˜‘, Boolean ™) 位置 c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseLanguageWriter.cs:行号 281

mailto: JustDecompilePublicFeedback@telerik.com

4 Answers, 1 is accepted

Sort by
0
Momchil
Telerik team
answered on 20 Aug 2013, 06:36 AM
Hello,

Thanks for pointing us this issue.  In fact, we already are familiar with it.  The problem is that pointer operations in C# (and in MSIL, in fact) are not equivalently reproducible in VB.  There might be some workarounds so that we could produce code that does (almost) the same job, however, it would definitely would not compile to the same Intermediate Language as the original code.   We have recently put a lot of effort into producing better and more correct VB.NET code and we will continue on working on it, so please stay tuned for our latest releases and fixes.

Thanks again! Happy decompiling! 

Regards,
Momchil
Telerik
Tell us what you think about JustDecompile. Your opinion matters! You can use our forum, or our JustDecompile UserVoice website for feature requests.
0
maledong
Top achievements
Rank 1
answered on 24 Aug 2013, 06:18 AM
OK, many thanks and wait for your fixing the problem;)
0
joe
Top achievements
Rank 1
answered on 19 Nov 2013, 09:02 AM
Perhaps having an example of vb code that once it copmiles generates this error would help? Following is the shortest method I have that when decompiled produces this error..

Private Sub buscarPrearmadoV3(IdsO As Object)
            Dim Ids = TryCast(IdsO, Integer())
            If Not Ids.AnyJuni Then Exit Sub
            TraceWarn("MULTIPACKAGE", "Buscando Premarmados V3, fuera del Dinamicos")
            Try

                Dim idzonorix As Integer? = idZonOr.ToIntNullable.GetValueOrDefault : If idzonorix < 1 Then idzonorix = Nothing
                Dim idzonx As Integer? = idZon.ToIntNullable.GetValueOrDefault : If idzonx < 1 Then idzonx = Nothing
                Dim valorCombinacion As String = String.Empty
                Dim idAlo As Integer? = Nothing, idRut As Integer? = Nothing, idPaq As Integer? = Nothing, idSal As Integer? = Nothing
                If _BUSCARMAS.HasValue AndAlso _BUSCARMAS.Value.ListaProductoAFijar IsNot Nothing Then
                    Dim productoFijarHotel As ProductDef.Paquetes.ExtraInfoBuscar.ProductoAFijar = (From fijar In _BUSCARMAS.Value.ListaProductoAFijar Where fijar.ProductType = "H").FirstOrDefault
                    If Not IsNothing(productoFijarHotel) AndAlso Not IsNothing(productoFijarHotel.ProductUnicCode) Then valorCombinacion = productoFijarHotel.ProductUnicCode
                    If Not IsNothing(productoFijarHotel) AndAlso Not IsNothing(productoFijarHotel.ProductId) Then idAlo = CType(productoFijarHotel.ProductId, Integer?)
                End If
                Dim Params As New ParameterPaqPowerSearch(fSal, idzonorix, idzonx, idPaq, idSal, idRut, idAlo, ClaseProd, Me.distribucion, True, -1, 0, valorCombinacion, TDO.Precio)
                Dim psPrearmados As New PrearmadoPAQBookingEngine.powerSearch(Params)

                Dim ListaResultados = psPrearmados.SearchV3(Ids).Cast(Of InfoResultadoV2).ToList()

                If Not PrearmadoPAQBookingEngine.powerSearch.SBLog Is Nothing Then
                    LogBBDD.guardarLog(LogBBDD.proveedor.Paquetes, LogBBDD.nivel.disponibilidad, False, "debugAvanz", PrearmadoPAQBookingEngine.powerSearch.SBLog.ToString)
                    TraceWarn("MULTI > buscarLocalV3", PrearmadoPAQBookingEngine.powerSearch.SBLog.ToString)
                End If

                Dim v3Resultados = ConvertirResultadosV2V3(Of PrearmadoPAQBookingEngine.InfoResultadoPREV3)(ListaResultados)
                SyncLock listaResultado
                    If v3Resultados.AnyJuni Then Me.listaResultado.AddRange(v3Resultados)
                End SyncLock
            Catch err As Exception
                LogBBDD.writeErrorThread(err, "buscarPreamadosPaquete")
            End Try

            TraceWarn("MULTIPACKAGE", "Terminado Buscando Premarmados V3, fuera del Dinamicos")
        End Sub


Stacktrace:

Current member / type: System.Void MultiPackageBookingEngine.PowerSearchV3::buscarPrearmadoV3(System.Object)
File path: C:\tempsourcesafe\BookingEngineBranch2012A\BookingEngine_v35a_test\LastVersionDLL\multipackagebookingengine.dll

Product version: 2013.3.1029.1
Exception in: System.Void buscarPrearmadoV3(System.Object)

The unary opperator AddressReference is not supported in VisualBasic
en Ÿ.Ÿ.ToString(UnaryOperator –š) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:línea 824
en Ÿ.Ÿ.•( ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:línea 1198
en †”.–.Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:línea 150
en Ÿ˜..Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1044
en Ÿ˜..‹(– –) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2503
en Ÿ˜..•( ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2536
en †”.–.Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:línea 138
en Ÿ˜..Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1044
en Ÿ˜..•(Ÿ ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 783
en Ÿ.Ÿ.•(Ÿ ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:línea 946
en †”.–.Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:línea 153
en Ÿ˜..Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1044
en Ÿ˜..•( ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2063
en †”.–.Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:línea 96
en Ÿ˜..Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1044
en Ÿ˜..Visit(IEnumerable €) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2057
en Ÿ˜..˜.”() en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2019
en Ÿ.Ÿ.Œœ(Action , String šš) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:línea 431
en Ÿ˜..”(•Ÿ ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2017
en †”.–.Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:línea 81
en Ÿ˜..Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1044
en Ÿ.Ÿ.•( ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:línea 89
en †”.–.Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:línea 132
en Ÿ˜..Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1044
en Ÿ˜..Visit(IEnumerable €) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2057
en Ÿ˜..˜.”() en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2019
en Ÿ.Ÿ.Œœ(Action , String šš) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:línea 431
en Ÿ˜..”(•Ÿ ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2017
en †”.–.Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:línea 81
en Ÿ˜..Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1044
en Ÿ.Ÿ.•( ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:línea 120
en †”.–.Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:línea 90
en Ÿ˜..Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1044
en Ÿ˜..Visit(IEnumerable €) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2057
en Ÿ˜..˜.”() en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2019
en Ÿ.Ÿ.Œœ(Action , String šš) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\VisualBasic\VisualBasicWriter.cs:línea 431
en Ÿ˜..”(•Ÿ ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 2017
en †”.–.Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:línea 81
en Ÿ˜..Visit(„” ) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1044
en Ÿ˜..Write(Ž” Ž”) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1019
en Ÿ˜..Œ€(MethodDefinition €) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1796
en Ÿ˜..Write(MethodDefinition €) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseImperativeLanguageWriter.cs:línea 1721
en Ÿ˜.š.WriteInternal(IMemberDefinition , Boolean ˜‘, Boolean ™) en c:\Builds\245\Behemoth\ReleaseBranch Production Build\Sources\Decompiler\Cecil.Decompiler\Languages\BaseLanguageWriter.cs:línea 435
0
Momchil
Telerik team
answered on 19 Nov 2013, 02:32 PM
Hello,

Thanks for this example.  It will surely help us resolve the problem.
The issue has been logged for future fixing. 

Regards,
Momchil
Telerik
Tell us what you think about JustDecompile. Your opinion matters! You can use our forum, or our JustDecompile UserVoice website for feature requests.
Tags
General Discussions
Asked by
maledong
Top achievements
Rank 1
Answers by
Momchil
Telerik team
maledong
Top achievements
Rank 1
joe
Top achievements
Rank 1
Share this question
or