[Digikam-devel] [Bug 276154] New: jpegutils.cpp contains debug output, but disabled by define

Peter Albrecht px79 at crazymonkeys.de
Mon Jun 20 22:11:31 BST 2011


https://bugs.kde.org/show_bug.cgi?id=276154

           Summary: jpegutils.cpp contains debug output, but disabled by
                    define
           Product: digikam
           Version: 2.0.0
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Camera GUI
        AssignedTo: digikam-devel at kde.org
        ReportedBy: px79 at crazymonkeys.de


Version:           2.0.0 (using Devel) 
OS:                Linux

I have got a problem with jpeg autorotation at import from a camera sd card.
See bug #274947. Autorotate seems to fail, but there is no error message at
STDOUT/STDERR.

Debugging the process lead me to
> /var/tmp/portage/media-gfx/digikam-2.0.0_beta6/work/digikam-2.0.0-beta6/core/libs/jpegutils/jpegutils.cpp, line 94
------------------ 8< ------------------ 
static void jpegutils_jpeg_error_exit(j_common_ptr cinfo)
{
    jpegutils_jpeg_error_mgr* myerr = (jpegutils_jpeg_error_mgr*) cinfo->err;

    char buffer[JMSG_LENGTH_MAX];
    (*cinfo->err->format_message)(cinfo, buffer);

#ifdef ENABLE_DEBUG_MESSAGES
    kDebug() << buffer;
#endif

    longjmp(myerr->setjmp_buffer, 1);
}
------------------ >8 ------------------ 

There I can see "kDebug() << buffer;", which would write the desired error
output. But ENABLE_DEBUG_MESSAGES is not defined. It's commented out in line
83:
> //#define ENABLE_DEBUG_MESSAGES

Why should one not want to see an error message, if an error occured? Seeing an
error message might have helped debugging the problem.

I enabled the gentoo "debug" USE-flag for digikam, hoping that this would
magically define ENABLE_DEBUG_MESSAGES. But that did not happen.

Maybe I just don't understand all KDE-debugging guidelines. 
I'm aware of kdebugdialog and I like the concept very much! :)
But I don't understand the above issue.
Can you bring light to this issue, please? Thx!

Reproducible: Always


Actual Results:  
No error message, although error happened and is detected by the programm.

Expected Results:  
Error message is printed out to STDOUT or STDERR.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list