Warning message about unsafe calls to setenv/unsetenv
With the most recent versions of Glib/Gtk3 (code below tested on Ubuntu Focal / Gtk 3.24.17), we see many messages like these:
GLib-LOG **: unsetenv() is not thread-safe and should not be used after threads are created at /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 67.
GLib-LOG **: setenv()/putenv() are not thread-safe and should not be used after threads are created at /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 67.
GLib-LOG **: unsetenv() is not thread-safe and should not be used after threads are created at /usr/share/perl5/Gtk3.pm line 555.
(See also https://github.com/asbru-cm/asbru-cm/issues/432)
A very minimal application code to demonstrate this would be:
use Glib::Object::Introspection;
use Gtk3 -init;
Glib::Object::Introspection->setup(basename => 'Gio',
version => '2.0',
package => 'Glib::IO');
my $app = Gtk3::Application->new('test.test', []);
$app->register();
That would generate the message below when calling register
:
GLib-LOG **: unsetenv() is not thread-safe and should not be used after threads are created at /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 67.
I looked at the mentioned line but could not identify the root issue.
Can you give any help or hint to troubleshoot (or even fix ;p) this further ?
Thanks for your help.