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

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Peter Albrecht-2
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: [hidden email]
        ReportedBy: [hidden email]


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.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 276154] jpegutils.cpp contains debug output, but disabled by define

Peter Albrecht-2
https://bugs.kde.org/show_bug.cgi?id=276154





--- Comment #1 from Peter Albrecht <px79 crazymonkeys de>  2011-06-20 23:16:21 ---
I forgot to mention Bug #139197, where you can find related info in comments 7
and 10.

Please don't misunderstand me. I don't want to be a smart ass. I admire you
guys, putting all this stuff together, creating almost wonders!

I just want to understand how things work.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 276154] jpegutils.cpp contains debug output, but disabled by define

Gilles Caulier-4
In reply to this post by Peter Albrecht-2
https://bugs.kde.org/show_bug.cgi?id=276154


Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]




--- Comment #2 from Gilles Caulier <caulier gilles gmail com>  2011-06-21 09:00:22 ---
It's simple. Just use this option to pass on cmake script when you configure :
"-DENABLE_DEBUG_MESSAGES"

Gilles Caulier

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 276154] jpegutils.cpp contains debug output, but disabled by define

Peter Albrecht-2
In reply to this post by Peter Albrecht-2
https://bugs.kde.org/show_bug.cgi?id=276154





--- Comment #3 from Peter Albrecht <px79 crazymonkeys de>  2011-06-21 20:14:34 ---
(In reply to comment #2)
> It's simple. Just use this option to pass on cmake script when you configure :
> "-DENABLE_DEBUG_MESSAGES"

Thanks for the info.

@Gentoo:
So I would say, this flag should be enabled, if the gentoo USE flag "debug" is
enabled. Which is not the case for media-gfx/digikam-2.0.0_beta6.
Any gentoo maintainer for media-gfx/digikam-2.0.0_beta6 ebuild listening? Or do
I have to file a separate gentoo bug?

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 276154] jpegutils.cpp contains debug output, but disabled by define

Andreas K. Huettel
In reply to this post by Peter Albrecht-2
https://bugs.kde.org/show_bug.cgi?id=276154





--- Comment #4 from Andreas K. Huettel <dilfridge gentoo org>  2011-06-21 21:43:46 ---
(In reply to comment #3)
> (In reply to comment #2)
> > It's simple. Just use this option to pass on cmake script when you configure :
> > "-DENABLE_DEBUG_MESSAGES"
>
> Thanks for the info.
>
> @Gentoo:
> So I would say, this flag should be enabled, if the gentoo USE flag "debug" is
> enabled. Which is not the case for media-gfx/digikam-2.0.0_beta6.

That was a one-liner. Re-sync your overlay and it should work (with USE=debug).

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 276154] jpegutils.cpp contains debug output, but disabled by define

Peter Albrecht-2
In reply to this post by Peter Albrecht-2
https://bugs.kde.org/show_bug.cgi?id=276154





--- Comment #5 from Peter Albrecht <px79 crazymonkeys de>  2011-06-23 20:53:48 ---
Synchronized overlay and rebuild digikam with USE=debug.

build.log says "-DENABLE_DEBUG_MESSAGES=ON":
--------------------- 8< ---------------------
> ...
> cmake --no-warn-unused-cli -C /var/tmp/portage/media-gfx/digikam-2.0.0_beta6/temp/gentoo_common_config.cmake -DCMAKE_INSTALL_PREFIX=/usr -DKDE4_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc -DFORCED_UNBUNDLE=ON -DWITH_LQR=ON -DWITH_LENSFUN=ON -DGWENVIEW_SEMANTICINFO_BACKEND=Nepomuk -DWITH_KdepimLibs=OFF -DWITH_MarbleWidget=ON -DENABLE_GPHOTO2=ON -DWITH_gphoto2=ON -DWITH_GPHOTO2=ON -DWITH_Gphoto2=ON -DWITH_Soprano=ON -DENABLE_themedesigner=OFF -DENABLE_THEMEDESIGNER=OFF -DENABLE_Themedesigner=OFF -DENABLE_THUMBS_DB=ON -DENABLE_DEBUG_MESSAGES=ON -DCMAKE_BUILD_TYPE=Debugfull -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/media-gfx/digikam-2.0.0_beta6/temp/gentoo_rules.cmake  /var/tmp/portage/media-gfx/digikam-2.0.0_beta6/work/digikam-2.0.0-beta6/core
> ...
--------------------- >8 ---------------------

But error message is still not printed. :(
Using gdb to step through execution does not reach line
> kDebug() << buffer;
So I guess ENABLE_DEBUG_MESSAGES is not defined, when compiling
> /var/tmp/portage/media-gfx/digikam-2.0.0_beta6/work/digikam-2.0.0-beta6/core/libs/jpegutils/jpegutils.cpp

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 276154] jpegutils.cpp contains debug output, but disabled by define

Gilles Caulier-4
In reply to this post by Peter Albrecht-2
https://bugs.kde.org/show_bug.cgi?id=276154


Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED




--- Comment #6 from Gilles Caulier <caulier gilles gmail com>  2011-07-01 15:34:11 ---
Git commit 7d195f5096981cd8e32627e1de8d6710b2b5db88 by Gilles Caulier.
Committed on 01/07/2011 at 17:32.
Pushed by cgilles into branch 'master'.

add a new cmake option to enable advanced debug statements for all image
loaders at compilation time.
Use -DENABLE_ADVANCEDDEBUGMSG=yes with cmake.
BUGS: 276154

M  +5    -3    CMakeLists.txt    
M  +5    -3    README    
M  +3    -0    digikam/utils/config-digikam.h.cmake    
M  +2    -6    libs/dimg/loaders/jp2kloader.cpp    
M  +6    -10   libs/dimg/loaders/jpegloader.cpp    
M  +3    -8    libs/dimg/loaders/pgfloader.cpp    
M  +20   -24   libs/dimg/loaders/pngloader.cpp    
M  +3    -8    libs/dimg/loaders/ppmloader.cpp    
M  +5    -9    libs/dimg/loaders/tiffloader.cpp    
M  +3    -5    libs/jpegutils/jpegutils.cpp    

http://commits.kde.org/digikam/7d195f5096981cd8e32627e1de8d6710b2b5db88

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 276154] jpegutils.cpp contains debug output, but disabled by define

Marcel Wiesweg
In reply to this post by Peter Albrecht-2
https://bugs.kde.org/show_bug.cgi?id=276154





--- Comment #7 from Marcel Wiesweg <marcel wiesweg gmx de>  2011-07-11 17:03:05 ---
Git commit ff2903be03be371a2d3eff365a9c197b44f836c7 by Marcel Wiesweg.
Committed on 01/07/2011 at 14:16.
Pushed by mwiesweg into branch 'master'.

It makes sense to display the message on the console when an error occurs
and the operation is aborted by longjmp.

BUG: 276154

M  +1    -3    libs/jpegutils/jpegutils.cpp    

http://commits.kde.org/digikam/ff2903be03be371a2d3eff365a9c197b44f836c7

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 276154] jpegutils.cpp contains debug output, but disabled by define

Gilles Caulier-4
In reply to this post by Peter Albrecht-2
https://bugs.kde.org/show_bug.cgi?id=276154


Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Camera GUI                  |Import




--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 276154] jpegutils.cpp contains debug output, but disabled by define

Gilles Caulier-4
In reply to this post by Peter Albrecht-2
https://bugs.kde.org/show_bug.cgi?id=276154

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |2.0.0

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel