help-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-cgicc] Debug / Release Problem


From: Joaquín Mª López Muñoz
Subject: Re: [help-cgicc] Debug / Release Problem
Date: Wed, 30 Oct 2002 17:05:07 +0100

As for debugging your CGI as a stand alone app, I use this little trick
for debug builds:

#ifndef NDEBUG
  if(argc>=2){
    string str("QUERY_STRING=");
    str+=argv[1];
    _putenv(str.c_str());
  }
#endif

ans run the app as a console program passing the parms via command line.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

address@hidden ha escrito:

> I am working on a CGI application that takes a few input parameters, does
> some processing and outputs the result as XML stream back to the CGI 
> interface.
> The actual internal workings are more or less irrelevant.
>
> The application works fine in the release version, but in the debug version,
> the result apparently is sent to the CGI interface, but doesn't seem to
> arrive there.
>
> I have managed to track down this issue to a single line of code. When this
> line is active, the debug version doesn't work, when it is commented out, it
> DOES work.
>
> I've got a hard time believing that, but see for yourself:
>
> [snip]
> const_form_iterator itStartCountry = cgi.getElement ("StartCountry");
> if (itStartCountry == (*cgi).end () || itStartCountry->isEmpty ())
> {
>    writer.error2XMLReply ("Parameter 'StartCountry' is missing.");
>    return 0;
> }
> else strStartCountry = **itStartCountry;
> [snip]
>
> (writer.error2XMLReply is just a XML writer that wraps the error message
> into XML...)
>
> The code line in question is the last one ("else strStartCountr ...") I
> don't really think I am doing anything special here, but the error is 
> completely
> reproducible on multiple systems all running W2K / Apache 2.0 / IE6 / cgicc
> 3.2
>
> Just to make that absolutely clear: The application doesn't crash, it
> doesn't throw any exceptions (as far as I can tell...), the Apache error logs 
> don't
> have any entries. The only symptoms in the debug versions are that instead
> of displaying the XML results (like in the release version), the browser keeps
> 'waiting' (displaying the rotating logo) and after some time, times out. The
> CGI application stays in memory as a non-killable process.
>
> I can't get build the cgicc library with logging support enabled, so there
> is no chance on hints from there. I don'T know either how to run a CGI
> application in debug mode (so I can step through it...), but maybe someone 
> has a tip
> concernign that...
>
> Any ideas ?!?
>
> TIA
>
> Steve
>
> --
> +++ GMX - Mail, Messaging & more  http://www.gmx.net +++
> NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
>
> _______________________________________________
> help-cgicc mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-cgicc





reply via email to

[Prev in Thread] Current Thread [Next in Thread]