Error on Starting From on Client Machine - system.invalidoperationexception

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Thank you, anyone who can shed some light on this.
I have a VB 2008 app that has been running fine. I added a number of modifications to it, but almost all in other forms that are loaded only when requested by the user, but a lot of changes overall.
This, of course, works fine on my development machine, but on deployment it fails with this error before any line of code is reached, the form never loads. And incidentally, fails on an XP and Win 7 machine, with the same error.
Here is the error
P1 massarellioutboundorders.exe, <br/>
P2 1.0.0.0, <br/>
P3 4f4c3078, <br/>
P4 massarellioutboundorders, <br/>
P5 1.0.0.0, <br/>
P6 4f4c3078, <br/>
P7 1a, <br/>
P8 e9, <br/>
P9 system.invalidoperationexception, <br/>
P10 NIL.<br/>

I loaded ILDASM and it shows the error is occurring in massarellioutboundorders.exe, And P7 1a appears to be the form being created. Ive stripped out as many of the changes as I can see that were added in an attempt to bring it back
to where it was working, to no avail
Any suggestions on how I might troubleshoot this error, or a better way to debug it as Im starting to run out of ideas.
Below is the P1 1a section of the IL code dump, if that is of any help
Thanks for any suggestions on this, Tim Conway<br/>


.method /*0600001A*/ private static !!T <br/>

Create__Instance__<.ctor ([System.Windows.Forms/*23000003*/]System.Windows.Forms.Form/*01000007*/) T>(!!T Instance) cil managed<br/>
{<br/>
.custom /*0C000051:0A000012*/ instance void [mscorlib/*23000001*/]System.Diagnostics.DebuggerHiddenAttribute/*0100006E*/::.ctor() /* 0A000012 */ = ( 01 00 00 00 ) <br/>
// Code size 275 (0x113)<br/>
.maxstack 4<br/>
.locals /*11000015*/ init ([0] !!T Create__Instance__,<br/>
[1] string BetterMessage,<br/>
[2] class [mscorlib/*23000001*/]System.Reflection.TargetInvocationException/*01000075*/ ex,<br/>
[3] string[] VB$t_array$S0,<br/>
[4] bool VB$CG$t_bool$S0,<br/>
[5] bool VB$CG$t_bool$S1,<br/>
[6] bool VB$CG$t_bool$S2)<br/>
.line 176,176 : 13,130 <br/>
IL_0000: nop<br/>
.line 177,177 : 17,71 <br/>
IL_0001: ldarg.0<br/>
IL_0002: box !!T/*1B000001*/<br/>
IL_0007: brfalse.s IL_001b<br/>
<br/>
<br/>
IL_0009: ldarga.s Instance<br/>
IL_000b: constrained. !!T/*1B000001*/<br/>
IL_0011: callvirt instance bool [System.Windows.Forms/*23000003*/]System.Windows.Forms.Control/*01000076*/::get_IsDisposed() /* 0A000024 */<br/>
IL_0016: brtrue.s IL_001b<br/>
<br/>
<br/>
IL_0018: ldc.i4.0<br/>
IL_0019: br.s IL_001c<br/>
<br/>
<br/>
IL_001b: ldc.i4.1<br/>
IL_001c: stloc.s VB$CG$t_bool$S0<br/>
.line 16707566,16707566 : 1,2 <br/>
IL_001e: ldloc.s VB$CG$t_bool$S0<br/>
IL_0020: brfalse IL_010b<br/>
<br/>
<br/>
.line 178,178 : 21,61 <br/>
IL_0025: ldsfld class [mscorlib/*23000001*/]System.Collections.Hashtable/*01000008*/ MassarelliOutBoundOrders.My.MyProject/*02000004*//MyForms/*02000005*/::m_FormBeingCreated /* 0400000E */<br/>
IL_002a: ldnull<br/>
IL_002b: ceq<br/>
IL_002d: ldc.i4.0<br/>
IL_002e: ceq<br/>
IL_0030: stloc.s VB$CG$t_bool$S1<br/>
.line 16707566,16707566 : 1,2 <br/>
IL_0032: ldloc.s VB$CG$t_bool$S1<br/>
IL_0034: brfalse.s IL_0069<br/>
<br/>
<br/>
.line 179,179 : 25,82 <br/>
IL_0036: ldsfld class [mscorlib/*23000001*/]System.Collections.Hashtable/*01000008*/ MassarelliOutBoundOrders.My.MyProject/*02000004*//MyForms/*02000005*/::m_FormBeingCreated /* 0400000E */<br/>
IL_003b: ldtoken !!T/*1B000001*/<br/>
IL_0040: call class [mscorlib/*23000001*/]System.Type/*01000009*/ [mscorlib/*23000001*/]System.Type/*01000009*/::GetTypeFromHandle(valuetype [mscorlib/*23000001*/]System.RuntimeTypeHandle/*01000077*/) /* 0A000025
*/<br/>
IL_0045: callvirt instance bool [mscorlib/*23000001*/]System.Collections.Hashtable/*01000008*/::ContainsKey(object) /* 0A000026 */<br/>
IL_004a: stloc.s VB$CG$t_bool$S2<br/>
.line 16707566,16707566 : 1,2 <br/>
IL_004c: ldloc.s VB$CG$t_bool$S2<br/>
IL_004e: brfalse.s IL_0066<br/>
<br/>
<br/>
.line 180,180 : 29,181 <br/>
IL_0050: ldstr "WinForms_RecursiveFormCreate" /* 70000049 */<br/>
IL_0055: ldc.i4.0<br/>
IL_0056: newarr [mscorlib/*23000001*/]System.String/*01000078*/<br/>
IL_005b: call string [Microsoft.VisualBasic/*23000002*/]Microsoft.VisualBasic.CompilerServices.Utils/*01000079*/::GetResourceString(string,<br/>

string[])
/* 0A000027 */<br/>
IL_0060: newobj instance void [mscorlib/*23000001*/]System.InvalidOperationException/*0100007A*/::.ctor(string) /* 0A000028 */<br/>
IL_0065: throw<br/>
<br/>
<br/>
.line 181,181 : 25,31 <br/>
IL_0066: nop<br/>
IL_0067: br.s IL_0074<br/>
<br/>
<br/>
.line 182,182 : 21,25 <br/>
IL_0069: nop<br/>
.line 183,183 : 25,87 <br/>
IL_006a: newobj instance void [mscorlib/*23000001*/]System.Collections.Hashtable/*01000008*/::.ctor() /* 0A000029 */<br/>
IL_006f: stsfld class [mscorlib/*23000001*/]System.Collections.Hashtable/*01000008*/ MassarelliOutBoundOrders.My.MyProject/*02000004*//MyForms/*02000005*/::m_FormBeingCreated /* 0400000E */<br/>
.line 184,184 : 21,27 <br/>
IL_0074: nop<br/>
.line 185,185 : 21,64 <br/>
IL_0075: ldsfld class [mscorlib/*23000001*/]System.Collections.Hashtable/*01000008*/ MassarelliOutBoundOrders.My.MyProject/*02000004*//MyForms/*02000005*/::m_FormBeingCreated /* 0400000E */<br/>
IL_007a: ldtoken !!T/*1B000001*/<br/>
IL_007f: call class [mscorlib/*23000001*/]System.Type/*01000009*/ [mscorlib/*23000001*/]System.Type/*01000009*/::GetTypeFromHandle(valuetype [mscorlib/*23000001*/]System.RuntimeTypeHandle/*01000077*/) /* 0A000025
*/<br/>
IL_0084: ldnull<br/>
IL_0085: callvirt instance void [mscorlib/*23000001*/]System.Collections.Hashtable/*01000008*/::Add(object,<br/>

object) /* 0A00002A */<br/>
IL_008a: nop<br/>
.line 186,186 : 21,24 <br/>
IL_008b: nop<br/>
.line 187,187 : 25,39 <br/>
.try<br/>
{<br/>
.try<br/>
{<br/>
IL_008c: call !!0 [mscorlib/*23000001*/]System.Activator/*0100007B*/::CreateInstance<!!0>() /* 2B00000F */<br/>
IL_0091: stloc.0<br/>
.line 16707566,16707566 : 1,2 <br/>
IL_0092: leave.s IL_0111<br/>
<br/>
<br/>
IL_0094: leave.s IL_0108<br/>
<br/>
<br/>
} // end .try<br/>
filter<br/>
{<br/>
IL_0096: isinst [mscorlib/*23000001*/]System.Reflection.TargetInvocationException/*01000075*/<br/>
IL_009b: dup<br/>
IL_009c: brtrue.s IL_00a2<br/>
<br/>
<br/>
IL_009e: pop<br/>
IL_009f: ldc.i4.0<br/>
IL_00a0: br.s IL_00b8<br/>
<br/>
<br/>
IL_00a2: dup<br/>
IL_00a3: stloc.2<br/>
IL_00a4: call void [Microsoft.VisualBasic/*23000002*/]Microsoft.VisualBasic.CompilerServices.ProjectData/*0100007C*/::SetProjectError(class [mscorlib/*23000001*/]System.Exception/*0100007D*/) /*
0A00002C */<br/>
.line 188,188 : 21,120 <br/>
IL_00a9: ldloc.2<br/>
IL_00aa: callvirt instance class [mscorlib/*23000001*/]System.Exception/*0100007D*/ [mscorlib/*23000001*/]System.Exception/*0100007D*/::get_InnerException() /* 0A00002D */<br/>
IL_00af: ldnull<br/>
IL_00b0: ceq<br/>
IL_00b2: ldc.i4.0<br/>
IL_00b3: ceq<br/>
IL_00b5: ldc.i4.0<br/>
IL_00b6: cgt.un<br/>
.line 16707566,16707566 : 1,2 <br/>
IL_00b8: endfilter<br/>
} // end filter<br/>
{ // handler<br/>
IL_00ba: pop<br/>
.line 189,189 : 29,181 <br/>
IL_00bb: ldstr "WinForms_SeeInnerException" /* 70000083 */<br/>
IL_00c0: ldc.i4.1<br/>
IL_00c1: newarr [mscorlib/*23000001*/]System.String/*01000078*/<br/>
IL_00c6: stloc.3<br/>
IL_00c7: ldloc.3<br/>
IL_00c8: ldc.i4.0<br/>
IL_00c9: ldloc.2<br/>
IL_00ca: callvirt instance class [mscorlib/*23000001*/]System.Exception/*0100007D*/ [mscorlib/*23000001*/]System.Exception/*0100007D*/::get_InnerException() /* 0A00002D */<br/>
IL_00cf: callvirt instance string [mscorlib/*23000001*/]System.Exception/*0100007D*/::get_Message() /* 0A00002E */<br/>
IL_00d4: stelem.ref<br/>
IL_00d5: nop<br/>
IL_00d6: ldloc.3<br/>
IL_00d7: call string [Microsoft.VisualBasic/*23000002*/]Microsoft.VisualBasic.CompilerServices.Utils/*01000079*/::GetResourceString(string,<br/>


string[]) /* 0A000027 */<br/>
IL_00dc: stloc.1<br/>
.line 190,190 : 25,108 <br/>
IL_00dd: ldloc.1<br/>
IL_00de: ldloc.2<br/>
IL_00df: callvirt instance class [mscorlib/*23000001*/]System.Exception/*0100007D*/ [mscorlib/*23000001*/]System.Exception/*0100007D*/::get_InnerException() /* 0A00002D */<br/>
IL_00e4: newobj instance void [mscorlib/*23000001*/]System.InvalidOperationException/*0100007A*/::.ctor(string,<br/>

class [mscorlib/*23000001*/]System.Exception/*0100007D*/) /* 0A00002F */<br/>
IL_00e9: throw<br/>
<br/>
<br/>
IL_00ea: call void [Microsoft.VisualBasic/*23000002*/]Microsoft.VisualBasic.CompilerServices.ProjectData/*0100007C*/::ClearProjectError() /* 0A000030 */<br/>
IL_00ef: leave.s IL_0108<br/>
<br/>
<br/>
.line 191,191 : 21,28 <br/>
} // end handler<br/>
} // end .try<br/>
finally<br/>
{<br/>
IL_00f1: nop<br/>
.line 192,192 : 25,62 <br/>
IL_00f2: ldsfld class [mscorlib/*23000001*/]System.Collections.Hashtable/*01000008*/ MassarelliOutBoundOrders.My.MyProject/*02000004*//MyForms/*02000005*/::m_FormBeingCreated /* 0400000E */<br/>
IL_00f7: ldtoken !!T/*1B000001*/<br/>
IL_00fc: call class [mscorlib/*23000001*/]System.Type/*01000009*/ [mscorlib/*23000001*/]System.Type/*01000009*/::GetTypeFromHandle(valuetype [mscorlib/*23000001*/]System.RuntimeTypeHandle/*01000077*/) /*
0A000025 */<br/>
IL_0101: callvirt instance void [mscorlib/*23000001*/]System.Collections.Hashtable/*01000008*/::Remove(object) /* 0A000031 */<br/>
IL_0106: nop<br/>
.line 16707566,16707566 : 1,2 <br/>
IL_0107: endfinally<br/>
.line 193,193 : 21,28 <br/>
} // end handler<br/>
IL_0108: nop<br/>
IL_0109: br.s IL_0110<br/>
<br/>
<br/>
.line 194,194 : 17,21 <br/>
IL_010b: nop<br/>
.line 195,195 : 21,36 <br/>
IL_010c: ldarg.0<br/>
IL_010d: stloc.0<br/>
IL_010e: br.s IL_0111<br/>
<br/>
<br/>
.line 196,196 : 17,23 <br/>
IL_0110: nop<br/>
.line 197,197 : 13,25 <br/>
IL_0111: ldloc.0<br/>
IL_0112: ret<br/>
} // end of method MyForms::Create__Instance__<br/>
<br/>





View the full article
 
Back
Top