Compiling throws System.OutOfMemoryException

Posts   
 
    
Stephan
User
Posts: 63
Joined: 16-Jan-2007
# Posted on: 12-Jun-2007 15:24:24   

Hi there,

we are developing a large application, that is, we think it pretty large. Because of change of view we have to change fields and table in the database and of course we have to regenerate the DAL again. The strange thing is that nearly every time we checkout (we use source control) the new DAL, compilation of the applications throws the 'System.OutOfMemoryException' exception. Only if we use an other folder (completely new) and checkout the whole solution is recompiles ok. I know this may be not enough information, and I'm also wondering if this is a LLBLGen problem, it could also be the framework 2.0 or C# compiler, but any suggestions are welcome. We can reproduce the problem on multiple workstations.

We use: - LLBLGen 2.0 Latest version - SVN Source Control - .NET Framework 2.0 - Windows XP Professional Workstations with 1 GB Memory - VS 2005 - MS SQL 2005

jbb avatar
jbb
User
Posts: 267
Joined: 29-Nov-2005
# Posted on: 12-Jun-2007 15:40:43   

Hello,

did you try to to exclude from svn your dal and compile only the dal? I had the same problem with sourcesafe and large projects that disapear using tfs.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 14-Jun-2007 10:55:12   

Could you check if you have one or more entities with an extreme # of (m:n) relations? For example there are cases where models use a base entity which has relations to every other entity in the system and it then ends up with an extreme # of relations and the class is then very very big, which is often unnecessary as the relations aren't used or not necessarily used from the base entity's side, so you can hide the relations in the designer (open entity in editor, relations tab, hold shift and select all -> hide)

It's strange though, I haven't heard about this before and I know for a fact that some users have made systems with over 3000 tables using llblgen pro. Compiling the code was a bit problematic in that case in vs.net (slow) but on the command line it was OK.

Frans Bouma | Lead developer LLBLGen Pro
Stephan
User
Posts: 63
Joined: 16-Jan-2007
# Posted on: 14-Jun-2007 11:46:43   

Thanks for the informatione,

I don't think we have this extreme number of relations, but just to make sure, we will check this. The first thing we will do however, is the suggestion by JBB. So exclude the DAL from SVN, see if this solves any problems. Again, I don't think this is a LLBLGen problem but unfortunatly we have to deal with this.

As soon as we have new infomation I will let you know. Thanks for the help.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 14-Jun-2007 15:20:15   

I'll mark this thread as closed, it will abe automaically re-openned if you post a reply.

Stephan
User
Posts: 63
Joined: 16-Jan-2007
# Posted on: 27-Jun-2007 11:58:48   

The story continues.

We found out that if we just create a new folder and update this folder with the current checked in application (Website, DAL, BL) it is working (compiling) ok, as long as we do not make any changes to the DB and regenerate the code. So can work around this in the way I described before.

  • Create a new folder
  • Update this folder with the new version
  • Compile.

I think the problem is with the compiler of VS 2005. Any other suggestions are welcome. But for now we can work around the problem.

This information is just for others who experience the same problem.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 27-Jun-2007 12:38:52   

If you want I can escalate this directly to the C# compiler team. This will require extra info, and likely for you to send them your project's sourcecode, which might not be what you want to do wink

The thing with the compilation is odd though. Have you tried to place the DAL in its own solution? (so you reference the assembly from bl/ui ?) How many entities are we talking about btw? If you check in the entities folder of the DAL, is there an entity class which is very big in size?

If you remove the obj folder in your DAL's folder, and recompile again, does it then still bug with the outofmemory exception?

Frans Bouma | Lead developer LLBLGen Pro
Stephan
User
Posts: 63
Joined: 16-Jan-2007
# Posted on: 27-Jun-2007 18:38:01   

Hi Otis, I don't mind sending the source code. As said before we can work around this by creating a new folder of delete the content of an old folder and update from SVN.

About your questions: - The number of entities we use now is 66. The largest is 78KB Base entity, 27 KB custom entity. - No we do not have a special solution for the BL. In the currenct project we use a DAL project, a BL project and a UI project (the actual website). - No we didn't delete the obj folder, this we will try.

The suggestion that it is the C# compiler is purely our suggestion. The first thing we will do is deleten the obj folder before we compile again

The suggestion puting the DAL in it's own solution I don't like, but maybe we will try.

Thx

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 27-Jun-2007 20:44:44   

66 is a small number, AdventureWorks on sqlserver2005 has more entities, also the file size aren't spectacular so that's also not it. So it's not the project size I think.

Let me know if I should escalate it to the C# team. If you could try deleting the obj file and see if that helps, that would give more info for me to report to the C# team.

Frans Bouma | Lead developer LLBLGen Pro
Stephan
User
Posts: 63
Joined: 16-Jan-2007
# Posted on: 28-Jun-2007 09:36:06   

Hi Otis,

we tried the suggestion deleting the obj-folder. This didn't work. I also have to mention that we frequently change table. This is the reason why we have to regenerate often.

I think today we will regenerte again. If it has the same exception, we will put the DAL in a seperate solution and try to complile this. It this solution also throws the exception, I will post this here. And if necessary we can supply the solution source and DB for the team to run tests on. OK?

