Abnormal program exit

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
vanarieleyen
Knows some wx things
Knows some wx things
Posts: 47
Joined: Thu Aug 29, 2019 3:55 am
Location: China, Shenzhen

Abnormal program exit

Post by vanarieleyen »

I am using nuwen's MingW and have recently updated the toolchain from 16.1 to 17.1. This changed the gcc compiler from 8.2 to 9.2

I compiled wxWidgets-3.1.2 again and re-compiled my current project - everything without problems.

The program that I am developing runs smoothly. The only problem that I am now facing is an abnormal program exit.

I digged a bit deeper into my program and commented out several parts to see when this problem starts to occur.

Below is the basic version that generates the abnormal exit:

Code: Select all

previewFrame::previewFrame(wxWindow* parent,wxWindowID id) {
	//(*Initialize(previewFrame)
	wxMenu* Menu1;
	wxMenu* Menu2;
	wxMenuBar* MenuBar1;
	wxMenuItem* MenuItem1;
	wxMenuItem* MenuItem2;

	Create(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("wxID_ANY"));
	SetClientSize(wxSize(329,335));
	MenuBar1 = new wxMenuBar();
	Menu1 = new wxMenu();
	MenuItem3 = new wxMenuItem(Menu1, ID_MENUITEM1, _("Load"), wxEmptyString, wxITEM_NORMAL);
	Menu1->Append(MenuItem3);
	MenuItem4 = new wxMenuItem(Menu1, ID_MENUITEM2, _("Settings"), wxEmptyString, wxITEM_NORMAL);
	Menu1->Append(MenuItem4);
	MenuItem1 = new wxMenuItem(Menu1, idMenuQuit, _("Quit\tAlt-F4"), _("Quit the application"), wxITEM_NORMAL);
	Menu1->Append(MenuItem1);
	MenuBar1->Append(Menu1, _("&File"));
	Menu2 = new wxMenu();
	MenuItem2 = new wxMenuItem(Menu2, idMenuAbout, _("About\tF1"), _("Show info about this application"), wxITEM_NORMAL);
	Menu2->Append(MenuItem2);
	MenuBar1->Append(Menu2, _("Help"));
	SetMenuBar(MenuBar1);
	Connect(ID_MENUITEM2,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&previewFrame::OnSettings);
	//*)

	// prepare the settings dialog
	settings = new SettingsDlg(this, wxID_ANY, _("Settings"), wxDefaultPosition, wxSize(600, 400));
}
	
class SettingsDlg : public wxDialog {
public:
    SettingsDlg( wxWindow * parent, wxWindowID id, const wxString & title,
                 const wxPoint & pos = wxDefaultPosition,
                 const wxSize & size = wxDefaultSize,
                 long style = wxDEFAULT_DIALOG_STYLE ):
        wxDialog(parent, id, title, pos, size, style) {
        panel = new wxPanel(this, wxID_ANY,
                            wxDefaultPosition,
                            wxSize(300, 300));

	t1 = new wxStaticText(panel, wxID_ANY, _("Background image"), wxPoint(32,32));
	t2 = new wxStaticText(panel, wxID_ANY, _("Preview size"), wxPoint(32,64));
	t3 = new wxStaticText(panel, wxID_ANY, _("Horizontal angles"), wxPoint(32,96));
	t4 = new wxStaticText(panel, wxID_ANY, _("Vertical angles"), wxPoint(32,128));
	t5 = new wxStaticText(panel, wxID_ANY, _("Ambient image"), wxPoint(32,160));
	t6 = new wxStaticText(panel, wxID_ANY, _("Ambient blur"), wxPoint(32,192));
	t7 = new wxStaticText(panel, wxID_ANY, _("Glass plate"), wxPoint(32,224));

        valRange.SetRange(1, 500);
        TextCtrl1 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(136,64), wxSize(56,21), 0, valRange);
        valRange.SetRange(-45, 45);
        TextCtrl2 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(136,96), wxSize(40,21), 0, valRange);
        TextCtrl3 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(208,96), wxSize(40,21), 0, valRange);
        TextCtrl4 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(136,128), wxSize(40,21), 0, valRange);
        TextCtrl5 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(208,128), wxSize(40,21), 0, valRange);
        valRange.SetRange(1, 15);
        TextCtrl6 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(136,192), wxSize(40,21), 0, valRange);

        CheckBox1 = new wxCheckBox(panel, wxID_ANY, wxEmptyString, wxPoint(136,224));

        FilePickerCtrl1 = new wxFilePickerCtrl(panel, wxID_ANY, wxEmptyString, wxEmptyString, wxEmptyString, wxPoint(136,32), wxSize(368,20), wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_USE_TEXTCTRL, wxDefaultValidator);
        FilePickerCtrl2 = new wxFilePickerCtrl(panel, wxID_ANY, wxEmptyString, wxEmptyString, wxEmptyString, wxPoint(136,160), wxSize(368,20), wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_USE_TEXTCTRL, wxDefaultValidator);
        Button = new wxButton(panel, 12345, _("Save"), wxPoint(32,272), wxDefaultSize, 0, wxDefaultValidator);
        Connect(12345,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&OnSaveClick);
    }

    wxIntegerValidator<int> valRange;
    wxCheckBox* CheckBox1;
    wxTextCtrl* TextCtrl1;
    wxTextCtrl* TextCtrl2;
    wxTextCtrl* TextCtrl3;
    wxTextCtrl* TextCtrl4;
    wxTextCtrl* TextCtrl5;
    wxTextCtrl* TextCtrl6;
    wxFilePickerCtrl* FilePickerCtrl1;
    wxFilePickerCtrl* FilePickerCtrl2;

