Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
37 user(s) are online (23 user(s) are browsing Forums)

Members: 0
Guests: 37

more...

Headlines

Report message:*
 

Re: MineCraft (MineTest) work in progress help need it

Subject: Re: MineCraft (MineTest) work in progress help need it
by kas1e on 2021/1/4 21:58:29

@Salas00
Quote:

Try changing the value of DEFAULT_ENCODING from "WCHAR_T" to "UCS-4" or "UCS-4BE".


Yeah, UCS-4 did the trick! Messages all everywhere and looks correct.

I was in the hope it will auto-fix those newlib errors as well, but nope :( Check out how they look like:

Resized Image

Strange that exactly 4 windows. And exit() of process XX for all 4 are the same XX. But from a wrong process are different (increased +1 for each).

All I can see in the console is :

Quote:

terminate called after throwing an instance of 'std::system_error'
What() : terminate called recursively
Device or resource busy


Wtf it means dunno


EDIT: what i find is that "std::system_error" is coming from the thread.cpp in the Thread::start():

bool Thread::start()
{
    
MutexAutoLock lock(m_mutex);

    if (
m_running)
        return 
false;

    
m_request_stop false;

    
// The mutex may already be locked if the thread is being restarted
    
m_start_finished_mutex.try_lock();

    try {
        
m_thread_obj = new std::thread(threadProcthis);
    } catch (const 
std::system_error &e) {
        return 
false;
    }

    
// Allow spawned thread to continue
    
m_start_finished_mutex.unlock();

    while (!
m_running)
        
sleep_ms(1);

    
m_joinable true;

    return 
true;
}


So it indeed a catch, is it mean some threads can't be created? And newlib just throw errors about RemTask(NULL) being called from the wrong process?


EDIT2: Find out that minecraft can be running with "--run-unittests" so can be checked all the code. And when it just tryied to test module TestThreading, it then shows me the same error from newlib.library:

Quote:

"exit() of process 214 called from wrong process 216, using IExec->RemTask(NULL). Process: "New Process".


and in the console i have:

Quote:

======== Testing module TestThreading
terminate called after throwing an instance of 'std::system_error'
what(): Device or resource busy


And testthreading code are there:

https://github.com/minetest/minetest/b ... ittest/test_threading.cpp

Its uses and threads and semaphores. So I assume something there still.

And interestingly it didn't skip that error. I.e. test stops here, without bringing "fail" and just halt the console.

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project