|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
C# code works if running from Visual studio, but not from executable file?We have a 6 year old application, which contains both managed (C#) and unmanaged code (C++). For all the new components we try to create them in C#. We build all projects (both C++ and C# code) into a solution from visual studio .net 2003. In out solution we have a project implementing a pretty complicated math algorithm. This component usally work very well. But in a couple weeks ago, a user found a case that our algorithm did not work correctly. We are trying to debug the problem. The odd thing is: when we run the application from visual studio, it works from both debug and release mode. But if we run it from the executable file directly (double click on the exe file from the output folder), the application stop working for that case. Any idea what caused this problem? How do we debug our code in this case? We have run out of the ideas. Linda Can you define what you mean by "works," "work," and "stop working?" In
other words, what is the expected behavior? What is the behavior when you are debugging? What is the behavior when you are not debugging? Also, is the error occurring in the C# modules or the C++ modules? Meanwhile, just a shot in the dark: See if there are any preprocessor statements that affect the behavior of the app when debugging, as in #if debug -- Show quoteHTH, Kevin Spencer Microsoft MVP Printing Components, Email Components, FTP Client Classes, Enhanced Data Controls, much more. DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net <linda.c***@faa.gov> wrote in message news:1175525528.968175.102460@p15g2000hsd.googlegroups.com... > Greeting. > > We have a 6 year old application, which contains both managed (C#) and > unmanaged code (C++). For all the new components we try to create them > in C#. We build all projects (both C++ and C# code) into a solution > from visual studio .net 2003. > > In out solution we have a project implementing a pretty complicated > math algorithm. This component usally work very well. But in a couple > weeks ago, a user found a case that our algorithm did not work > correctly. > > We are trying to debug the problem. The odd thing is: when we run the > application from visual studio, it works from both debug and release > mode. But if we run it from the executable file directly (double click > on the exe file from the output folder), the application stop working > for that case. > > Any idea what caused this problem? How do we debug our code in this > case? We have run out of the ideas. > > Linda > maths algorithm .... hmmmmmmm
what has changed in couple of weeks ..... hmmmmmmmm is it new law for daylight saving ..... hmmmmmmm <linda.c***@faa.gov> wrote in message Show quote news:1175525528.968175.102460@p15g2000hsd.googlegroups.com... > Greeting. > > We have a 6 year old application, which contains both managed (C#) and > unmanaged code (C++). For all the new components we try to create them > in C#. We build all projects (both C++ and C# code) into a solution > from visual studio .net 2003. > > In out solution we have a project implementing a pretty complicated > math algorithm. This component usally work very well. But in a couple > weeks ago, a user found a case that our algorithm did not work > correctly. > > We are trying to debug the problem. The odd thing is: when we run the > application from visual studio, it works from both debug and release > mode. But if we run it from the executable file directly (double click > on the exe file from the output folder), the application stop working > for that case. > > Any idea what caused this problem? How do we debug our code in this > case? We have run out of the ideas. > > Linda > On Apr 2, 4:52 pm, linda.c***@faa.gov wrote:
Show quote > Greeting. Hello Linda:> > We have a 6 year old application, which contains both managed (C#) and > unmanaged code (C++). For all the new components we try to create them > in C#. We build all projects (both C++ and C# code) into a solution > from visual studio .net 2003. > > In out solution we have a project implementing a pretty complicated > math algorithm. This component usally work very well. But in a couple > weeks ago, a user found a case that our algorithm did not work > correctly. > > We are trying to debug the problem. The odd thing is: when we run the > application from visual studio, it works from both debug and release > mode. But if we run it from the executable file directly (double click > on the exe file from the output folder), the application stop working > for that case. > > Any idea what caused this problem? How do we debug our code in this > case? We have run out of the ideas. > > Linda Have you tryed to do some loggin in your app? Try writing some instrumentation code to a file and see the results after execution. Best regards. Oscar Acosta Linda,
Have you checked to make sure all variables are being properly initialized? Sometimes the development environment will set things to 0 to start with that will be set to a random value outside the environment if not initialized. Ron Allen <linda.c***@faa.gov> wrote in message Show quote news:1175525528.968175.102460@p15g2000hsd.googlegroups.com... > Greeting. > > We have a 6 year old application, which contains both managed (C#) and > unmanaged code (C++). For all the new components we try to create them > in C#. We build all projects (both C++ and C# code) into a solution > from visual studio .net 2003. > > In out solution we have a project implementing a pretty complicated > math algorithm. This component usally work very well. But in a couple > weeks ago, a user found a case that our algorithm did not work > correctly. > > We are trying to debug the problem. The odd thing is: when we run the > application from visual studio, it works from both debug and release > mode. But if we run it from the executable file directly (double click > on the exe file from the output folder), the application stop working > for that case. > > Any idea what caused this problem? How do we debug our code in this > case? We have run out of the ideas. > > Linda > |
|||||||||||||||||||||||