c++cygwinlog4cplus

Cygwin 3.3.4 random end of program


I'm looking for tips to find a direction where I have to investigate.

I have a little c++ project that works well both on my old cygwin (3.0.4(0.338/5/3)) and on a debian distrib (thanks to Posix) In this project I use some libraries like log4cplus (cxxTest, rapidJson, ...)

Now I had to upgrade my cygwin. So I install a new version of cygwin (3.3.4(0.341/5/3)) totally separated from the previous one. With this new cygwin, I have 2 problems:

gdb: unknown target exception 0x80000001 at 0x7ffc741dd147
Thread 9 received signal ?, Unknown signal.

In order to find the problem I make a very simple code to reproduce the problem. And finally it was very simple, I do this :

#include <iostream>
#include <log4cplus/initializer.h>
#include <log4cplus/configurator.h>

using namespace std;

/// ***************************************************************************
/// Initialisation of log4cplus library
/// ***************************************************************************
void log4cplusInit() {
    try {
        log4cplus::initialize();
        //log4cplus::PropertyConfigurator::doConfigure("config/log4cplus.ini");
    }
    catch(std::exception& e)
    {
        cout << e.what() << endl;
    }
    catch(...) {
        cout << "Unexpected exception" << std::endl;
    }
}

int main() {
    //log4cplusInit();
    cout << "Hello World " << endl;
}

Things that I already find/try :

So I'm looking for an idea where I can start. I want to investigate this bug, but I have no clue.

PS: I already have open an issue in log4cplus github. Don't know if I have to open one in cygwin

Any help will be appreciated :)


Solution

  • For every people who read this thread in future :

    I don't really find a solution in Cygwin, but like @Alan Birtles mention : Use WSL (or another updated solution). It work like a charm. thanks to microsoft ;)