line of code not compiled | | |
Hi All,
I have just had a problem with some VB.net, I wonder if anybody can shed a little light and ease my confused brain. The problem is resolved now but I can't work out what happened and, more importantly, I can't guarantee it won't happen again. Have I misunderstood the situation? Can anybody help?
An error was spotted in a running application (A new build had just been deployed). When we stepped through the source the debugger would step completely over a line of code without executing it. When I ran ILDASM on the dll with show source lines the source line that was being missed out would be shown but no compiled code seemed to have been inserted into the dll. Below is a transcript of the ildasm output. The line 164 (in the VB source) where a call to Me.SelectAddParms seems to generate no il code at all. The il code for all the following vb source lines seems also to have been moved up to the line above.
//000162: Me.ClearSelectParms()
IL_0001: ldarg.0
IL_0002: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::ClearSelectPa rms()
IL_0007: nop
//000163:
//000164: Me.SelectAddParms(FieldList.clsContactFieldList.NT Logon, sNTLogon)
IL_0008: ldarg.0
IL_0009: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_000e: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_0013: callvirt instance int32 [System.Data]System.Data.InternalDataCollectionBase::get_Count( )
IL_0018: ldc.i4.0
IL_0019: ble.s IL_0040
//000165: If Me.Select.Rows.Count > 0 Then
IL_001b: ldarg.0
IL_001c: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_0021: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_0026: ldc.i4.0
IL_0027: callvirt instance class [System.Data]System.Data.DataRow [System.Data]System.Data.DataRowCollection::get_Item(int32)
IL_002c: ldstr "ContactID"
IL_0031: callvirt instance object [System.Data]System.Data.DataRow::get_Item(string)
IL_0036: call int32 [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.IntegerType ::FromObject(object)
IL_003b: stloc.0
IL_003c: br.s IL_0046
IL_003e: br.s IL_0045
Rebuilding this dll individually seemed to have no effect but the problem was resolved by building all of the dlls in the project, some of which this code uses. A transcript of the ILDASM output for the same section after the resolution is below. Four additional lines of il were produced. These lines are the call to the required method. No changes to the source code were made.
//000162: Me.ClearSelectParms()
IL_0001: ldarg.0
IL_0002: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::ClearSelectPa rms()
IL_0007: nop
//000163:
//000164: Me.SelectAddParms(FieldList.clsContactFieldList.NT Logon, sNTLogon)
IL_0008: ldarg.0
IL_0009: ldc.i4.s 16
IL_000b: ldarg.1
IL_000c: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::SelectAddParm s(int32,
object)
IL_0011: nop
//000165: If Me.Select.Rows.Count > 0 Then
IL_0012: ldarg.0
IL_0013: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_0018: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_001d: callvirt instance int32 [System.Data]System.Data.InternalDataCollectionBase::get_Count( )
IL_0022: ldc.i4.0
IL_0023: ble.s IL_004a
Many Thanks
Joe Simmonds | | | | re: line of code not compiled
What happens if you create a completely fresh project and put just enough code to run that particular line ?
OHM
"Joe Simmonds" <joe@bhth.com> wrote in message news:uN8xM0vTEHA.3336@TK2MSFTNGP10.phx.gbl...
Hi All,
I have just had a problem with some VB.net, I wonder if anybody can shed a little light and ease my confused brain. The problem is resolved now but I can't work out what happened and, more importantly, I can't guarantee it won't happen again. Have I misunderstood the situation? Can anybody help?
An error was spotted in a running application (A new build had just been deployed). When we stepped through the source the debugger would step completely over a line of code without executing it. When I ran ILDASM on the dll with show source lines the source line that was being missed out would be shown but no compiled code seemed to have been inserted into the dll. Below is a transcript of the ildasm output. The line 164 (in the VB source) where a call to Me.SelectAddParms seems to generate no il code at all. The il code for all the following vb source lines seems also to have been moved up to the line above.
//000162: Me.ClearSelectParms()
IL_0001: ldarg.0
IL_0002: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::ClearSelectPa rms()
IL_0007: nop
//000163:
//000164: Me.SelectAddParms(FieldList.clsContactFieldList.NT Logon, sNTLogon)
IL_0008: ldarg.0
IL_0009: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_000e: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_0013: callvirt instance int32 [System.Data]System.Data.InternalDataCollectionBase::get_Count( )
IL_0018: ldc.i4.0
IL_0019: ble.s IL_0040
//000165: If Me.Select.Rows.Count > 0 Then
IL_001b: ldarg.0
IL_001c: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_0021: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_0026: ldc.i4.0
IL_0027: callvirt instance class [System.Data]System.Data.DataRow [System.Data]System.Data.DataRowCollection::get_Item(int32)
IL_002c: ldstr "ContactID"
IL_0031: callvirt instance object [System.Data]System.Data.DataRow::get_Item(string)
IL_0036: call int32 [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.IntegerType ::FromObject(object)
IL_003b: stloc.0
IL_003c: br.s IL_0046
IL_003e: br.s IL_0045
Rebuilding this dll individually seemed to have no effect but the problem was resolved by building all of the dlls in the project, some of which this code uses. A transcript of the ILDASM output for the same section after the resolution is below. Four additional lines of il were produced. These lines are the call to the required method. No changes to the source code were made.
//000162: Me.ClearSelectParms()
IL_0001: ldarg.0
IL_0002: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::ClearSelectPa rms()
IL_0007: nop
//000163:
//000164: Me.SelectAddParms(FieldList.clsContactFieldList.NT Logon, sNTLogon)
IL_0008: ldarg.0
IL_0009: ldc.i4.s 16
IL_000b: ldarg.1
IL_000c: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::SelectAddParm s(int32,
object)
IL_0011: nop
//000165: If Me.Select.Rows.Count > 0 Then
IL_0012: ldarg.0
IL_0013: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_0018: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_001d: callvirt instance int32 [System.Data]System.Data.InternalDataCollectionBase::get_Count( )
IL_0022: ldc.i4.0
IL_0023: ble.s IL_004a
Many Thanks
Joe Simmonds | | | | re: line of code not compiled
Thanks for the response,
I have created a minimal implementation and the compiles fine and produces the expected il. I would like to add that the original project also produces the expected il when built. It was just that one build that caused a problem. I have not yet been able to reproduce it at all since the entire solution was rebuilt. We have a working build and the problem does not seem to reoccur I just want to know what happened for my own peace of mind.
Thanks
Joe
"One Handed Man ( OHM#)" <news.microsoft.com> wrote in message news:utesR3vTEHA.1284@TK2MSFTNGP10.phx.gbl...
What happens if you create a completely fresh project and put just enough code to run that particular line ?
OHM
"Joe Simmonds" <joe@bhth.com> wrote in message news:uN8xM0vTEHA.3336@TK2MSFTNGP10.phx.gbl...
Hi All,
I have just had a problem with some VB.net, I wonder if anybody can shed a little light and ease my confused brain. The problem is resolved now but I can't work out what happened and, more importantly, I can't guarantee it won't happen again. Have I misunderstood the situation? Can anybody help?
An error was spotted in a running application (A new build had just been deployed). When we stepped through the source the debugger would step completely over a line of code without executing it. When I ran ILDASM on the dll with show source lines the source line that was being missed out would be shown but no compiled code seemed to have been inserted into the dll. Below is a transcript of the ildasm output. The line 164 (in the VB source) where a call to Me.SelectAddParms seems to generate no il code at all. The il code for all the following vb source lines seems also to have been moved up to the line above.
//000162: Me.ClearSelectParms()
IL_0001: ldarg.0
IL_0002: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::ClearSelectPa rms()
IL_0007: nop
//000163:
//000164: Me.SelectAddParms(FieldList.clsContactFieldList.NT Logon, sNTLogon)
IL_0008: ldarg.0
IL_0009: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_000e: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_0013: callvirt instance int32 [System.Data]System.Data.InternalDataCollectionBase::get_Count( )
IL_0018: ldc.i4.0
IL_0019: ble.s IL_0040
//000165: If Me.Select.Rows.Count > 0 Then
IL_001b: ldarg.0
IL_001c: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_0021: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_0026: ldc.i4.0
IL_0027: callvirt instance class [System.Data]System.Data.DataRow [System.Data]System.Data.DataRowCollection::get_Item(int32)
IL_002c: ldstr "ContactID"
IL_0031: callvirt instance object [System.Data]System.Data.DataRow::get_Item(string)
IL_0036: call int32 [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.IntegerType ::FromObject(object)
IL_003b: stloc.0
IL_003c: br.s IL_0046
IL_003e: br.s IL_0045
Rebuilding this dll individually seemed to have no effect but the problem was resolved by building all of the dlls in the project, some of which this code uses. A transcript of the ILDASM output for the same section after the resolution is below. Four additional lines of il were produced. These lines are the call to the required method. No changes to the source code were made.
//000162: Me.ClearSelectParms()
IL_0001: ldarg.0
IL_0002: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::ClearSelectPa rms()
IL_0007: nop
//000163:
//000164: Me.SelectAddParms(FieldList.clsContactFieldList.NT Logon, sNTLogon)
IL_0008: ldarg.0
IL_0009: ldc.i4.s 16
IL_000b: ldarg.1
IL_000c: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::SelectAddParm s(int32,
object)
IL_0011: nop
//000165: If Me.Select.Rows.Count > 0 Then
IL_0012: ldarg.0
IL_0013: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_0018: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_001d: callvirt instance int32 [System.Data]System.Data.InternalDataCollectionBase::get_Count( )
IL_0022: ldc.i4.0
IL_0023: ble.s IL_004a
Many Thanks
Joe Simmonds | | | | re: line of code not compiled
I think in all probability, this is a bug which may occur occasionally. When I experience these problems I rarely put effort into it unless I can either repeat it or it is absolutely vital that this must never happen again, such as writing robust code for medical applications where no scope for error must be allowed.
Do what they do in China, put it in the pigeon hole unless it happens again. It was probably something to do with Venus crossing the sun.
Regards - OHM
"Joe Simmonds" <joe@bhth.com> wrote in message news:ey4e6GwTEHA.2704@TK2MSFTNGP10.phx.gbl...
Thanks for the response,
I have created a minimal implementation and the compiles fine and produces the expected il. I would like to add that the original project also produces the expected il when built. It was just that one build that caused a problem. I have not yet been able to reproduce it at all since the entire solution was rebuilt. We have a working build and the problem does not seem to reoccur I just want to know what happened for my own peace of mind.
Thanks
Joe
"One Handed Man ( OHM#)" <news.microsoft.com> wrote in message news:utesR3vTEHA.1284@TK2MSFTNGP10.phx.gbl...
What happens if you create a completely fresh project and put just enough code to run that particular line ?
OHM
"Joe Simmonds" <joe@bhth.com> wrote in message news:uN8xM0vTEHA.3336@TK2MSFTNGP10.phx.gbl...
Hi All,
I have just had a problem with some VB.net, I wonder if anybody can shed a little light and ease my confused brain. The problem is resolved now but I can't work out what happened and, more importantly, I can't guarantee it won't happen again. Have I misunderstood the situation? Can anybody help?
An error was spotted in a running application (A new build had just been deployed). When we stepped through the source the debugger would step completely over a line of code without executing it. When I ran ILDASM on the dll with show source lines the source line that was being missed out would be shown but no compiled code seemed to have been inserted into the dll. Below is a transcript of the ildasm output. The line 164 (in the VB source) where a call to Me.SelectAddParms seems to generate no il code at all. The il code for all the following vb source lines seems also to have been moved up to the line above.
//000162: Me.ClearSelectParms()
IL_0001: ldarg.0
IL_0002: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::ClearSelectPa rms()
IL_0007: nop
//000163:
//000164: Me.SelectAddParms(FieldList.clsContactFieldList.NT Logon, sNTLogon)
IL_0008: ldarg.0
IL_0009: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_000e: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_0013: callvirt instance int32 [System.Data]System.Data.InternalDataCollectionBase::get_Count( )
IL_0018: ldc.i4.0
IL_0019: ble.s IL_0040
//000165: If Me.Select.Rows.Count > 0 Then
IL_001b: ldarg.0
IL_001c: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_0021: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_0026: ldc.i4.0
IL_0027: callvirt instance class [System.Data]System.Data.DataRow [System.Data]System.Data.DataRowCollection::get_Item(int32)
IL_002c: ldstr "ContactID"
IL_0031: callvirt instance object [System.Data]System.Data.DataRow::get_Item(string)
IL_0036: call int32 [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.IntegerType ::FromObject(object)
IL_003b: stloc.0
IL_003c: br.s IL_0046
IL_003e: br.s IL_0045
Rebuilding this dll individually seemed to have no effect but the problem was resolved by building all of the dlls in the project, some of which this code uses. A transcript of the ILDASM output for the same section after the resolution is below. Four additional lines of il were produced. These lines are the call to the required method. No changes to the source code were made.
//000162: Me.ClearSelectParms()
IL_0001: ldarg.0
IL_0002: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::ClearSelectPa rms()
IL_0007: nop
//000163:
//000164: Me.SelectAddParms(FieldList.clsContactFieldList.NT Logon, sNTLogon)
IL_0008: ldarg.0
IL_0009: ldc.i4.s 16
IL_000b: ldarg.1
IL_000c: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::SelectAddParm s(int32,
object)
IL_0011: nop
//000165: If Me.Select.Rows.Count > 0 Then
IL_0012: ldarg.0
IL_0013: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_0018: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_001d: callvirt instance int32 [System.Data]System.Data.InternalDataCollectionBase::get_Count( )
IL_0022: ldc.i4.0
IL_0023: ble.s IL_004a
Many Thanks
Joe Simmonds | | | | re: line of code not compiled
I think that's probably good advice. I'll let it go unless it happens again later.
thanks for your help
Joe
"One Handed Man ( OHM#)" <news.microsoft.com> wrote in message news:%23ZMXjNwTEHA.3012@tk2msftngp13.phx.gbl...
I think in all probability, this is a bug which may occur occasionally. When I experience these problems I rarely put effort into it unless I can either repeat it or it is absolutely vital that this must never happen again, such as writing robust code for medical applications where no scope for error must be allowed.
Do what they do in China, put it in the pigeon hole unless it happens again. It was probably something to do with Venus crossing the sun.
Regards - OHM
"Joe Simmonds" <joe@bhth.com> wrote in message news:ey4e6GwTEHA.2704@TK2MSFTNGP10.phx.gbl...
Thanks for the response,
I have created a minimal implementation and the compiles fine and produces the expected il. I would like to add that the original project also produces the expected il when built. It was just that one build that caused a problem. I have not yet been able to reproduce it at all since the entire solution was rebuilt. We have a working build and the problem does not seem to reoccur I just want to know what happened for my own peace of mind.
Thanks
Joe
"One Handed Man ( OHM#)" <news.microsoft.com> wrote in message news:utesR3vTEHA.1284@TK2MSFTNGP10.phx.gbl...
What happens if you create a completely fresh project and put just enough code to run that particular line ?
OHM
"Joe Simmonds" <joe@bhth.com> wrote in message news:uN8xM0vTEHA.3336@TK2MSFTNGP10.phx.gbl...
Hi All,
I have just had a problem with some VB.net, I wonder if anybody can shed a little light and ease my confused brain. The problem is resolved now but I can't work out what happened and, more importantly, I can't guarantee it won't happen again. Have I misunderstood the situation? Can anybody help?
An error was spotted in a running application (A new build had just been deployed). When we stepped through the source the debugger would step completely over a line of code without executing it. When I ran ILDASM on the dll with show source lines the source line that was being missed out would be shown but no compiled code seemed to have been inserted into the dll. Below is a transcript of the ildasm output. The line 164 (in the VB source) where a call to Me.SelectAddParms seems to generate no il code at all. The il code for all the following vb source lines seems also to have been moved up to the line above.
//000162: Me.ClearSelectParms()
IL_0001: ldarg.0
IL_0002: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::ClearSelectPa rms()
IL_0007: nop
//000163:
//000164: Me.SelectAddParms(FieldList.clsContactFieldList.NT Logon, sNTLogon)
IL_0008: ldarg.0
IL_0009: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_000e: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_0013: callvirt instance int32 [System.Data]System.Data.InternalDataCollectionBase::get_Count( )
IL_0018: ldc.i4.0
IL_0019: ble.s IL_0040
//000165: If Me.Select.Rows.Count > 0 Then
IL_001b: ldarg.0
IL_001c: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_0021: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_0026: ldc.i4.0
IL_0027: callvirt instance class [System.Data]System.Data.DataRow [System.Data]System.Data.DataRowCollection::get_Item(int32)
IL_002c: ldstr "ContactID"
IL_0031: callvirt instance object [System.Data]System.Data.DataRow::get_Item(string)
IL_0036: call int32 [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.IntegerType ::FromObject(object)
IL_003b: stloc.0
IL_003c: br.s IL_0046
IL_003e: br.s IL_0045
Rebuilding this dll individually seemed to have no effect but the problem was resolved by building all of the dlls in the project, some of which this code uses. A transcript of the ILDASM output for the same section after the resolution is below. Four additional lines of il were produced. These lines are the call to the required method. No changes to the source code were made.
//000162: Me.ClearSelectParms()
IL_0001: ldarg.0
IL_0002: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::ClearSelectPa rms()
IL_0007: nop
//000163:
//000164: Me.SelectAddParms(FieldList.clsContactFieldList.NT Logon, sNTLogon)
IL_0008: ldarg.0
IL_0009: ldc.i4.s 16
IL_000b: ldarg.1
IL_000c: callvirt instance void [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::SelectAddParm s(int32,
object)
IL_0011: nop
//000165: If Me.Select.Rows.Count > 0 Then
IL_0012: ldarg.0
IL_0013: callvirt instance class [System.Data]System.Data.DataTable [AIM2DataClasses]PI_BaseClasses.clsPIDBBaseExtension::Select()
IL_0018: callvirt instance class [System.Data]System.Data.DataRowCollection [System.Data]System.Data.DataTable::get_Rows()
IL_001d: callvirt instance int32 [System.Data]System.Data.InternalDataCollectionBase::get_Count( )
IL_0022: ldc.i4.0
IL_0023: ble.s IL_004a
Many Thanks
Joe Simmonds | | | | re: line of code not compiled
* "Joe Simmonds" <joe@bhth.com> scripsit:[color=blue]
> I have just had a problem with some VB.net, I wonder if anybody can shed a little light and ease my confused brain.* The
> problem is resolved now but I can't work out what happened and, more importantly, I can't guarantee it won't happen again.*
> Have*I misunderstood the situation?[/color]
Maybe there was a problem with the files in the "obj" folder, and
rebuilding the whole solution overwrote these files. Who knows...
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/> |  | Similar Visual Basic .NET bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,510 network members.
|