As usually happens, you write a report, send it, then find something :-)

The offending statement was indeed wrong, the variables weren't ints (as
the %d would expect) but doubles. Changing the format into %f fixes the
crash.

Next question now is why I none of the tools available help me in
detecting the problem. I've tried to reproduce this in a small program,
haven't succeeded yet.

        Danny

On Mon, 2007-04-23 at 20:17 +0200, Danny Backx wrote:
> I'll put this in another thread, apologies if this bothers anyone.
> 
> I explained that my application crashes without error messages under
> certain conditions (when I ask it to provide reports about stock
> evolution over several periods).
> 
> The app source contains logging statements, and I just added some to try
> and figure out where it is crashing.
> 
> The relevant piece of code is in attachment code.c (not inlined in this
> mail because all the lines wrap), the logfile is in log.txt .
> 
> The application is crashing in a line that basically prints log info.
> I've written a couple of lines before it printing out all the info that
> get printed in the offending statement. The separate print statements
> work, the combined one crashes the application.
> 
> This is also what happens under gdb : the application crashes when in
> the line
>       Log(STATUS_LOG, "Value Change %d - %d -> [%s]\r\n",
>               value, prevValue, valval);
> The output of a gdb session is also attached.
> 
> Bright (and other) ideas are most welcome.
> 
>       Danny
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________ Cegcc-devel mailing list 
> Cegcc-devel@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/cegcc-devel
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to