BUG: VB.NET compiler crashes itself or the IDE, when referencing C# DLL 
Author Message
 BUG: VB.NET compiler crashes itself or the IDE, when referencing C# DLL

Building any of various trivial VB programs from the command line with a
refernce to my DLL produces the 0xC0000005 error from the compiler (which
looks like the hex value of Access Violation to me!).
When built in the DevStudio IDE, the compile stage may do any of:
a) go off but not return , but can be stopped with the End Build command
b) crash with a stick-up
c) crash the entire IDE, triggering a "send this bug to Microsoft?" stickup.
Actually "running" the VB program is out of the question - the IDE is so
sick I can't properly edit as auto-complete and incremental compilation
crash with every edit; and the Form Designer is stuffed as it has no
resource file to work with, as the compiler never gets so far as to
re-generate it. (I keep cleaning out the obj folders to give the thing a
chance to start again - sometimes it helps).

The DLL "bin\MGDS_Net.dll" is my own, coded in C#.  C# programs compiled
against it build fine (and run fine, too!). Removing the DLL reference lets
the compile run properly, although understandably it is only to generate
compilation errors since the required classes and functions are not
defined...

G:\My Documents\Visual Studio Projects\SampleVB>vbc /verbose form1.vb
/reference:bin\MGDS_Net.dll,c:\winnt\Microsoft.NET\Framework\v
1.0.3705\System.Windows.Forms.dll,c:\winnt\Microsoft.NET\Framework\v1.0.3705
\System.dll /target:winexe
Microsoft (R) Visual Basic .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.00.3705.209
Copyright (C) Microsoft Corporation 1987-2001. All rights reserved.

Adding file 'G:\My Documents\Visual Studio Projects\SampleVB\Form1.vb'
Adding assembly reference 'G:\My Documents\Visual Studio
Projects\SampleVB\bin\MGDS_Net.dll'
Adding assembly reference
'c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll'
Adding assembly reference
'c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.dll'
Compiling...
Loading C:\WINNT\Microsoft.NET\Framework\v1.0.3705\mscorlib.dll.
Loading
C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Microsoft.VisualBasic.dll.
Loading G:\My Documents\Visual Studio Projects\SampleVB\bin\MGDS_Net.dll.
Loading c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll.
Loading c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.dll.
vbc : Command line error BC2010 : compilation failed : '0xC0000005'
Compilation failed: 1 error

It appears it may be affected by the sheer number of functions in the DLL...
The DLL defines approx 800 private static extern functions calling on into a
C DLL, and the same number of C# public static interludes which turn error
codes into thrown exceptions, and massage argument types. If I cut out
almost all the functions then VB.NET will compile against the DLL; as I
re-introduce them, VB.NET re-builds start to hang, then crash, then
(sometimes) crash the IDE, as the number of functions increase.
The worst problems come with the full DLL with all its functions, structs
and enums.
[There was an early stage when I just had the basic static extern functions
with no interludes, no nice error trapping, no enums etc, which *did* build
and run fine, but it was like using VB6 with a sprinkling of .NET sugar...
ick!]

We're using Win 2000 SP2, Dell 4100 (Piii/866) with 512MB memory and plenty
of free disk, on machines with VC6 and DevStudio 7 (VC7, VB.NET, C#)
installed side-by-side.  [We don't have VB6 on the machines I'm developing
on.]

If it helps, I can supply the built DLL (approx 100KB) or even the C# source
of the DLL as it's only trival interludes... But I am stumped, along with
the rest of us here.



Sat, 08 Jan 2005 15:52:37 GMT  
 BUG: VB.NET compiler crashes itself or the IDE, when referencing C# DLL
I can only suggest that you post the code in question and see if anybody
else can compile successfully. That will at least confirm whether it is a
VS.NET bug or an issue with you installation. Additionally, it will ease
trying to help you diagnose the problem.

If you do not wish to post your code publicly, you may email it to me to try
if you wish.

Good luck.

--
Martin Robins.

This message is posted "as is" etc., confers no rights etc., so don't sue me
etc.. You know the script.

Person Me = New Person();
while (Me.Alive)
{
   try
   {
      Me.Drink({*filter*}.Any);
   }
   catch (HeaveException h)
   {
      Me.PrayToCeramicGod();
      Me.Promise("Never again");
   }

Quote:
}

Me.Dispose();



Quote:
> Building any of various trivial VB programs from the command line with a
> refernce to my DLL produces the 0xC0000005 error from the compiler (which
> looks like the hex value of Access Violation to me!).
> When built in the DevStudio IDE, the compile stage may do any of:
> a) go off but not return , but can be stopped with the End Build command
> b) crash with a stick-up
> c) crash the entire IDE, triggering a "send this bug to Microsoft?"
stickup.
> Actually "running" the VB program is out of the question - the IDE is so
> sick I can't properly edit as auto-complete and incremental compilation
> crash with every edit; and the Form Designer is stuffed as it has no
> resource file to work with, as the compiler never gets so far as to
> re-generate it. (I keep cleaning out the obj folders to give the thing a
> chance to start again - sometimes it helps).