private:
    wxPanel* panel;
    wxStaticText *t1, *t2, *t3, *t4, *t5, *t6, *t7;
    wxButton* Button;
    wxFileConfig *ConfigINI;

    void OnSaveClick(wxCommandEvent& event);		// save the settings
};
When I comment out

Code: Select all

settings = new SettingsDlg(this, wxID_ANY, _("Settings"), wxDefaultPosition, wxSize(600, 400));
the program exits ok.

So I started to comment out parts within the constructor of SettingsDlg.
It appears that the 6 wxTextCtrl's are to blame, when I remove these the program exits without an abnormal program termination message.

Is my SettingsDlg class properly constructed? Or is this a known issue with gcc 9.2.0.

I searched the Internet but couldn't find any mentioning of problems with gcc 9.2

The message that I receive is:
Problem signature:
Problem Event Name: APPCRASH
Application Name: preview.exe
Application Version: 0.0.0.0
Application Timestamp: 5dfd8ff1
Fault Module Name: StackHash_ebd5
Fault Module Version: 6.3.9600.17415
Fault Module Timestamp: 5450559e
Exception Code: c0000374
Exception Offset: PCH_55_FROM_ntdll+0x00000000000911FA
OS Version: 6.3.9600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: ebd5
Additional Information 2: ebd5c0edf1f4c2907c369823ee6d631c
Additional Information 3: ace6
Additional Information 4: ace62d7582b2ce32e568489cbb5a8ad6
I looked up the exception code and found out that is a heap corruption, so there must be something that is not properly deallocated but I can't find what...
vanarieleyen
Knows some wx things
Knows some wx things
Posts: 47
Joined: Thu Aug 29, 2019 3:55 am
Location: China, Shenzhen

Re: Abnormal program exit

Post by vanarieleyen »

I have made the most simple program that also shows the error.

In Code::Blocks I started a new project and placed the block with the textctrl's from my original program in the constructor:

The resulting program is as follows:

Code: Select all

/***************************************************************
 * Name:      testMain.cpp
 * Purpose:   Code for Application Frame
 * Author:    Arie van Leyen ()
 * Created:   2019-12-21
 * Copyright: Arie van Leyen ()
 * License:
 **************************************************************/

#include "testMain.h"
#include <wx/msgdlg.h>

#include <wx/valnum.h>
#include <wx/textctrl.h>

//(*InternalHeaders(testFrame)
#include <wx/intl.h>
#include <wx/string.h>
//*)

//helper functions
enum wxbuildinfoformat {
	short_f, long_f
};

wxString wxbuildinfo(wxbuildinfoformat format) {
	wxString wxbuild(wxVERSION_STRING);

	if (format == long_f ) {
#if defined(__WXMSW__)
		wxbuild << _T("-Windows");
#elif defined(__UNIX__)
		wxbuild << _T("-Linux");
#endif

#if wxUSE_UNICODE
		wxbuild << _T("-Unicode build");
#else
		wxbuild << _T("-ANSI build");
#endif // wxUSE_UNICODE
	}

	return wxbuild;
}

//(*IdInit(testFrame)
const long testFrame::idMenuQuit = wxNewId();
const long testFrame::idMenuAbout = wxNewId();
const long testFrame::ID_STATUSBAR1 = wxNewId();
//*)

BEGIN_EVENT_TABLE(testFrame,wxFrame)
	//(*EventTable(testFrame)
	//*)
END_EVENT_TABLE()

