How can we help you today? How can we help you today?

Bug report: exception while disassembling

Hi.

I'm running .NET Reflector 5.1.4.0 and want to disassemble this assembly I've got from DevExpress. But it keeps failing at a particular point with a System.InvalidOperationException. Here's the details from Reflector, followed by the method's IL as extracted by ILDASM:

Translation failure in 'DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcColumnsDrawInfo() : Void' in 'DevExpress.XtraGrid.v7.3, Version=7.3.12.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1'.

System.InvalidOperationException


InnerException:

Block statement count of zero during condition expression translation.

System.InvalidOperationException

at ឺ.ᜆ(Int32 A_0)
at ឺ.ᜋ(Int32 A_0)
at ឺ.ᜂ(Int32 A_0, Int32 A_1)
at ឺ.ᜆ(Int32 A_0)
at ឺ.ᜋ(Int32 A_0)
at ឺ.ᜂ(Int32 A_0, Int32 A_1)
at ឺ.ᜀ(IMethodDeclaration A_0, IMethodBody A_1)
at ឤ.ᜀ(IMethodDeclaration A_0)
at ឥ.ᜁ(IMethodDeclaration A_0)
at ᝎ.ᜀ(Boolean A_0, Boolean A_1, Boolean A_2)




.NET Reflector 5.1.4.0
.NET Framework 2.0.50727.3053
Microsoft Windows NT 5.1.2600 Service Pack 2
Culture: en-US (en-NZ)


[AddInManager]
"C:\WinBin\Reflector\Tcdev.DsmPlugin.dll"
"C:\WinBin\Reflector\AutoDiagramer.dll"
"C:\WinBin\Reflector\Reflector.AssemblyListEx.dll"
"C:\WinBin\Reflector\Reflector.ClassView.dll"
"C:\WinBin\Reflector\Reflector.CodeModelViewer.dll"
"C:\WinBin\Reflector\Reflector.CodeSearch.dll"
"C:\WinBin\Reflector\Reflector.Diff.dll"
"C:\WinBin\Reflector\Reflector.Graph.dll"
"C:\WinBin\Reflector\SequenceViz.dll"

[AssemblyBrowser]
ShowInheritedMembers="true"

[AssemblyCache]
"%SystemRoot%\Microsoft.net"
"%ProgramFiles%\Reference Assemblies"
"%ProgramFiles%\Microsoft.net"
"%ProgramFiles%\Microsoft Silverlight"

[AssemblyManager]
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll"
"C:\WINDOWS\assembly\GAC_MSIL\DevExpress.XtraGrid.v7.2\7.2.4.0__9b171c9fd64da1d1\DevExpress.XtraGrid.v7.2.dll"
"C:\WINDOWS\assembly\GAC_MSIL\DevExpress.Data.v7.2\7.2.4.0__9b171c9fd64da1d1\DevExpress.Data.v7.2.dll"
"C:\WINDOWS\assembly\GAC_MSIL\DevExpress.XtraEditors.v7.2\7.2.4.0__9b171c9fd64da1d1\DevExpress.XtraEditors.v7.2.dll"
"C:\WINDOWS\assembly\GAC_MSIL\DevExpress.Utils.v7.2\7.2.4.0__9b171c9fd64da1d1\DevExpress.Utils.v7.2.dll"
"%SystemRoot%\Microsoft.net\Framework\v2.0.50727\System.Drawing.dll"
"%SystemRoot%\Microsoft.net\Framework\v2.0.50727\System.Data.dll"
"%SystemRoot%\Microsoft.net\Framework\v2.0.50727\System.XML.dll"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Accessibility.dll"
"%SystemRoot%\Microsoft.net\Framework\v2.0.50727\System.Transactions.dll"
"%SystemRoot%\Microsoft.net\Framework\v2.0.50727\System.Design.dll"
"C:\WINDOWS\assembly\GAC_MSIL\DevExpress.Data.v7.3\7.3.12.0__9b171c9fd64da1d1\DevExpress.Data.v7.3.dll"
"C:\WINDOWS\assembly\GAC_MSIL\DevExpress.Utils.v7.3\7.3.12.0__9b171c9fd64da1d1\DevExpress.Utils.v7.3.dll"
"C:\WINDOWS\assembly\GAC_MSIL\DevExpress.XtraGrid.v7.3\7.3.12.0__9b171c9fd64da1d1\DevExpress.XtraGrid.v7.3.dll"
"C:\WINDOWS\assembly\GAC_MSIL\DevExpress.XtraEditors.v7.3\7.3.12.0__9b171c9fd64da1d1\DevExpress.XtraEditors.v7.3.dll"
"C:\WINDOWS\assembly\GAC_MSIL\DevExpress.XtraLayout.v7.3\7.3.12.0__9b171c9fd64da1d1\DevExpress.XtraLayout.v7.3.dll"

[BookmarkManager]
"code://DevExpress.XtraGrid.v7.2:7.2.4.0:9b171c9fd64da1d1/DevExpress.XtraGrid.Views.Grid.GridView"

[Disassembler]
Optimization="3.5"

[LanguageManager]
ActiveLanguage="C#"

[WindowManager]
X="1336"
Y="158"
Width="534"
Height="834"
Pane="644"

.method family hidebysig newslot virtual
instance void CalcColumnsDrawInfo() cil managed
{
// Code size 671 (0x29f)
.maxstack 6
.locals init (int32 V_0,
int32 V_1,
int32 V_2,
bool V_3,
int32 V_4,
int32 V_5,
class DevExpress.XtraGrid.Columns.GridColumn V_6,
class DevExpress.XtraGrid.Drawing.GridColumnInfoArgs V_7,
int32 V_8,
int32 V_9,
int32 V_10,
valuetype [System.Drawing]System.Drawing.Rectangle V_11,
valuetype [System.Drawing]System.Drawing.Rectangle V_12,
valuetype [System.Drawing]System.Drawing.Rectangle V_13,
valuetype [System.Drawing]System.Drawing.Rectangle V_14,
valuetype [System.Drawing]System.Drawing.Rectangle V_15)
IL_0000: ldarg.0
IL_0001: call instance class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewRects DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_ViewRects()
IL_0006: callvirt instance valuetype [System.Drawing]System.Drawing.Rectangle DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewRects::get_ColumnPanel()
IL_000b: stloc.s V_11
IL_000d: ldloca.s V_11
IL_000f: call instance int32 [System.Drawing]System.Drawing.Rectangle::get_Left()
IL_0014: stloc.0
IL_0015: ldarg.0
IL_0016: call instance class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewRects DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_ViewRects()
IL_001b: callvirt instance valuetype [System.Drawing]System.Drawing.Rectangle DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewRects::get_ColumnPanel()
IL_0020: stloc.s V_12
IL_0022: ldloca.s V_12
IL_0024: call instance int32 [System.Drawing]System.Drawing.Rectangle::get_Top()
IL_0029: stloc.1
IL_002a: ldsfld valuetype [System.Drawing]System.Drawing.Size [System.Drawing]System.Drawing.Size::Empty
IL_002f: pop
IL_0030: ldarg.0
IL_0031: call instance class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewRects DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_ViewRects()
IL_0036: ldfld int32 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewRects::IndicatorWidth
IL_003b: ldc.i4.0
IL_003c: bgt.s IL_0041
IL_003e: ldc.i4.0
IL_003f: br.s IL_0042
IL_0041: ldc.i4.m1
IL_0042: stloc.2
IL_0043: ldc.i4.0
IL_0044: stloc.3
IL_0045: ldarg.0
IL_0046: callvirt instance class DevExpress.XtraGrid.Columns.GridColumn DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_FixedLeftColumn()
IL_004b: brtrue.s IL_005d
IL_004d: ldloc.0
IL_004e: ldarg.0
IL_004f: call instance class DevExpress.XtraGrid.Views.Grid.GridView DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_View()
IL_0054: callvirt instance int32 DevExpress.XtraGrid.Views.Grid.GridView::get_LeftCoord()
IL_0059: sub
IL_005a: stloc.0
IL_005b: ldc.i4.1
IL_005c: stloc.3
IL_005d: ldarg.0
IL_005e: call instance class DevExpress.XtraGrid.Views.Grid.GridView DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_View()
IL_0063: callvirt instance class DevExpress.XtraGrid.Columns.GridColumnReadOnlyCollection DevExpress.XtraGrid.Views.Base.ColumnView::get_VisibleColumns()
IL_0068: callvirt instance int32 [mscorlib]System.Collections.ReadOnlyCollectionBase::get_Count()
IL_006d: ldarg.0
IL_006e: callvirt instance bool DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_AllowBehindColumn()
IL_0073: brfalse.s IL_0088
IL_0075: ldarg.0
IL_0076: call instance class DevExpress.XtraGrid.Views.Grid.GridView DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_View()
IL_007b: callvirt instance class DevExpress.XtraGrid.Columns.GridColumnReadOnlyCollection DevExpress.XtraGrid.Views.Base.ColumnView::get_VisibleColumns()
IL_0080: callvirt instance int32 [mscorlib]System.Collections.ReadOnlyCollectionBase::get_Count()
IL_0085: pop
IL_0086: br.s IL_008b
IL_0088: ldc.i4.0
IL_0089: br.s IL_008c
IL_008b: ldc.i4.1
IL_008c: add
IL_008d: stloc.s V_4
IL_008f: ldloc.2
IL_0090: stloc.s V_5
IL_0092: br IL_01de
IL_0097: ldloc.s V_5
IL_0099: ldc.i4.m1
IL_009a: bgt.s IL_009f
IL_009c: ldnull
IL_009d: br.s IL_00ac
IL_009f: ldarg.0
IL_00a0: call instance class DevExpress.XtraGrid.Views.Grid.GridView DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_View()
IL_00a5: ldloc.s V_5
IL_00a7: callvirt instance class DevExpress.XtraGrid.Columns.GridColumn DevExpress.XtraGrid.Views.Base.ColumnView::GetVisibleColumn(int32)
IL_00ac: stloc.s V_6
IL_00ae: ldloc.s V_6
IL_00b0: newobj instance void DevExpress.XtraGrid.Drawing.GridColumnInfoArgs::.ctor(class DevExpress.XtraGrid.Columns.GridColumn)
IL_00b5: stloc.s V_7
IL_00b7: ldloc.s V_5
IL_00b9: ldc.i4.m1
IL_00ba: bne.un.s IL_00c4
IL_00bc: ldloc.s V_7
IL_00be: ldc.i4.2
IL_00bf: callvirt instance void DevExpress.XtraGrid.Drawing.GridColumnInfoArgs::set_Type(valuetype DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnInfoType)
IL_00c4: ldloc.s V_7
IL_00c6: callvirt instance class DevExpress.XtraGrid.Drawing.GridColumnInfo DevExpress.XtraGrid.Drawing.GridColumnInfoArgs::get_Info()
IL_00cb: ldloc.s V_5
IL_00cd: callvirt instance void DevExpress.XtraGrid.Drawing.GridColumnInfo::set_CellIndex(int32)
IL_00d2: ldloc.s V_5
IL_00d4: ldarg.0
IL_00d5: call instance class DevExpress.XtraGrid.Views.Grid.GridView DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_View()
IL_00da: callvirt instance class DevExpress.XtraGrid.Columns.GridColumnReadOnlyCollection DevExpress.XtraGrid.Views.Base.ColumnView::get_VisibleColumns()
IL_00df: callvirt instance int32 [mscorlib]System.Collections.ReadOnlyCollectionBase::get_Count()
IL_00e4: bne.un.s IL_00ee
IL_00e6: ldloc.s V_7
IL_00e8: ldc.i4.3
IL_00e9: callvirt instance void DevExpress.XtraGrid.Drawing.GridColumnInfoArgs::set_Type(valuetype DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnInfoType)
IL_00ee: ldloc.s V_6
IL_00f0: brfalse.s IL_010f
IL_00f2: ldloc.s V_6
IL_00f4: callvirt instance valuetype DevExpress.XtraGrid.Columns.FixedStyle DevExpress.XtraGrid.Columns.GridColumn::get_Fixed()
IL_00f9: ldc.i4.1
IL_00fa: beq.s IL_010f
IL_00fc: ldloc.3
IL_00fd: brtrue.s IL_010f
IL_00ff: ldloc.0
IL_0100: ldarg.0
IL_0101: call instance class DevExpress.XtraGrid.Views.Grid.GridView DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_View()
IL_0106: callvirt instance int32 DevExpress.XtraGrid.Views.Grid.GridView::get_LeftCoord()
IL_010b: sub
IL_010c: stloc.0
IL_010d: ldc.i4.1
IL_010e: stloc.3
IL_010f: ldloc.s V_6
IL_0111: brfalse.s IL_0167
IL_0113: ldloc.s V_6
IL_0115: ldarg.0
IL_0116: callvirt instance class DevExpress.XtraGrid.Columns.GridColumn DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_FixedRightColumn()
IL_011b: bne.un.s IL_0167
IL_011d: ldloc.0
IL_011e: ldarg.0
IL_011f: call instance class DevExpress.XtraGrid.Views.Grid.GridView DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_View()
IL_0124: callvirt instance int32 DevExpress.XtraGrid.Views.Grid.GridView::get_FixedLineWidth()
IL_0129: add
IL_012a: stloc.0
IL_012b: ldarg.0
IL_012c: ldloc.s V_6
IL_012e: callvirt instance int32 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::CalcRestColumnsWidth(class DevExpress.XtraGrid.Columns.GridColumn)
IL_0133: stloc.s V_8
IL_0135: ldloc.0
IL_0136: ldloc.s V_8
IL_0138: add
IL_0139: ldarg.0
IL_013a: call instance class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewRects DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_ViewRects()
IL_013f: callvirt instance valuetype [System.Drawing]System.Drawing.Rectangle DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewRects::get_ColumnPanel()
IL_0144: stloc.s V_13
IL_0146: ldloca.s V_13
IL_0148: call instance int32 [System.Drawing]System.Drawing.Rectangle::get_Right()
IL_014d: ble.s IL_0167
IL_014f: ldarg.0
IL_0150: call instance class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewRects DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_ViewRects()
IL_0155: callvirt instance valuetype [System.Drawing]System.Drawing.Rectangle DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewRects::get_ColumnPanel()
IL_015a: stloc.s V_14
IL_015c: ldloca.s V_14
IL_015e: call instance int32 [System.Drawing]System.Drawing.Rectangle::get_Right()
IL_0163: ldloc.s V_8
IL_0165: sub
IL_0166: stloc.0
IL_0167: ldloc.s V_7
IL_0169: ldloc.0
IL_016a: ldloc.1
IL_016b: ldloc.s V_6
IL_016d: brfalse.s IL_0178
IL_016f: ldloc.s V_6
IL_0171: callvirt instance int32 DevExpress.XtraGrid.Columns.GridColumn::get_VisibleWidth()
IL_0176: br.s IL_0179
IL_0178: ldc.i4.0
IL_0179: ldarg.0
IL_017a: callvirt instance int32 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_ColumnRowHeight()
IL_017f: newobj instance void [System.Drawing]System.Drawing.Rectangle::.ctor(int32,
int32,
int32,
int32)
IL_0184: callvirt instance void DevExpress.Utils.Drawing.GraphicsInfoArgs::set_Bounds(valuetype [System.Drawing]System.Drawing.Rectangle)
IL_0189: ldloc.s V_7
IL_018b: ldloc.s V_6
IL_018d: callvirt instance void DevExpress.XtraGrid.Drawing.GridColumnInfoArgs::set_Column(class DevExpress.XtraGrid.Columns.GridColumn)
IL_0192: ldarg.0
IL_0193: ldloc.s V_7
IL_0195: ldloca.s V_0
IL_0197: callvirt instance void DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::CalcColumnInfo(class DevExpress.XtraGrid.Drawing.GridColumnInfoArgs,
int32&)
IL_019c: ldloc.s V_6
IL_019e: brfalse.s IL_01b8
IL_01a0: ldloc.s V_6
IL_01a2: ldarg.0
IL_01a3: callvirt instance class DevExpress.XtraGrid.Columns.GridColumn DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_FixedLeftColumn()
IL_01a8: bne.un.s IL_01b8
IL_01aa: ldloc.0
IL_01ab: ldarg.0
IL_01ac: call instance class DevExpress.XtraGrid.Views.Grid.GridView DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_View()
IL_01b1: callvirt instance int32 DevExpress.XtraGrid.Views.Grid.GridView::get_FixedLineWidth()
IL_01b6: add
IL_01b7: stloc.0
IL_01b8: ldloc.s V_7
IL_01ba: callvirt instance valuetype [System.Drawing]System.Drawing.Rectangle DevExpress.Utils.Drawing.GraphicsInfoArgs::get_Bounds()
IL_01bf: stloc.s V_15
IL_01c1: ldloca.s V_15
IL_01c3: call instance int32 [System.Drawing]System.Drawing.Rectangle::get_Width()
IL_01c8: ldc.i4.0
IL_01c9: ble.s IL_01d8
IL_01cb: ldarg.0
IL_01cc: ldfld class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::ColumnsInfo
IL_01d1: ldloc.s V_7
IL_01d3: callvirt instance void DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo::Add(class DevExpress.XtraGrid.Drawing.GridColumnInfoArgs)
IL_01d8: ldloc.s V_5
IL_01da: ldc.i4.1
IL_01db: add
IL_01dc: stloc.s V_5
IL_01de: ldloc.s V_5
IL_01e0: ldloc.s V_4
IL_01e2: blt IL_0097
IL_01e7: ldc.i4.0
IL_01e8: stloc.s V_9
IL_01ea: ldloc.s V_9
IL_01ec: ldc.i4.m1
IL_01ed: beq.s IL_0200
IL_01ef: ldarg.0
IL_01f0: ldfld class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::ColumnsInfo
IL_01f5: callvirt instance int32 [mscorlib]System.Collections.CollectionBase::get_Count()
IL_01fa: ldloc.s V_9
IL_01fc: sub
IL_01fd: ldc.i4.2
IL_01fe: bge.s IL_0201
IL_0200: ret
IL_0201: ldloc.s V_9
IL_0203: stloc.s V_10
IL_0205: br IL_028c
IL_020a: ldloc.s V_10
IL_020c: ldloc.s V_9
IL_020e: bne.un.s IL_0223
IL_0210: ldarg.0
IL_0211: ldfld class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::ColumnsInfo
IL_0216: ldloc.s V_10
IL_0218: callvirt instance class DevExpress.XtraGrid.Drawing.GridColumnInfoArgs DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo::get_Item(int32)
IL_021d: ldc.i4.0
IL_021e: callvirt instance void DevExpress.Utils.Drawing.HeaderObjectInfoArgs::set_HeaderPosition(valuetype DevExpress.Utils.Drawing.HeaderPositionKind)
IL_0223: ldloc.s V_10
IL_0225: ldarg.0
IL_0226: ldfld class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::ColumnsInfo
IL_022b: callvirt instance int32 [mscorlib]System.Collections.CollectionBase::get_Count()
IL_0230: ldc.i4.1
IL_0231: sub
IL_0232: bne.un.s IL_0286
IL_0234: ldarg.0
IL_0235: ldfld class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::ColumnsInfo
IL_023a: ldloc.s V_10
IL_023c: callvirt instance class DevExpress.XtraGrid.Drawing.GridColumnInfoArgs DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo::get_Item(int32)
IL_0241: callvirt instance class DevExpress.XtraGrid.Columns.GridColumn DevExpress.XtraGrid.Drawing.GridColumnInfoArgs::get_Column()
IL_0246: brfalse.s IL_0273
IL_0248: ldarg.0
IL_0249: ldfld class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::ColumnsInfo
IL_024e: ldloc.s V_10
IL_0250: callvirt instance class DevExpress.XtraGrid.Drawing.GridColumnInfoArgs DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo::get_Item(int32)
IL_0255: callvirt instance class DevExpress.XtraGrid.Columns.GridColumn DevExpress.XtraGrid.Drawing.GridColumnInfoArgs::get_Column()
IL_025a: callvirt instance int32 DevExpress.XtraGrid.Columns.GridColumn::get_VisibleIndex()
IL_025f: ldarg.0
IL_0260: call instance class DevExpress.XtraGrid.Views.Grid.GridView DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::get_View()
IL_0265: callvirt instance class DevExpress.XtraGrid.Columns.GridColumnReadOnlyCollection DevExpress.XtraGrid.Views.Base.ColumnView::get_VisibleColumns()
IL_026a: callvirt instance int32 [mscorlib]System.Collections.ReadOnlyCollectionBase::get_Count()
IL_026f: ldc.i4.1
IL_0270: sub
IL_0271: bne.un.s IL_0286
IL_0273: ldarg.0
IL_0274: ldfld class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::ColumnsInfo
IL_0279: ldloc.s V_10
IL_027b: callvirt instance class DevExpress.XtraGrid.Drawing.GridColumnInfoArgs DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo::get_Item(int32)
IL_0280: ldc.i4.2
IL_0281: callvirt instance void DevExpress.Utils.Drawing.HeaderObjectInfoArgs::set_HeaderPosition(valuetype DevExpress.Utils.Drawing.HeaderPositionKind)
IL_0286: ldloc.s V_10
IL_0288: ldc.i4.1
IL_0289: add
IL_028a: stloc.s V_10
IL_028c: ldloc.s V_10
IL_028e: ldarg.0
IL_028f: ldfld class DevExpress.XtraGrid.Views.Grid.ViewInfo.GridColumnsInfo DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo::ColumnsInfo
IL_0294: callvirt instance int32 [mscorlib]System.Collections.CollectionBase::get_Count()
IL_0299: blt IL_020a
IL_029e: ret
} // end of method GridViewInfo::CalcColumnsDrawInfo
Mike Kelly
0