Thanks for the coop.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 28-Jun-2007 10:52:19   

IMHO, the eproblem comes from compiling the DAL, as this is the only changed classes when you re-generate. So there might be some files or projects files that are held by the Source control that prevent proper re-generation.

I suggest you remove the generated code from the Source Control. You may only put the LLBLGen Pro lgp project file in the source control. This might be sufficient. Since it is the source of the generated code.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 28-Jun-2007 15:17:16   

Ok Stephan, let me know when I have to send the C# team an email simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Stephan
User
Posts: 63
Joined: 16-Jan-2007
# Posted on: 04-Jul-2007 10:18:03   

Hi Otis, yesterday I encountered the above exception again trying to compile the projects separately. Tried it three times in a row, but in the end a dialog box appears that is saying there is a memory problem and nothing is compiled. After creating a new folder and checking in a new version from the server, everything is working ok.

This morning I startup VS 2005 and immediately there is a popup saying that some errors where encountered and if I wanted to send detail about this to MS. The problem is this takes a long time. I was able to save the messages en memory dump. Do you think this is helpful to the MS people.

After the problems described VS is not able to create any windows apps. I mean I cannot use any windows forms anymore. In this case I get the message that there is no editor associated with a cs form. But this could be of an other cause.

In short: Do you think is useful to send these dumps. If so, will I first send them to you?

Thx

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 04-Jul-2007 10:34:23   

Stephan wrote:

Hi Otis, yesterday I encountered the above exception again trying to compile the projects separately. Tried it three times in a row, but in the end a dialog box appears that is saying there is a memory problem and nothing is compiled. After creating a new folder and checking in a new version from the server, everything is working ok.

This morning I startup VS 2005 and immediately there is a popup saying that some errors where encountered and if I wanted to send detail about this to MS. The problem is this takes a long time. I was able to save the messages en memory dump. Do you think this is helpful to the MS people.

After the problems described VS is not able to create any windows apps. I mean I cannot use any windows forms anymore. In this case I get the message that there is no editor associated with a cs form. But this could be of an other cause.

In short: Do you think is useful to send these dumps. If so, will I first send them to you?

Thx

Not being able to create any winforms apps is odd. Do you have installed SP1 for vs.net 2005? do you have installed any CTP's/Betas for orcas?

This is a severe issue it seems. I'd suggest you call PSS of MS and use the right you have to get an engineer from them assigned to you to help you fix this. Every VS.NET licensee has 2 (if I'm not mistaken, could be 3) free calls to MS about this. The PSS number for your country can be found here: http://support.microsoft.com/oas/default.aspx?gprid=3041

For the compiler issue, I can ask them what they need and what you should do. However this seems bigger than just a compiler issue.

Frans Bouma | Lead developer LLBLGen Pro
Stephan
User
Posts: 63
Joined: 16-Jan-2007
# Posted on: 04-Jul-2007 11:20:23   

Thanks for the reply. No beta's installed. Most recent updates installed.

I saved the application which throws the error, so if they need the code I have all of it. As said before creating a new folder and then update works. So I will keep the old version and the log files for further info.

and again thanks for the help.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 06-Jul-2007 11:42:34   

Stephan wrote:

Thanks for the reply. No beta's installed. Most recent updates installed.

I saved the application which throws the error, so if they need the code I have all of it. As said before creating a new folder and then update works. So I will keep the old version and the log files for further info.

and again thanks for the help.

As the problems seem bigger, could you first try via PSS to see if they have proper info available from others who might also had this issue?

Frans Bouma | Lead developer LLBLGen Pro
Stephan
User
Posts: 63
Joined: 16-Jan-2007
# Posted on: 20-Dec-2007 09:09:38   

It has been a long time since we discussed about the this problem. Btw I never contacted PSS, because I don't know what it is disappointed

We have some experience now, and the best way to avoid this problem is:

  • Compile the DAL in a seperate project
  • Use the generated DLL's in the project you are working on.

What we did, generating the project on the same location as the project we were working on.

Hopes this helps someone.

Do you still want me to contact PSS, then maybe you could tell me what it is simple_smile

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 20-Dec-2007 10:02:56   

Frans wrote:

This is a severe issue it seems. I'd suggest you call PSS of MS and use the right you have to get an engineer from them assigned to you to help you fix this. Every VS.NET licensee has 2 (if I'm not mistaken, could be 3) free calls to MS about this. The PSS number for your country can be found here: http://support.microsoft.com/oas/default.aspx?gprid=3041

Quoted from the first link that appeared on a google search for "Microsoft PSS": Microsoft Product Support Services (PSS) is the group who answers the phone when you call technical support for help. If you don't have the phone number committed to memory yet, it's 800-936-4900 for US customers. When you encounter a server situation that you don't know how to fix, first search PSS’s knowledge base to try to find the solution to your problem. If you don’t find the answer, call PSS.

Stephan
User
Posts: 63
Joined: 16-Jan-2007
# Posted on: 20-Dec-2007 10:04:56   

I could have thought of that. sorry. Thanks for the help