> The DLL "bin\MGDS_Net.dll" is my own, coded in C#.  C# programs compiled
> against it build fine (and run fine, too!). Removing the DLL reference
lets
> the compile run properly, although understandably it is only to generate
> compilation errors since the required classes and functions are not
> defined...

> G:\My Documents\Visual Studio Projects\SampleVB>vbc /verbose form1.vb
> /reference:bin\MGDS_Net.dll,c:\winnt\Microsoft.NET\Framework\v

1.0.3705\System.Windows.Forms.dll,c:\winnt\Microsoft.NET\Framework\v1.0.3705

- Show quoted text -

Quote:
> \System.dll /target:winexe
> Microsoft (R) Visual Basic .NET Compiler version 7.00.9466
> for Microsoft (R) .NET Framework version 1.00.3705.209
> Copyright (C) Microsoft Corporation 1987-2001. All rights reserved.

> Adding file 'G:\My Documents\Visual Studio Projects\SampleVB\Form1.vb'
> Adding assembly reference 'G:\My Documents\Visual Studio
> Projects\SampleVB\bin\MGDS_Net.dll'
> Adding assembly reference
> 'c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll'
> Adding assembly reference
> 'c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.dll'
> Compiling...
> Loading C:\WINNT\Microsoft.NET\Framework\v1.0.3705\mscorlib.dll.
> Loading
> C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Microsoft.VisualBasic.dll.
> Loading G:\My Documents\Visual Studio Projects\SampleVB\bin\MGDS_Net.dll.
> Loading

c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll.

- Show quoted text -

Quote:
> Loading c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.dll.
> vbc : Command line error BC2010 : compilation failed : '0xC0000005'
> Compilation failed: 1 error

> It appears it may be affected by the sheer number of functions in the
DLL...
> The DLL defines approx 800 private static extern functions calling on into
a
> C DLL, and the same number of C# public static interludes which turn error
> codes into thrown exceptions, and massage argument types. If I cut out
> almost all the functions then VB.NET will compile against the DLL; as I
> re-introduce them, VB.NET re-builds start to hang, then crash, then
> (sometimes) crash the IDE, as the number of functions increase.
> The worst problems come with the full DLL with all its functions, structs
> and enums.
> [There was an early stage when I just had the basic static extern
functions
> with no interludes, no nice error trapping, no enums etc, which *did*
build
> and run fine, but it was like using VB6 with a sprinkling of .NET sugar...
> ick!]

> We're using Win 2000 SP2, Dell 4100 (Piii/866) with 512MB memory and
plenty
> of free disk, on machines with VC6 and DevStudio 7 (VC7, VB.NET, C#)
> installed side-by-side.  [We don't have VB6 on the machines I'm developing
> on.]

> If it helps, I can supply the built DLL (approx 100KB) or even the C#
source
> of the DLL as it's only trival interludes... But I am stumped, along with
> the rest of us here.



Sat, 08 Jan 2005 21:12:00 GMT  
 BUG: VB.NET compiler crashes itself or the IDE, when referencing C# DLL
You might want to post to microsoft.public.dotnet.languages.csharp, instead
of ...vc, since this posting is off-topic in ...vc but completely relevant
in ...csharp.

-cd



Quote:
> Building any of various trivial VB programs from the command line with a
> refernce to my DLL produces the 0xC0000005 error from the compiler (which
> looks like the hex value of Access Violation to me!).
> When built in the DevStudio IDE, the compile stage may do any of:
> a) go off but not return , but can be stopped with the End Build command
> b) crash with a stick-up
> c) crash the entire IDE, triggering a "send this bug to Microsoft?"
stickup.
> Actually "running" the VB program is out of the question - the IDE is so
> sick I can't properly edit as auto-complete and incremental compilation
> crash with every edit; and the Form Designer is stuffed as it has no
> resource file to work with, as the compiler never gets so far as to
> re-generate it. (I keep cleaning out the obj folders to give the thing a
> chance to start again - sometimes it helps).

> The DLL "bin\MGDS_Net.dll" is my own, coded in C#.  C# programs compiled
> against it build fine (and run fine, too!). Removing the DLL reference
lets
> the compile run properly, although understandably it is only to generate
> compilation errors since the required classes and functions are not
> defined...

> G:\My Documents\Visual Studio Projects\SampleVB>vbc /verbose form1.vb
> /reference:bin\MGDS_Net.dll,c:\winnt\Microsoft.NET\Framework\v

1.0.3705\System.Windows.Forms.dll,c:\winnt\Microsoft.NET\Framework\v1.0.3705

- Show quoted text -

Quote:
> \System.dll /target:winexe
> Microsoft (R) Visual Basic .NET Compiler version 7.00.9466
> for Microsoft (R) .NET Framework version 1.00.3705.209
> Copyright (C) Microsoft Corporation 1987-2001. All rights reserved.

> Adding file 'G:\My Documents\Visual Studio Projects\SampleVB\Form1.vb'
> Adding assembly reference 'G:\My Documents\Visual Studio
> Projects\SampleVB\bin\MGDS_Net.dll'
> Adding assembly reference
> 'c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll'
> Adding assembly reference
> 'c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.dll'
> Compiling...
> Loading C:\WINNT\Microsoft.NET\Framework\v1.0.3705\mscorlib.dll.
> Loading
> C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Microsoft.VisualBasic.dll.
> Loading G:\My Documents\Visual Studio Projects\SampleVB\bin\MGDS_Net.dll.
> Loading

c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll.

- Show quoted text -

Quote:
> Loading c:\winnt\Microsoft.NET\Framework\v1.0.3705\System.dll.
> vbc : Command line error BC2010 : compilation failed : '0xC0000005'
> Compilation failed: 1 error

> It appears it may be affected by the sheer number of functions in the
DLL...
> The DLL defines approx 800 private static extern functions calling on into
a
> C DLL, and the same number of C# public static interludes which turn error
> codes into thrown exceptions, and massage argument types. If I cut out
> almost all the functions then VB.NET will compile against the DLL; as I
> re-introduce them, VB.NET re-builds start to hang, then crash, then
> (sometimes) crash the IDE, as the number of functions increase.
> The worst problems come with the full DLL with all its functions, structs
> and enums.
> [There was an early stage when I just had the basic static extern
functions
> with no interludes, no nice error trapping, no enums etc, which *did*
build
> and run fine, but it was like using VB6 with a sprinkling of .NET sugar...
> ick!]

> We're using Win 2000 SP2, Dell 4100 (Piii/866) with 512MB memory and
plenty
> of free disk, on machines with VC6 and DevStudio 7 (VC7, VB.NET, C#)
> installed side-by-side.  [We don't have VB6 on the machines I'm developing
> on.]

> If it helps, I can supply the built DLL (approx 100KB) or even the C#
source
> of the DLL as it's only trival interludes... But I am stumped, along with
> the rest of us here.



Sat, 08 Jan 2005 21:21:23 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VB.NET compiler crashes itself or the IDE, when referencing C# DLL

2. I really need Help! The VB compiler crashes when I reference C# project DLL from VB code

3. Referencing C# unsafe code from VB.net

4. Problem referencing C# defined constant from VB.NET in ASPX page

5. Using VB.NET Class in C# without making as DLL

6. ActiveX Dll equivalent in VB.NET or C#

7. Tell me you experience in convert code from VB 6 to VB.NET or C#

8. difference betwen VC .net and C#, VB.net

9. IntelliSense in VS.NET (C# versus VB.NET)

10. .NET Bug with C# and ADO.NET????

11. C# Language Reference for IDE

12. Howto make a dll in VC++ 6 to be used in VB 6 and VB .Net

 

 
Powered by phpBB® Forum Software