Comments

7 comments

  • James Moore
    Hi Mike,

    Thanks for the bug report. These are normally caused by an obfuscator creating IL which cannot be expressed in C#. We will have a look and verify that this is the case.

    If it is unfortunately there is often very little we can do to create some sort of meaningful C# representation when the control flow has been altered so radically.

    James
    James Moore
    0
  • Mike Kelly
    Thanks James.

    That could be.

    But I think it is unlikely because the rest of the assemblies that I Reflector'ed came out just fine. If they were going to obfuscate the IL, then surely they would have done it in more places than just 1 method (the rest of the class in the affected assembly AND ALL the other classes in that assembly came out perfectly, and the C# code is perfectly legible)?

    Mike
    Mike Kelly
    0
  • James Moore
    Mike,

    I will see if I can get a copy of that assembly and try and understand why its happening with just that method.

    James
    James Moore
    0
  • Mike Kelly
    If you can let me have your e-mail address, I'll send it to you. Can you get my address from the forum database, or should I insert it into a message?
    Mike Kelly
    0
  • benblo
    I'm having the same problem with another assembly. This one was built in Mono but shows up fine, nothing is obfuscated. I can actually view the offending classes in their most part, except for a few methods that crash Reflector.
    FileDisassembler and FileGenerator both hang, I guess they can't do more than what Reflector gives them.

    I sent a bug report, the highlight being:
    Translation failure in 'UnityEditor.GUITemp.DoListView(Rect, ListViewState, Int32[]) : ListViewElementsEnumerator' in 'UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
    
    System.InvalidOperationException
    
    InnerException:
    
    Invalid branching statement for condition expression with target offset 00CB.
    

    I don't feel comfortable sending the DLL, but if you have the courage you can download a demo of the product here: http://unity3d.com/unity/download
    It's a Mac app (Windows version coming soon, yay!), but I think some Windows archivers can open dmg files... :roll:
    Extract the app, locate the DLL, browse to UnityEditor.GUITemp.DoListView to reproduce the crash.

    Is there a way to read the actual CLR (if that even means anything)? I mean the app works so obviously the DLL is valid, it's just C# translation that fails...
    benblo
    0
  • benblo
    Answering my own question: to view IL, simply change the language in Reflector's options.
    So I guess "target offset 00CB" is the instruction number? I see stloc.1, "pops the current value from the top of the evaluation stack and stores it in the local variable list at index 1"... hmm, doesn't mean a thing to me :D !

    Maybe the disassembler could fail more gracefully, ie display the valid lines before/after the offending instruction?
    benblo
    0
  • RichardD
    I get the same exception looking at the GetUrl method of the System.Web.UI.CompositeScriptReference class in the System.Web.Extensions assembly from .NET 3.5 SP1:

    System.InvalidOperationException

    InnerException:

    Block statement count of zero during condition expression translation.

    System.InvalidOperationException

    at ឺ.ᜆ(Int32 A_0)
    at ឺ.ᜋ(Int32 A_0)
    at ឺ.ᜂ(Int32 A_0, Int32 A_1)
    at ឺ.ᜍ()
    at ឺ.ᜉ(Int32 A_0)
    at ឺ.ᜋ(Int32 A_0)
    at ឺ.ᜂ(Int32 A_0, Int32 A_1)
    at ឺ.ᜀ(IExceptionHandler A_0)
    at ឺ.ᜂ(Int32 A_0, Int32 A_1)
    at ឺ.ᜀ(IMethodDeclaration A_0, IMethodBody A_1)
    at ឤ.ᜀ(IMethodDeclaration A_0)
    at ឥ.ᜁ(IMethodDeclaration A_0)
    at ᝎ.ᜀ(Boolean A_0, Boolean A_1, Boolean A_2)
    RichardD
    0

Add comment

Please sign in to leave a comment.