testFrame::testFrame(wxWindow* parent,wxWindowID id) {
	//(*Initialize(testFrame)
	wxMenu* Menu1;
	wxMenu* Menu2;
	wxMenuBar* MenuBar1;
	wxMenuItem* MenuItem1;
	wxMenuItem* MenuItem2;

	Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
	MenuBar1 = new wxMenuBar();
	Menu1 = new wxMenu();
	MenuItem1 = new wxMenuItem(Menu1, idMenuQuit, _("Quit\tAlt-F4"), _("Quit the application"), wxITEM_NORMAL);
	Menu1->Append(MenuItem1);
	MenuBar1->Append(Menu1, _("&File"));
	Menu2 = new wxMenu();
	MenuItem2 = new wxMenuItem(Menu2, idMenuAbout, _("About\tF1"), _("Show info about this application"), wxITEM_NORMAL);
	Menu2->Append(MenuItem2);
	MenuBar1->Append(Menu2, _("Help"));
	SetMenuBar(MenuBar1);
	StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
	int __wxStatusBarWidths_1[1] = { -1 };
	int __wxStatusBarStyles_1[1] = { wxSB_NORMAL };
	StatusBar1->SetFieldsCount(1,__wxStatusBarWidths_1);
	StatusBar1->SetStatusStyles(1,__wxStatusBarStyles_1);
	SetStatusBar(StatusBar1);

	Connect(idMenuQuit,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&testFrame::OnQuit);
	Connect(idMenuAbout,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&testFrame::OnAbout);
	//*)

	wxPanel *panel = new wxPanel(this, wxID_ANY,
	                             wxDefaultPosition,
	                             wxSize(300, 300));
	wxIntegerValidator<int> valRange;

	wxTextCtrl* TextCtrl1;
	wxTextCtrl* TextCtrl2;
	wxTextCtrl* TextCtrl3;
	wxTextCtrl* TextCtrl4;
	wxTextCtrl* TextCtrl5;
	wxTextCtrl* TextCtrl6;

	valRange.SetRange(1, 500);
	TextCtrl1 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(136,64), wxSize(56,21), 0, valRange);
	valRange.SetRange(-45, 45);
	TextCtrl2 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(136,96), wxSize(40,21), 0, valRange);
	TextCtrl3 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(208,96), wxSize(40,21), 0, valRange);
	TextCtrl4 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(136,128), wxSize(40,21), 0, valRange);
	TextCtrl5 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(208,128), wxSize(40,21), 0, valRange);
	valRange.SetRange(1, 15);
	TextCtrl6 = new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxPoint(136,192), wxSize(40,21), 0, valRange);
}

testFrame::~testFrame() {
	//(*Destroy(testFrame)
	//*)
}

void testFrame::OnQuit(wxCommandEvent& event) {
	Close();
}

void testFrame::OnAbout(wxCommandEvent& event) {
	wxString msg = wxbuildinfo(long_f);
	wxMessageBox(msg, _("Welcome to..."));
}
When I compile and run this it has no problems.

When I close the program I get the following message:
Problem signature:
Problem Event Name: APPCRASH
Application Name: test.exe
Application Version: 0.0.0.0
Application Timestamp: 5dfdac17
Fault Module Name: StackHash_21c8
Fault Module Version: 6.3.9600.17415
Fault Module Timestamp: 5450559e
Exception Code: c0000374
Exception Offset: PCH_55_FROM_ntdll+0x00000000000911FA
OS Version: 6.3.9600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: 21c8
Additional Information 2: 21c8e2d2d46a23504b52407d03d48343
Additional Information 3: 810a
Additional Information 4: 810a0d19da18b5d2edbba80aaa69ab8f
I now start to suspect the build of wxWidgets.
I have done the following to build wxWidgets (3.1.2):
  • first go to: c:\wxWidgets.3.2.1\build\msw
  • clean the sources: make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release clean
  • build a release: make -f makefile.gcc SHARED=1 MONOLITHIC=1 UNICODE=1 BUILD=release
I use MinGW from the nuwen distribution version 17.1: https://nuwen.net/mingw.html
This distribution includes GCC 9.2.0

When I use the old verion of MinGW (nuwen 16.1) the compiler version is 8.2.0 - this version has no problems.

During the build of wxWidgets I saw a lot of warnings. I checked on the internet and it seems that GCC 9.2.0 does more checks and as a result gives more warnings.

Can it be that I need to change the way I am building wxWidgets with gcc 9.2.0?

I have attached the most simple project that gives this error.
Attachments
test.zip
(430.38 KiB) Downloaded 73 times
alys666
Super wx Problem Solver
Super wx Problem Solver
Posts: 329
Joined: Tue Oct 18, 2016 2:31 pm

Re: Abnormal program exit

Post by alys666 »

