Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we stop using Carp::Always by default in the release version to reduce "noise"? #338

Closed
Photon89 opened this issue May 28, 2021 · 6 comments · Fixed by #709
Closed
Labels
gtk3 regression question Question about installing, configuring or using Shutter

Comments

@Photon89
Copy link
Member

Shutter has a --debug option, maybe we should use Carp::Always only if it is passed to reduce the amount of output during regular usage?

@Photon89 Photon89 added the question Question about installing, configuring or using Shutter label May 28, 2021
@Photon89 Photon89 changed the title Should we stop using Carp::Always by default in the release version to reducte "noise"? Should we stop using Carp::Always by default in the release version to reduce "noise"? May 28, 2021
@Photon89
Copy link
Member Author

log4perl has been proposed in a very old bug report, maybe still worth considering.

@DarthGandalf
Copy link
Member

In normal execution, Carp::Always has no effect. It only adds more details if an exception is being thrown. The main increase of the noise comes from the lines like "Variable "%session_screens" will not stay shared at bin/shutter line 6997.", but those are not exceptions, so are written this way regardless of any Carp::Always.

It does increase the noise in cases like this:

GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib64/perl5/vendor_perl/5.32/x86_64-linux/Glib/Object/Introspection.pm line 110.
 at /usr/lib64/perl5/vendor_perl/5.32/Gtk3.pm line 489.
        Gtk3::import("Gtk3", "-init") called at bin/shutter line 72
        Shutter::App::BEGIN() called at bin/shutter line 72
        eval {...} called at bin/shutter line 72

Here, all lines except for the first one come from Carp::Always.

@Photon89
Copy link
Member Author

Maybe it is possible to activate this additional output only if the --debug switch is used?

@DarthGandalf
Copy link
Member

Options are parsed quite late there, after all the .pm files were evaluated.

@Photon89
Copy link
Member Author

Photon89 commented Mar 2, 2022

The main increase of the noise comes from the lines like "Variable "%session_screens" will not stay shared at bin/shutter line 6997.", but those are not exceptions, so are written this way regardless of any Carp::Always.

I wonder where those warnings came from. As far as I remember they were not there in versions prior to the GTK3 port but I'm pretty sure that the underlying problem was already there, it just became visible now. But how did it happen?

@DarthGandalf
Copy link
Member

I think it comes from the time where I had to switch from Gtk2::Unique to Gtk3::Application which has different API, so I had to move some functions around. Maybe eventually @ruzhnikov finishes his refactoring to classes which should make everything clearer, and not rely anymore on a bunch of variables which are essentially global but not even declared as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gtk3 regression question Question about installing, configuring or using Shutter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants