Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] [platform-dev] Any trick to get rid of the GLib-CRITICAL message?

Well..

From a Gtk point of view, there isn't an option that stops printing warnings:
You can however make gtk terminate if you encounter a warning with "--g-fatal-warnings"  :-)

People like to fallback to gtk2, but that doesn't work on newer Linux distributions (e.g Fedora 27 has no Webkit1).

The *best* solution is to fix SWT such that  gtk doesn't produce such warnings:
491855 – (WarnGlibCritAssert) A lot of glib assertions fail in 4.6M6
https://bugs.eclipse.org/bugs/show_bug.cgi?id=491855

But given it might take a while before we get to the console warnings, (I would not recommend hiding warnings, it's better to fix them)
but if there is an absolute must (e.g client facing app),
then one workaround I can think of is to pipe STDERR into a sub-shell, and in the sub-shell redirect STDERR to STDOUT, and use a negative grep to
remove gtk related warnings:
    ./eclipse 2> >(grep -v -E 'Gtk-CRITICAL|Gdk-WARNING|Gtk-WARNING|GLib-CRITICAL' 1>&2)

That way you get regular stdErr warnings but not gtk warnings.
(You may see an excess of blank lines thou as gtk warnings are 2 liners and the negative grep only removes 1 line).

Please let me know if we can help further.

On Thu, Mar 1, 2018 at 1:18 AM, Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
Thanks Andrey for the information.

Am 28.02.2018 21:00 schrieb "Andrey Loskutov" <loskutov@xxxxxx>:
Get rid of GTK3 and the errirs will disappear :)t
I don't know if there is a solution except fixing GTK3 or porting Eclipse to something less buggy.
GTK3 seem to create more and more errors with every new version. If you do not use the default GTK+ theme, even more. After transition to Eclipse 4 (and so GTK3) in our product we spend right now most of our time in fixing various SWT regressions. For this concrete issue we simply start Eclipse from a shell script which redirects standard error to a file, so that our customers aren't scared by permanent "critical error" or "critical bug" flood. For debugging Eclipse from Eclipse I have no solution except to redirect std.error to a file from your own code inside Eclipse. This will however hide the rest of std.error too :).

Am 28. Februar 2018 20:47:04 MEZ schrieb Lars Vogel <lars.vogel@xxxxxxxxxxx>:
>Friends of SWT,
>
>is anyone aware of a Linux or GTK or SWT trick to remove the annoying
>GLib-CRITICAL messages?
>
>(Eclipse:14679): GLib-CRITICAL **: g_base64_encode_step: assertion 'in
>!= NULL' failed
>
>It makes Console output almost useful, as it is super hard to see if
>(I have to scroll a lot to find the relevant stuff). Screenshot of my
>current user experience attached.
>
>Best regards, Lars

--
Kind regards,
Andrey Loskutov

http://google.com/+AndreyLoskutov

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



--
Leo Ufimtsev, Software Engineer, Red Hat

Back to the top