wxGtk 3.3.3 : Crash in wxGetDescFromOSRelease in static build (Issue #27038)

17 views
Skip to first unread message

Christo Joseph

unread,
Sep 20, 2026, 1:10:39 AM (yesterday) Sep 20
to wx-...@googlegroups.com, Subscribed
josephch created an issue (wxWidgets/wxWidgets#27038)

Bug description:

Crash during startup. I compiled code::blocks statically with wxWidgets 3.3.3 Gtk. Configure command used is given below.

../configure \
          --prefix=${WX_PREFIX} \
          --disable-shared \
          --disable-sys-libs \
          --with-gtk=3 \
          --enable-secretstore=no \
          --enable-debug

Stack trace:

#0  0x0000555556777cd4 in wxString::AsChar (this=0x7fffffffcfc0, conv=...) at ../src/common/string.cpp:514
#1  0x0000555556015d36 in wxString::AsCharBuf (this=0x7fffffffcfc0, conv=...) at ../include/wx/string.h:3820
#2  0x0000555556015840 in wxString::mb_str (this=0x7fffffffcfc0, conv=...) at ../include/wx/string.h:1889
#3  0x00005555562817c2 in wxString::fn_str (this=0x7fffffffcfc0) at ../include/wx/string.h:1907
#4  0x00005555567328ce in wxLstat (path=..., buf=0x7fffffffd070) at ../include/wx/filefn.h:377
#5  0x000055555672a010 in (anonymous namespace)::DoStatAny (st=..., path=..., dereference=false) at ../src/common/filename.cpp:341
#6  0x000055555672a077 in (anonymous namespace)::StatAny (st=..., path=..., flags=8191) at ../src/common/filename.cpp:350
#7  0x000055555672b156 in (anonymous namespace)::wxFileSystemObjectExists (path=..., flags=8191) at ../src/common/filename.cpp:692
#8  0x000055555672b530 in wxFileName::Exists (path=..., flags=8191) at ../src/common/filename.cpp:764
#9  0x00005555567fbb95 in wxGetDescFromOSRelease
    (distName=0x7fffffffd520, version=0x7fffffffd550, parentName=0x7fffffffd580, parentCodeName=0x7fffffffd5b0) at ../src/unix/utilsunx.cpp:1273
#10 0x00005555567fc1e3 in wxGetOsDescription () at ../src/unix/utilsunx.cpp:1301
#11 0x0000555555ecfcf1 in __static_initialization_and_destruction_0(int, int) [clone .constprop.0] ()
#12 0x00007ffff5e2a304 in call_init (env=<optimized out>, argv=0x7fffffffdc78, argc=1) at ../csu/libc-start.c:145
#13 __libc_start_main_impl
    (main=0x555555ecf160 <main>, argc=1, argv=0x7fffffffdc78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdc68) at ../csu/libc-start.c:347
#14 0x0000555555eeb715 in _start ()

Platform and version information

  • wxWidgets version you use: 3.3.3
  • wxWidgets port you use: wxGTK
  • OS and its version: Ubuntu 22.04


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27038@github.com>

Christo Joseph

unread,
Sep 20, 2026, 2:41:34 AM (yesterday) Sep 20
to wx-...@googlegroups.com, Subscribed
josephch left a comment (wxWidgets/wxWidgets#27038)

Issue is not seen when #9956c25c07f67bf392db653868f1ae39b71da667 and #7c3e00ccbd7bd1d24adbc6717902ad8819c85b79 are reverted


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27038/5748185385@github.com>

VZ

unread,
Sep 20, 2026, 12:49:00 PM (yesterday) Sep 20
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#27038)

Thanks, I can reproduce this with

#include <wx/init.h>
#include <wx/crt.h>
#include <wx/utils.h>

static wxString desc = wxGetOsDescription();

int main(int argc, char **argv)
{
    wxInitializer init(argc, argv);
    if ( !init.IsOk() ) {
        fprintf(stderr, "Failed to initialize wxWidgets.\n");
        return 1;
    }

    wxPrintf("OS description: %s\n", desc);
    return 0;
}

Will take a look.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27038/5751195761@github.com>

VZ

unread,
Sep 20, 2026, 12:51:55 PM (yesterday) Sep 20
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#27038)

OK, this is because we use wxConvFileName directly instead of using an accessor and it's not initialized yet at static initialization time. This needs to be fixed...


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27038/5751211981@github.com>

VZ

unread,
Sep 20, 2026, 1:04:37 PM (yesterday) Sep 20
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#27038)

... but after fixing this, it still crashes because wxStandardPaths::Get() doesn't work at this stage either yet.

It would be really better to avoid doing anything file-related during static initialization, of course...


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27038/5751283602@github.com>

VZ

unread,
Sep 20, 2026, 4:59:09 PM (yesterday) Sep 20
to wx-...@googlegroups.com, Subscribed

Closed #27038 as completed via 535a7bb.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/27038/issue_event/31492705560@github.com>

Reply all
Reply to author
Forward
0 new messages