From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29175 invoked by alias); 1 Mar 2017 05:56:28 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 29157 invoked by uid 89); 1 Mar 2017 05:56:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=lc, 811, Lc, 1175 X-HELO: mail-ot0-f176.google.com Received: from mail-ot0-f176.google.com (HELO mail-ot0-f176.google.com) (74.125.82.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 01 Mar 2017 05:56:26 +0000 Received: by mail-ot0-f176.google.com with SMTP id k4so23007111otc.0 for ; Tue, 28 Feb 2017 21:56:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=z9dnLiGCMVYX70c1tbxvnIuWcRyAKENOdLwcsusTpQo=; b=RT86b8o/p022ODU5NysaXoHRS4N2n5yMTINEaDXUN0at69R8E1ERWh0Wai+fY5TbhC 5jyrTNvvyL6It6J1W7SJJWGa1BzCuwNaGCUILz7uW3qM6HYBwL1TKOmd6o/hTauageLL aJjWTR4uOaICPyDgbqzevqo6DmUNfQMWEueISH1O/zJGTW/1qooGMTohY2FBlmnzc8PT yUzQPGrBgkPOk8hvBhzJ3UPPfhPVBRMa0XcKvMUNmLDLclIXzqlys6O/tUVwPW5t84GP 80yIZuJLpcj9Uyb7qjyFPk3V4FuxoOMzOrQ2u26gQqX1h+oNftoU0Q5wn/XvRYWjYRXO 8LWg== X-Gm-Message-State: AMke39n40BlwmH93I+ac65Ynbl1gcW7zfrJpzRPlsSktJPHB6MhcoWki7yaei5ywTnqCYcs0EOtXZZZNPVRm2g== X-Received: by 10.157.11.28 with SMTP id a28mr3858101ota.121.1488347784634; Tue, 28 Feb 2017 21:56:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.29.74 with HTTP; Tue, 28 Feb 2017 21:56:24 -0800 (PST) From: Kolya Kosenko Date: Wed, 01 Mar 2017 05:56:00 -0000 Message-ID: Subject: All wx apps crash because of nl_langinfo(CODESET) returns garbage To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00000.txt.bz2 All wxWidgets-based application crash because call nl_langinfo(CODESET) returns sometimes garbage during wxWidgets initialization at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/intl.cpp:811: char *oldLocale = strdup(setlocale(LC_CTYPE, NULL)); setlocale(LC_CTYPE, ""); const char *alang = nl_langinfo(CODESET); setlocale(LC_CTYPE, oldLocale); free(oldLocale); alang variable is not null and garbage here! It causes wxWidgets assertion failure at wxString::FromAscii(). See poedit stack trace #24 #0 0x68022839 in gdk_window_enable_synchronized_configure () from /usr/bin/cyggdk-x11-2.0-0.dll #1 0x6677a5c8 in gtk_window_get_focus_on_map () from /usr/bin/cyggtk-x11-2.0-0.dll #2 0x67645dda in g_closure_invoke () from /usr/bin/cyggobject-2.0-0.dll #3 0x6765f156 in g_signal_emit_valist () from /usr/bin/cyggobject-2.0-0.dll #4 0x6765f6c7 in g_signal_emit () from /usr/bin/cyggobject-2.0-0.dll #5 0x6676d898 in gtk_widget_realize () from /usr/bin/cyggtk-x11-2.0-0.dll #6 0x66778b25 in gtk_window_set_focus () from /usr/bin/cyggtk-x11-2.0-0.dll #7 0x67645dda in g_closure_invoke () from /usr/bin/cyggobject-2.0-0.dll #8 0x6765f156 in g_signal_emit_valist () from /usr/bin/cyggobject-2.0-0.dll #9 0x6765f6c7 in g_signal_emit () from /usr/bin/cyggobject-2.0-0.dll #10 0x6676cffe in gtk_widget_show () from /usr/bin/cyggtk-x11-2.0-0.dll #11 0x67667f1b in g_type_create_instance () from /usr/bin/cyggobject-2.0-0.dll #12 0x6764a69e in g_object_unref () from /usr/bin/cyggobject-2.0-0.dll #13 0x6764bfb0 in g_object_newv () from /usr/bin/cyggobject-2.0-0.dll #14 0x6764c768 in g_object_new () from /usr/bin/cyggobject-2.0-0.dll #15 0x5918ef29 in gtk_assert_dialog_new () at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/gtk/assertdlg_gtk.cpp:498 #16 0x591c62dd in wxGUIAppTraits::ShowAssertDialog (this=0x800828d8, msg=...) at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/gtk/utilsgtk.cpp:299 #17 0x599562fc in ShowAssertDialog (file=..., line=line@entry=1186, func=..., cond=..., msgUser=..., traits=traits@entry=0x800828d8) at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/appbase.cpp:1299 #18 0x59957c00 in wxAppConsoleBase::OnAssertFailure (this=this@entry=0x80082270, file=file@entry=0x800829f4 L"/usr/src/ports/wxWidgets3.0/wxWidgets3.0-3.0.2.0-2.i686/src/wxPython-src-3.0.2.0/src/common/string.cpp", line=line@entry=1186, func=func@entry=0x800828f4 L"FromAscii", cond=cond@entry=0x800828bc L"c < 0x80", msg=msg@entry=0x80082834 L"Non-ASCII value passed to FromAscii().") at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/appbase.cpp:778 #19 0x5918e85f in wxApp::OnAssertFailure (this=0x80082270, file=0x800829f4 L"/usr/src/ports/wxWidgets3.0/wxWidgets3.0-3.0.2.0-2.i686/src/wxPython-src-3.0.2.0/src/common/string.cpp", line=1186, func=0x800828f4 L"FromAscii", cond=0x800828bc L"c < 0x80", msg=0x80082834 L"Non-ASCII value passed to FromAscii().") at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/gtk/app.cpp:507 #20 0x59958131 in wxDefaultAssertHandler (file=..., line=line@entry=1186, func=..., cond=..., msg=...) at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/appbase.cpp:1090 #21 0x599574a5 in wxOnAssert (file=file@entry=0x59aeab64 "/usr/src/ports/wxWidgets3.0/wxWidgets3.0-3.0.2.0-2.i686/src/wxPython-src-3.0.2.0/src/common/string.cpp", line=line@entry=1186, func=func@entry=0x59aeb0cc "FromAscii", cond=cond@entry=0x59aeaca6 "c < 0x80", msg=msg@entry=0x59aeac58 L"Non-ASCII value passed to FromAscii().") at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/appbase.cpp:1175 #22 0x59a0fbbc in wxString::FromAscii (ascii=0x8008281c "\005", ascii@entry=0x80082818 "\b(\b\200\005", len=2) at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/string.cpp:1185 #23 0x59a0fdc9 in wxString::FromAscii (ascii=ascii@entry=0x80082818 "\b(\b\200\005") at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/string.cpp:1197 #24 0x599d93f4 in wxLocale::GetSystemEncodingName () at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/intl.cpp:811 #25 0x5918d802 in wxApp::Initialize (this=0x80082270, argc_=@0x28cc20: 1, argv_=0x80081fb8) at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/gtk/app.cpp:316 #26 0x599d6c55 in wxEntryStart (argc=@0x28cc20: 1, argv=argv@entry=0x80081fb8) at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/init.cpp:322 #27 0x599d7646 in wxInitialize (argc=1, argv=argv@entry=0x80081fb8) at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/init.cpp:531 #28 0x599d769a in wxInitializer::wxInitializer (argv=0x80081fb8, argc=, this=) at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/include/wx/init.h:92 #29 wxEntry (argc=@0x59b47588: 1, argv=0x80081fb8) at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/init.cpp:462 #30 0x599d779b in wxEntry (argc=@0x59b47588: 1, argv=0x80081fb8, argv@entry=0x28cc7c) at /usr/src/debug/wxWidgets3.0-3.0.2.0-2/src/common/init.cpp:507 #31 0x005179e0 in main (argc=1, argv=0x28cc7c) at /usr/src/debug/poedit-1.8.9-1/src/edapp.cpp:254 gcc 5.4.0 wxWidgets 3.0.2.0-2 Windows 7 64-bit CYGWIN_NT-6.1-WOW seven 2.7.0(0.306/5/3) 2017-02-12 13:13 i686 Cygwin -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple