RE: Error in Release Mode

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The text logging was a good idea. I found that some #if debug statements and
some initializations were causing the problems...
Regards,
G

"gilgamesh" wrote:

> Thanks steve for the inputs... I will check my code again. Seems to me I
> might be having initialization problems. Plus I am just moving from good old
> C++ to C# and using some COM Interop... (My C++ code is fine Just C# that
> crashes in the release version). Thanks again. Will let u know if I find
> anything interesting
> G
>
> "diehardii" wrote:
>
> > Hi G,
> >
> > Be sure that you have initialized all of your variables in the constructor.
> > It sounds like you are crashing in a constructor or shortly afterwards. For
> > instance, if you have
> >
> > bool m_btestcase
> >
> > //
> > // later
> > //
> >
> > if(!m_btestcase)
> > {
> > instantiate something
> > }
> >
> >
> > reference something
> >
> >
> > In the debug case, m_btestcase may always be false in which case your code
> > would be executed. However, in the release version, the variable may always
> > be true which would lead to major issues. This is one of the main reasons
> > release versions do not work and debug versions do. In addition, I've found
> > it very useful to create a logging class that writes a textfile. This way you
> > can locate the problem step in your program even if you are not debugging. In
> > fact, with directshow I've found it easier to use my logging class instead of
> > the debugger. If you would like my class, I can send it to you. Good luck.
> >
> > ~Steve
> >
> >
> >
> > "gilgamesh" wrote:
> >
> > > Hi All,
> > > Thanks for your time. I can build my video capture app and run in debug
> > > mode. When I try to run it in the release mode it fails with a
> > > NullReferenceException. It doesnt even get into the app.
> > > I even tried setting optimize code to false. No avail. It crashes even
> > > before it can enter the code giving NullReferenceException. Any suggestions.
> > > Thanks a lot.
> > > G
.



Relevant Pages

  • Re: permissions on /etc/namedb
    ... after initially resisting the idea of using rndc trace being 'advanced'. ... Query logging has its own log category, so you would do something like ... Same with debug logging; I'm ... The problem is that the default_debug channel has a special ...
    (freebsd-net)
  • Re: lew? 2 qq
    ... Everyone writes to the same channel, and the logging overhead to stderr is incurred with every call; that can have an adverse impact on performance. ... you have to invent your own formats, disentangle all the output from multiple sources, disentangle important output from less so, and you can't selectively suppress some log output and not other. ... All less critical messages ("WARNING", "DEBUG", etc.) not only are not emitted, they have negligible impact on production performance. ... Logging is configurable at deployment time via an external resource file, so you don't even have to hard-code all that control. ...
    (comp.lang.java.help)
  • [PATCH] firedtv: reinstate debug logging option
    ... Henrik Kurelid tells me that FCP debug logging (which I removed during ... instead of -1 enables only hexdumps of the entire FCP frames. ...
    (Linux-Kernel)
  • Re: C# exe calling an exe (process.start) - not working on one ser
    ... Check the exit code from the process (if you set exit codes in ... The problem what Std out redirection related. ... > logging... ... >>> Since it is a production server, I cannot debug the code there and I ...
    (microsoft.public.dotnet.general)