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
#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 ()
—
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.![]()
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.![]()
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.![]()
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.![]()
... 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.![]()
—
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.![]()