run your code under debugger. and do not experiment with compilers and build versions.
problem is somewhere in your code, not in compiler :)
if program crashes on exit - it cannot finalize your objects. so it's somehow connected with destructors and finalization order.
if you use codeblocks - set debug mode and debug. debugger must show you at least stack state of a crash point.
it's what you need.
ubuntu 20.04, wxWidgets 3.2.1
vanarieleyen
Knows some wx things
Knows some wx things
Posts: 47
Joined: Thu Aug 29, 2019 3:55 am
Location: China, Shenzhen

Re: Abnormal program exit

Post by vanarieleyen »

Yes, I know it is better to stick with my old tool chain.

However, you say that it must be in my code. But then how can you explain the problems that I face in the test project that I have attached?

To generate this project I have chosen 'new project' in code::blocks and only placed 2 wxTextControls on a wxPanel - nothing more.

After compiling it works, but I get the message after closing the program.

I have also build it in de debugger mode and run it in the gdb using the following commands:
gdb test.exe
(gdb) run
(now close the window)
(gdb) warning: critical error detected c0000374
(gdb) Program received signal SIGTRAP, Trace/breakpoint trap.
(gdb) 0x........ in ?? <>

The error seems to be a heap corruption, but how is that possible when I have only placed those two textcontrols and not a single line of extra code?
alys666
Super wx Problem Solver
Super wx Problem Solver
Posts: 329
Joined: Tue Oct 18, 2016 2:31 pm

Re: Abnormal program exit

Post by alys666 »

for start.
1.you must use some coding conventions in your code.
names of formal parameters, local variables, global variables are in mess, and this is not readable.
for example i use such a conventions:
_name - object field
fname - "formal name" - formal function parameter-> func(type fs)
lname - local function variable
Name - global variable.
2. do not use <Connect> to bind handlers, use Bind.
3. do not use old style type conversions (type)... because it's risky.
4. do not write headers, if you do not plan to use declared objects in different source files.
ubuntu 20.04, wxWidgets 3.2.1
alys666
Super wx Problem Solver
Super wx Problem Solver
Posts: 329
Joined: Tue Oct 18, 2016 2:31 pm

Re: Abnormal program exit

Post by alys666 »

if it was a heap corruption... then it could be an object disposed twice(may added twice to different parents?), or memory block was corrupted due writing out of bound index of array or wrong pointer, or something kinda this.
ubuntu 20.04, wxWidgets 3.2.1
vanarieleyen
Knows some wx things
Knows some wx things
Posts: 47
Joined: Thu Aug 29, 2019 3:55 am
Location: China, Shenzhen

Re: Abnormal program exit

Post by vanarieleyen »

As I told you, I didn't write any line of code.

I let Code::Blocks generate a wxWidgets skeleton for me and I place a panel and 2 textcontrolls on it.

If I understand it well, you are suggesting that Code::Blocks doesn't generate very nice code. I agree, but I don't think in this case it is the problem.
Kvaz1r
Super wx Problem Solver
Super wx Problem Solver
Posts: 357
Joined: Tue Jun 07, 2016 1:07 pm

Re: Abnormal program exit

Post by Kvaz1r »

Your code runs without crash for me (I use VS), but you can reduce code even more. What if your frame won't contains any control? What if you remove only status bar?
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Abnormal program exit

Post by doublemax »

The problem is not in the code, it's a build issue. As you're linking dynamically, are you sure the exe is loading the correct DLL and not an old one?

Can you switch to static linking for a test?
Use the source, Luke!
SiZiOUS
Earned a small fee
Earned a small fee
Posts: 16
Joined: Wed Dec 09, 2020 8:41 pm

Re: Abnormal program exit

Post by SiZiOUS »

Hello,

FIrst of all, I'm really sorry to revive this old thread but I'm facing exactly the same issue as the original poster.

I'm trying to build a custom version of the well-known Code::Blocks 20.03 IDE which you may know as it uses the wxWidgets library for itself.
Indeed, when I build a side project included in C::B, for example Addr2LineUIApp, the abnormal program termination exception occurs.

To give more details:
  • I'm using wx 3.1.3, compiled in both release and debug modes and in x86 and x64 flavours (so I have 4 differents variants of the wx library on my computer).
  • When I try to build the projects, I tried using the MinGW-w64 and TDM-GCC-64 toolchains. The issue happens with both toolchains.
  • I tried to build the project with static flag, no luck.
  • I'm using Windows 7 x64.
  • The issue is here with the Addr2LineUIApp project, and I've tested the test project available here.
So I've installed Dr. MinGW to have some additional debug information. I'm not capable to find the issue as I'm not really comfortable with wxWidgets. I've attached these logs here, plus the Addr2LineUIApp project (ripped from C::B), as well of the test project that I've downloaded from there.

May you please help me to understand what's going on?

Thank you very much!

BR,
Mike
Attachments
Addr2LineUIApp-Dr_MinGW-logs.zip
Dr. MinGW log files
(5.92 KiB) Downloaded 45 times
test.zip
Test project (downloaded from there)
(9.7 KiB) Downloaded 45 times
Addr2LineUI.zip
Addr2LineUI (ripped from Code::Blocks 20.03)
(40.24 KiB) Downloaded 41 times
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Abnormal program exit

Post by PB »

I think it is a known problem with 64-bit TDM GCC 9.2 and wxTextCtrl, see
https://groups.google.com/g/wx-users/c/ ... IlTA5XAAAJ

There is no solution, the problem is probably with that GCC distribution.
SiZiOUS
Earned a small fee
Earned a small fee
Posts: 16
Joined: Wed Dec 09, 2020 8:41 pm

Re: Abnormal program exit

Post by SiZiOUS »

Hello,

Thank you very much. I'm not really surprised, as in the log files I provided, there is some references to that wxTextCtrl class.

I've just tested with TDM-GCC-64 in 32-bit mode (i.e. basically with the "-m32" switch) and I can confirm that there is NO issue when the programs are built on 32-bit mode. It only happens in 64-bit mode! :shock:

I've tested to build the programs with the regular MinGW-w64 toolchain (using GCC 10) and the issue is still there. But I remember that I built the wx libraries with TDM-GCC-64 so I'm currently building them with the regular MinGW-w64 toolchain, in order to remove the TDM-GCC-64 toolchain from the equation.

Again, thank you very much for your message! You confirmed that there is something strange about that wxTextCtrl class!

I'll post the results here, because I was investigating on this issue since some weeks so I think it would interest some wx enthusiats!
SiZiOUS
Earned a small fee
Earned a small fee
Posts: 16
Joined: Wed Dec 09, 2020 8:41 pm

Re: Abnormal program exit

Post by SiZiOUS »

Hey there,

OK so I successfully built the wx library with MinGW-w64 (GCC 10) and the same issue occurs...

Finally I don't know if it's really related to TDM-GCC as the regular MinGW-w64, same issue occurs.
So I guess I will need to downgrade to GCC 8. :?

I'll try this later.
Attachments
mingw-w64-gcc-10.txt
(9.75 KiB) Downloaded 45 times
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Abnormal program exit

Post by ONEEYEMAN »

Hi,
Do you have all those toolchains installed on the same machine at the same time?

Please don't do that it may lead to all sorts of weird behavior...

Thank you.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Abnormal program exit

Post by PB »

SiZiOUS wrote: Fri Dec 11, 2020 10:04 pm OK so I successfully built the wx library with MinGW-w64 (GCC 10) and the same issue occurs...
FWIW, I could not reproduce the issue with GCC 10 and your "test" project. I ran both Debug and Release builds of the program from Code::Blocks (20.04), the program always exited normally (Debug version run normally as well as under the debugger). Is there a step missing to reproduce the issue?

I am using MSYS2 package mingw-w64-x86_64-toolchain, which I updated today (GCC 10.2.0-6, CRT 9.0.0.6029.ecb4ff54-1). I suppose you used the same way to obtain mingw-w64 using GCC 10?

I noticed your project requires a non-default monolithic build, so created a monolithic build, with just one customization: I forgot to remove "CXXFLAGS="-std=c++17". So my wxWidgets build command was basically

Code: Select all

mingw32-make -f makefile.gcc BUILD=debug MONOLITHIC=1 SHARED=1 CXXFLAGS="-std=c++17"
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 SHARED=1 CXXFLAGS="-std=c++17"
Did you use any build modifications?

wxWidgets version was several days old wxWidgets GIT master and the tests were done on Windows 10.0.19041.685.
ONEEYEMAN wrote: Fri Dec 11, 2020 10:31 pm Do you have all those toolchains installed on the same machine at the same time?
Please don't do that it may lead to all sorts of weird behavior...
I have about six various GCC versions installed on the same machine, never caused any problems as long as you do not have in PATH a different GCC DLLs than you built your executable with. An executable attempting to use different compiler DLLs than it should not caused errors, but during the start up (DLLs being resolved).

EDIT I tried 64-bit TDM-GCC with GCC 9.2. I built wxWidgets the same way as with that MSYS2 package, tried to build and run the test project and it does exit abnormally. So I would think GCC 10 may be OK. It also maybe something specific to TDM distro of GCC 9, who knows.
Post Reply