.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

HLSL Compiler Bug: Compiler eats tons of memory and gives up

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :WPF
 

I am currently working on some HSLS effects, based on the HSLS samples on codeplex when I ran into this issue. If you try to compile the code below, the compiler task will blow up memory usage of the devenv to over 1GB and then returns with a "NullReferenceException":

Error    2    The "PixelShaderCompile" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
   at ShaderBuildTask.PixelShaderCompile.Execute()
   at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)    H:\Visual Studio 2008\Projects\ControlledTransitions\TransitionEffects\WPFTransitionEffects.csproj    146    5    WPFTransitionEffects

 

I do not get any error message from the compiler itself, like it should normally be. This happens on both VS2008 and 2010, with WinSDK 6.1 as well as 7.1. Sometimes even VS crashes completely.

Here is the code causing the issue:

float progress : register(C0);
float2 twistAmount : register(C1);
sampler2D implicitInput : register(s0);
sampler2D oldInput : register(s1);


float4 SampleWithBorder(float4 bo


View Complete Post


More Related Resource Links

Compiler-generated scopes for local variable declarations

  
I was tasked with understanding and fixing a bug on error reporting with foreach iteration variables the other day, and it got me thinking about local variable scoping rules in C# in general. First, the bug.

Compiler Error Message : CS0006: Metadata file 'System.EnterpriseServices.dll' could not be found

  

I get this error when i Debug my web application....

error

I followed these steps.,

  • Ended the aspnet_wp.exe process in the Windows Task Manager
  • Then deleted the application`s folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
  • Then started Visual Studio 2008 again

I also rebooted my system but no use....

Plz help !


Roll Your Own: Create a Language Compiler for the .NET Framework

  

Joel Pobar presents an introduction to how compilers work and how you can write your own compiler to target the .NET Framework.

Joel Pobar

MSDN Magazine February 2008


Advanced Basics: Scaling Up: The Very Busy Background Compiler

  

One of the features that distinguishes Visual Basic® from the other languages in Visual Studio® is its use of a background compiler (BC). The BC runs from the moment you start up a Visual Basic project until the time you close the last one down.

Matthew Gertz

MSDN Magazine June 2005


C++ Rules: Power Your App with the Programming Model and Compiler Optimizations of Visual C++

  

Many programmers think that C++ gets good performance because it generates native code, but even if your code is completely managed you'll still get superior performance. In Visual Studio 2005, the C++ syntax itself has been greatly improved to make it faster to write. In addition, a flexible language framework is provided for interacting with the common language runtime (CLR) to write high-performance programs. Read about it here.

Kang Su Gatlin

MSDN Magazine January 2005


Still in Love with C++: Modern Language Features Enhance the Visual C++ .NET Compiler

  

Programmers who have been using C++ for years are wondering where their language is headed with the advent of C# and Microsoft .NET. This article sketches a roadmap of C++ as it is used in the world of .NET. In .NET there are two approaches to C++ code: managed and unmanaged. Unmanaged code doesn't use the CLR, while managed code involves the use of Managed Extensions for C++. This discussion explains both approaches.

Stanley B. Lippman

MSDN Magazine February 2002


Classes created inside App_Code dir is ignored by the compiler

  

Hi,

I have the following problem programming in asp .net with visual studio 2008. If I insert a new class file, right clicking on "add new element -> class -> ecc..." directly inside the App_Code directory (or in its any subdirectory) the compiler and the smartTab do not see any custom namespace previously created in other classes, nor from other classes I can find the namespace and the class name defined within the new class file just inserted. The only way I found to correctly insert a new class file is create it right clicking on "add new element... ecc..." not in the App_Code (or sub) directory but rather in the root node with the name of the entire project, and then I can move it in the destination App_Code subdirectory, and it keeps working.

As a matter of facts it seems that is not important where the file IS but rather where I CREATED it: if I created a class from inside the App_Code it does not see anything and it is not seen by any other class, otherwise if I create it right clicking on the root node of the project it works and keeps workng even moving inside any subdir within the project.

I also tried to manually add the App_Code subdirs to the <Compilation> and <codeSubDirectories> tags of the Web.config file, but anything changed with this behaviour.

Does anybody know why?

<

How can I solve this problem?::Compiler Error Message: CS0433: The type 'CrystalDecisions.Web.Cryst

  

I upgraded my web application from visual studio 2003 to 2008. When I want to create a report in visual studio 2008 and receiving this error at runtime. I am able to compile but when runnning thats when I am getting this error.

How can I solve this problem? please help.

Compilation Error

Server Error in '/IRPSDEV' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0433: The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Web\10.5.3700.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\irpsdev\9e97e0a9\94a2ecd\assembly\dl3\151eb571\00df56e1_6064c201\CrystalDecisions.Web.DLL'

Source Error:

Line 161:        
Line 162:        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 163:        private global::CrystalDecisions.Web.CrystalR

LINQ to SQL compiler error CS1519: Invalid token 'void' in class, struct, or interface member decl

  
I get the following compiler errors when creating my first LINQ to SQL class (I just dragged a table "ProfileExtended" onto the designer and hit build):DataClasses.designer.cs(31,11): error CS1519: Invalid token 'void' in class, struct, or interface member declaration these are the offending lines of autogenerated code:#region Extensibility Method Definitions  partial void OnCreated();  partial void InsertProfileExtended(ProfileExtended instance);  partial void UpdateProfileExtended(ProfileExtended instance);  partial void DeleteProfileExtended(ProfileExtended instance);  #endregion

WCF on GoDaddy - Compiler doesn't recognize [OperationContract]

  
I've created a bare-bones WCF service (with just the default DoWork method in order to simplify things) and it compiles and runs just fine on my local computer running Visual Studio. When I deploy the service to my GoDaddy server, I get the following error. Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0246: The type or namespace name 'OperationContract' could not be found (are you missing a using directive or an assembly reference?) Source Error: Line 10: public interface IShtibLuachWcfService Line 11: { Line 12: [OperationContract] Line 13: void DoWork(); Line 14: [OperationContract] Source File: d:\hosting\4541103\html\App_Code\IShtibLuachWcfService.cs Line: 12 Show Detailed Compiler Output: C:\Windows\SysWOW64\inetsrv> "C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe" /t:library /utf8output /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System ..Xml.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a 3a\System.Web.Services.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\Sy stem.Drawing.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Co

JIT Compiler Issue

  
I have a pretty big project with about 60 forms.  Everytime I run the exe the JIT seems to recompile everything from scratch.  The problem is that when I open the application it is very slow.  Then when I open each form for the first time it is very slow.  Once the application has opened the form even if I close it and then reopen it, it is very fast.  This only happens when I run the application for the first time.  To make matters worse when I close the application and then start the application all over again it is slow until the user has opened each for again.  I understood that the JIT was supposed to save a copy of the compiled exe and when you run it, there is a checksum run to make sure it has not changed if it has not changed then it does not compile it again.  Does anyone have any ideas about how to fix this so that it is not slow all the time like this.  The version has not changed so I would think it would not have a need to compile it each time. Thanks in advance

Compiler difference and IL interpretation between C# and VB.NET

  
I've stumbled upon an issue on which I can't get my head around ... The code below compiles and works perfectly with VB.NET at the end of the line. But with C# the code does not get compiled.... In short we've got a base class, written in C#, with two virutal methods (same name, different sig) Next we have a derrived class which overrides one of those methods. The derrived class has been implemented both in C# as in VB.Net. And the end of the line we have small console application that simply calls the methods on both derrived classes. There are also two version of the console application, one in C# and one in VB.Net. The VB.Net applications compiles and works perfectly. The C# version does not even compile. We've already found a solution : change the derrived class in VB.Net and add the overloads keyword (in addition to override) and then the C# version also works. What I don't understand is why the VB.Net application worked in the first place and the C# did not... And secondly, why does the overloads keyword need to be added to solve the issue? (we are overriding, not hiding) Is that the right solution?   The base class (c#) namespace WeirdStuff { public abstract class BaseClass { public virtual string getMethodSig(int i) { return "string BaseClass.getMethodSig(int i)"; } public virtual string getMethodSig(string s) { return "str

Compiler Error Message: CS0103: The name 'lblRegion' does not exist in the current context

  
i am gettign this error Compiler Error Message: CS0103: The name 'lblRegion' does not exist in the current context Source Error: Line 31: {Line 32: Line 33: lblRegion.Text = dt.Rows[0]["RegionName"].ToString();Line 34: lblCountry.Text = dt.Rows[0]["CountryName"].ToString();Line 35: lblCountryCode.Text = dt.Rows[0]["CountryCode"].ToString(); this is source code:using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Net;using System.Xml;public partial class CSharp : System.Web.UI.Page{    protected void Page_Load(object sender, EventArgs e)    {        //Get IP Address        string ipaddress;        ipaddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];        if (ipaddress == "" || ipaddress == null)            ipaddress = Request.ServerV

Compiler Error Message: CS0308

  
Can anyone explain the meaning of this error?   Compiler Error Message: CS0308: The non-generic method 'System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, string, string, string, string, string, string, System.Web.Routing.RouteValueDictionary, System.Collections.Generic.IDictionary<string,object>)' cannot be used with type arguments Source Error: Line 23: <div id="header"> Line 24: Line 25: <p id="logo"><%= Html.ActionLink<InstancesController>(c => c.Index(), "Firmex Instance Manager") %></p> Line 26: Line 27: <ul id="mainMenu">   Thank you, in advance.    

Compiler Error Message: CS0308

  
Can anyone explain the meaning of this error?   Compiler Error Message: CS0308: The non-generic method 'System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, string, string, string, string, string, string, System.Web.Routing.RouteValueDictionary, System.Collections.Generic.IDictionary<string,object>)' cannot be used with type arguments Source Error: Line 23: <div id="header"> Line 24: Line 25: <p id="logo"><%= Html.ActionLink<InstancesController>(c => c.Index(), "Firmex Instance Manager") %></p> Line 26: Line 27: <ul id="mainMenu">   Thank you, in advance.

Imaging.CreateBitmapSourceFromMemorySection litterally eats GPU memory

  
I found out this being the way to have the smoothest scrolling, I need to have a 60 fps scrolling of a 70Mb bitmap I rendered previously in memory, after some profiling with WPF Performance Suite, it eats about 800Mb of GPU ! I get periodic slow downs in the FPS, I guess cleaning up 800Mb takes some time or something else, anyway this is just an unacceptable behavior. http://img192.imageshack.us/img192/833/snap1lk.png Moreover, my laptop has shared memory which means it can uses up to 1.5Gb of the 4Gb of RAM so it does affect the available resources for other programs. My first solution was to use a WriteableBitmap and update its BackBuffer, it's not as smooth but it does use only 4Mb. http://img840.imageshack.us/img840/6646/snap2.png In case you wonder, I am NOT creating an InteropBitmap every time, I create it on the beginning, then when I update it I do some CopyMemory then InteropBitmap.Invalidate. Also, the image size I display is 1920*256 at 32bpp. There's no way for us to clean that memory more often... Is this a bug in InteropBitmap ? Thanks for your help :-)   Here is the code: (BASS is an audio library for .NET : http://www.un4seen.com/ ) <Window x:Class="interop.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow&qu

DotNet 3.5 compiler error

  

Hi there,

I'm developing my software in VStudio2008. My project combines both native C++ and managed C++ with CLR support. I recently changed NetFramework from 2 to 3.5. With this change its compiler asked a reference to System.Core for some of my code. So, I imported it into my project's reference. However, this import results in a fatal compiler error message quoted as the follow.

"c:\project\comm.cpp(177) : fatal error C1001: An internal error has occurred in the compiler.

(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x5111E0DB:0x00000030]', line 243)

To work around this problem, try simplifying or changing the program near the locations listed above.

Please choose the Technical Support command on the Visual C++

Help menu, or open the Technical Support help file for more information"

The error basically happened on the following alike simple code:

char* lcode = "abc";

System::String^ str = gcnew System::String(lcode);

However, the error went away when I did the following test. Certainly, I can't use the following code for my real case where a char pointer variable is used.

System::String^ str = gcnew System::String("abc");

There is a bug report at https://connect.microsoft.com/VisualStu

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend