locked
Release and debug mode problems? RRS feed

  • Question

  • Hi,

     

    At the company I work for, we develop a complex application in VB.NET, Visual Studio 2003 and .NET framework 1.1. The application consists of several processes (.exe's, running one or a few timers) and several .dll's all developed in VB.NET.  The application environment on its production server is Windows 2003, SQL Server 2000 and running RAID 5.

     

    We have experienced hangings in our processes which they don't recover from. When we restart the processes the application keeps on going as normal and everything works fine until next hanging. We thought this problem was related to the anti virus software installed on the server (eTrust Antivirus 7.1.92) but when we closed it down it the symptoms of our problem changed. The processes crashed instead of hanged. Our custom made trace revealed that the code crashed on very simple and well tested functions, like e.g. sending a simple query to a database.

     

    When running our application on the production server, we have always used release mode but when searching for this problem we have now used debug mode on our processes and the hanging/crashing problem seems to have vanished. We should soon deliver our application but it seems that this solution (running in debug mode) should be thoroughly tested, using time we don't have Smile

     

    My question are:

    Have anyone else experienced this problem and how were the problems solved?

    Can (given the above short information) compiling in debug mode be a possible solution to our problem?

     

    Grateful for answers,

    Best /M

     

    Tuesday, August 28, 2007 6:35 AM

Answers

  • I suspect it's a problem with references

     

    I assume you have multiple projects within a solution, i.e. database layers, etc.  If the master solution points to the projects DEBUG dlls, then when you want a relaese version, you have to change all the references, easy to make a mistake.

     

    A better approach is to make a master solution, with all your referenced projects in it, then you point your references to the projects, NOT debug/release dlls (i.e. the actual file)

     

    Then, when you swap from debug to release, it does it all for you.  Might be a pain to set up the first time, but believe me, it's a LOT easier

     

    Friday, August 31, 2007 2:08 PM
  • You are making this unnecessarily difficult by not telling us what kind of exceptions you are getting.  The generic diagnostic is that you're suffering from severe application instability.  Typically caused by wild pointer writes destroying data structures.  It is not necessarily your software doing this, database drivers, virus checkers and Apple ITunes can do this sort of thing.  By switching between release and debug builds and turning virus checker on and off, you are changing the memory layout of your program, thus causing different structures being exposed to the damage.
    Sunday, September 2, 2007 8:32 PM

All replies

  • I suspect it's a problem with references

     

    I assume you have multiple projects within a solution, i.e. database layers, etc.  If the master solution points to the projects DEBUG dlls, then when you want a relaese version, you have to change all the references, easy to make a mistake.

     

    A better approach is to make a master solution, with all your referenced projects in it, then you point your references to the projects, NOT debug/release dlls (i.e. the actual file)

     

    Then, when you swap from debug to release, it does it all for you.  Might be a pain to set up the first time, but believe me, it's a LOT easier

     

    Friday, August 31, 2007 2:08 PM
  • You are making this unnecessarily difficult by not telling us what kind of exceptions you are getting.  The generic diagnostic is that you're suffering from severe application instability.  Typically caused by wild pointer writes destroying data structures.  It is not necessarily your software doing this, database drivers, virus checkers and Apple ITunes can do this sort of thing.  By switching between release and debug builds and turning virus checker on and off, you are changing the memory layout of your program, thus causing different structures being exposed to the damage.
    Sunday, September 2, 2007 8:32 PM