[Mono-list] Is this a common error that someone has a hint about?

Maser, Dan Dan.Maser at inin.com
Fri Oct 10 16:48:26 EDT 2008


  Here's the IL.  It's a member function of a class that is not generic.   Just to reiterate if I comment out (or even slightly alter) the source code line that generated the IL near L_0123 the problem goes away.



.method public hidebysig instance string GetElapsedTimeString() cil managed
{
    .maxstack 5
    .locals init (
        [0] string str,
        [1] uint64 num,
        [2] uint64 num2,
        [3] uint64 num3,
        [4] int32 num4,
        [5] int32 num5,
        [6] int32 num6,
        [7] int32 num7,
        [8] string str2,
        [9] string str3,
        [10] bool flag,
        [11] object[] objArray)
    L_0000: nop
    L_0001: nop
    L_0002: ldarg.0
    L_0003: ldfld class ININ.LogViewer.SelectionTracker ININ.LogViewer.LogWindow::m_SelectedItems
    L_0008: callvirt instance bool ININ.LogViewer.SelectionTracker::is_empty()
    L_000d: ldc.i4.0
    L_000e: ceq
    L_0010: stloc.s flag
    L_0012: ldloc.s flag
    L_0014: brtrue.s L_001e
    L_0016: ldnull
    L_0017: stloc.s str3
    L_0019: leave L_01c9
    L_001e: ldsfld string [mscorlib]System.String::Empty
    L_0023: stloc.0
    L_0024: ldarg.0
    L_0025: ldfld class ININ.LogViewer.SelectionTracker ININ.LogViewer.LogWindow::m_SelectedItems
    L_002a: callvirt instance int32 ININ.LogViewer.SelectionTracker::get_Count()
    L_002f: ldc.i4.1
    L_0030: ceq
    L_0032: ldc.i4.0
    L_0033: ceq
    L_0035: stloc.s flag
    L_0037: ldloc.s flag
    L_0039: brtrue.s L_006a
    L_003b: nop
    L_003c: ldstr "Timestamp {0}"
    L_0041: ldarg.0
    L_0042: ldfld class ININ.LogViewer.SelectionTracker ININ.LogViewer.LogWindow::m_SelectedItems
    L_0047: ldc.i4.0
    L_0048: callvirt instance class [i3trace_dotnet_reader-l32d-1-1]LogMessage ININ.LogViewer.SelectionTracker::get_Item(int32)
    L_004d: callvirt instance class [i3trace_dotnet_reader-l32d-1-1]MessageTimestamp [i3trace_dotnet_reader-l32d-1-1]LogMessage::timestamp()
    L_0052: ldarg.0
    L_0053: ldfld int32 ININ.LogViewer.LogWindow::m_EffectiveZoneOffset
    L_0058: ldc.i4.0
    L_0059: call string ININ.LogViewer.Helpers::timestamp_as_string(class [i3trace_dotnet_reader-l32d-1-1]MessageTimestamp, int32, bool)
    L_005e: call string [mscorlib]System.String::Format(string, object)
    L_0063: stloc.0
    L_0064: nop
    L_0065: br L_01b2
    L_006a: nop
    L_006b: ldarg.0
    L_006c: ldfld class ININ.LogViewer.SelectionTracker ININ.LogViewer.LogWindow::m_SelectedItems
    L_0071: ldc.i4.0
    L_0072: callvirt instance class [i3trace_dotnet_reader-l32d-1-1]LogMessage ININ.LogViewer.SelectionTracker::get_Item(int32)
    L_0077: callvirt instance class [i3trace_dotnet_reader-l32d-1-1]MessageTimestamp [i3trace_dotnet_reader-l32d-1-1]LogMessage::timestamp()
    L_007c: callvirt instance class [i3trace_dotnet_reader-l32d-1-1]AbsoluteTime [i3trace_dotnet_reader-l32d-1-1]MessageTimestamp::get_m_time()
    L_0081: callvirt instance uint64 [i3trace_dotnet_reader-l32d-1-1]AbsoluteTime::get_m_TimeValue()
    L_0086: stloc.1
    L_0087: ldarg.0
    L_0088: ldfld class ININ.LogViewer.SelectionTracker ININ.LogViewer.LogWindow::m_SelectedItems
    L_008d: ldarg.0
    L_008e: ldfld class ININ.LogViewer.SelectionTracker ININ.LogViewer.LogWindow::m_SelectedItems
    L_0093: callvirt instance int32 ININ.LogViewer.SelectionTracker::get_Count()
    L_0098: ldc.i4.1
    L_0099: sub
    L_009a: callvirt instance class [i3trace_dotnet_reader-l32d-1-1]LogMessage ININ.LogViewer.SelectionTracker::get_Item(int32)
    L_009f: callvirt instance class [i3trace_dotnet_reader-l32d-1-1]MessageTimestamp [i3trace_dotnet_reader-l32d-1-1]LogMessage::timestamp()
    L_00a4: callvirt instance class [i3trace_dotnet_reader-l32d-1-1]AbsoluteTime [i3trace_dotnet_reader-l32d-1-1]MessageTimestamp::get_m_time()
    L_00a9: callvirt instance uint64 [i3trace_dotnet_reader-l32d-1-1]AbsoluteTime::get_m_TimeValue()
    L_00ae: stloc.2
    L_00af: ldloc.1
    L_00b0: ldloc.2
    L_00b1: cgt.un
    L_00b3: ldc.i4.0
    L_00b4: ceq
    L_00b6: call void [System]System.Diagnostics.Debug::Assert(bool)
    L_00bb: nop
    L_00bc: ldloc.2
    L_00bd: ldloc.1
    L_00be: sub
    L_00bf: stloc.3
    L_00c0: ldloc.3
    L_00c1: ldc.i8 0x34630b8a000
    L_00ca: div.un
    L_00cb: conv.i4
    L_00cc: stloc.s num4
    L_00ce: ldloc.3
    L_00cf: ldc.i8 0x34630b8a000
    L_00d8: rem.un
    L_00d9: stloc.3
    L_00da: ldloc.3
    L_00db: ldc.i8 0xdf8475800
    L_00e4: div.un
    L_00e5: conv.i4
    L_00e6: stloc.s num5
    L_00e8: ldloc.3
    L_00e9: ldc.i8 0xdf8475800
    L_00f2: rem.un
    L_00f3: stloc.3
    L_00f4: ldloc.3
    L_00f5: ldc.i4 0x3b9aca00
    L_00fa: conv.i8
    L_00fb: div.un
    L_00fc: conv.i4
    L_00fd: stloc.s num6
    L_00ff: ldloc.3
    L_0100: ldc.i4 0x3b9aca00
    L_0105: conv.i8
    L_0106: rem.un
    L_0107: stloc.3
    L_0108: ldloc.3
    L_0109: conv.i4
    L_010a: stloc.s num7
    L_010c: ldstr "000000000"
    L_0111: ldloca.s num7
    L_0113: call instance string [mscorlib]System.Int32::ToString()
    L_0118: call string [mscorlib]System.String::Concat(string, string)
    L_011d: stloc.s str2
    L_011f: ldloc.s str2
    L_0121: ldloc.s str2
    L_0123: callvirt instance int32 [mscorlib]System.String::get_Length()
    L_0128: ldc.i4.s 9
    L_012a: sub
    L_012b: callvirt instance string [mscorlib]System.String::Substring(int32)
    L_0130: stloc.s str2
    L_0132: ldloc.s str2
    L_0134: ldstr "00"
    L_0139: callvirt instance bool [mscorlib]System.String::EndsWith(string)
    L_013e: ldc.i4.0
    L_013f: ceq
    L_0141: stloc.s flag
    L_0143: ldloc.s flag
    L_0145: brtrue.s L_0152
    L_0147: ldloc.s str2
    L_0149: ldc.i4.0
    L_014a: ldc.i4.7
    L_014b: callvirt instance string [mscorlib]System.String::Substring(int32, int32)
    L_0150: stloc.s str2
    L_0152: ldstr "Elapsed Time {0}:{1}:{2}.{3} ({4} messages)"
    L_0157: ldc.i4.5
    L_0158: newarr object
    L_015d: stloc.s objArray
    L_015f: ldloc.s objArray
    L_0161: ldc.i4.0
    L_0162: ldloca.s num4
    L_0164: ldstr "D2"
    L_0169: call instance string [mscorlib]System.Int32::ToString(string)
    L_016e: stelem.ref
    L_016f: ldloc.s objArray
    L_0171: ldc.i4.1
    L_0172: ldloca.s num5
    L_0174: ldstr "D2"
    L_0179: call instance string [mscorlib]System.Int32::ToString(string)
    L_017e: stelem.ref
    L_017f: ldloc.s objArray
    L_0181: ldc.i4.2
    L_0182: ldloca.s num6
    L_0184: ldstr "D2"
    L_0189: call instance string [mscorlib]System.Int32::ToString(string)
    L_018e: stelem.ref
    L_018f: ldloc.s objArray
    L_0191: ldc.i4.3
    L_0192: ldloc.s str2
    L_0194: stelem.ref
    L_0195: ldloc.s objArray
    L_0197: ldc.i4.4
    L_0198: ldarg.0
    L_0199: ldfld class ININ.LogViewer.SelectionTracker ININ.LogViewer.LogWindow::m_SelectedItems
    L_019e: callvirt instance int32 ININ.LogViewer.SelectionTracker::get_Count()
    L_01a3: box int32
    L_01a8: stelem.ref
    L_01a9: ldloc.s objArray
    L_01ab: call string [mscorlib]System.String::Format(string, object[])
    L_01b0: stloc.0
    L_01b1: nop
    L_01b2: ldloc.0
    L_01b3: stloc.s str3
    L_01b5: leave.s L_01c9
    L_01b7: pop
    L_01b8: nop
    L_01b9: ldc.i4.0
    L_01ba: call void [System]System.Diagnostics.Debug::Assert(bool)
    L_01bf: nop
    L_01c0: nop
    L_01c1: leave.s L_01c3
    L_01c3: nop
    L_01c4: ldnull
    L_01c5: stloc.s str3
    L_01c7: br.s L_01c9
    L_01c9: nop
    L_01ca: ldloc.s str3
    L_01cc: ret
    .try L_0001 to L_01b7 catch [mscorlib]System.Exception handler L_01b7 to L_01c3
}





-----Original Message-----
From: mono-list-bounces at lists.ximian.com [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Paolo Molaro
Sent: Friday, October 10, 2008 3:31 PM
To: mono-list at lists.ximian.com
Subject: Re: [Mono-list] Is this a common error that someone has a hint about?

On 10/10/08 Maser, Dan wrote:
>    If I send you the whole IL of that function would that do anything?
> I'd gladly give you the whole app but it's HUGE and requires dozens of
> supporting libs special environment stuff to run.

Yes, the IL of the function may be enough (tell us also what kind of
class/struct it's included in and if it's generic what arguments it was
instantiated with).

Thanks!

lupus

--
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better
_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list




More information about the Mono-list mailing list