Jump to content

Server crash - Exception in Game WorkPool worker thread 0: std::bad_alloc


Rinart73

Recommended Posts

0.19.1

 

I don't know what could cause it. I just tried to register a callback in the sector-attached script. It worked fine on a new galaxy. Unfortunately it's hard to reproduce.

-- namespace ServerGuard
ServerGuard = {}

function ServerGuard.initialize()
    local sector = Sector()
    if not sector:getValue("serverguard_generated") then
        sector:registerCallback("onPlayerEntered", "peformLateInit")
    end
end

 

Here is the stacktrace of two crashes:

2018-10-17 17-09-43| === STACKTRACE =====================================
2018-10-17 17-09-43| #1: operator new(unsigned long) [0xaf67c9]
2018-10-17 17-09-43| #2: [ext] std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) [0x7f4be8662e39]
2018-10-17 17-09-43| #3: [ext] std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned long) [0x7f4be8663c6b]
2018-10-17 17-09-43| #4: [ext] std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) [0x7f4be866436c]
2018-10-17 17-09-43| #5: Script::makeExecutionContext(std::string const&) [0x9f2909]
2018-10-17 17-09-43| #6: void GameCallbackSender::safeCallback<std::tuple<int>&>(std::string const&, std::tuple<int>&) [0x36ef33]
2018-10-17 17-09-43| #7: DelayedCallbackSender::sendDelayedCallbacks() [0x6d80f6]
2018-10-17 17-09-43| #8: ut::Worker<ut::queue<std::shared_ptr<ut::WorkPacket> > >::workSinglePacket() [0x3bcc3a]
2018-10-17 17-09-43| #9: std::thread::_Impl<std::_Bind_simple<ut::Worker<ut::queue<std::shared_ptr<ut::WorkPacket> > > ()> >::_M_run() [0x3bdcf0]
2018-10-17 17-09-43| #10: [ext] ?? [0x7f4be864cc80]
2018-10-17 17-09-43| #11: [ext] ?? [0x7f4be7e5f6ba]
2018-10-17 17-09-43| #12: [ext] ?? [0x7f4be7b9541d]

 

2018-10-17 17-39-04| bad_alloc thrown for a size of 140378898202592
2018-10-17 17-39-04| === STACKTRACE =====================================
2018-10-17 17-39-04| #1: operator new(unsigned long) [0xaf67c9]
2018-10-17 17-39-04| #2: [ext] std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) [0x7fad01f71e39]
2018-10-17 17-39-04| #3: [ext] std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned long) [0x7fad01f72c6b]
2018-10-17 17-39-04| #4: [ext] std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) [0x7fad01f7336c]
2018-10-17 17-39-04| #5: Script::makeExecutionContext(std::string const&) [0x9f2909]
2018-10-17 17-39-04| #6: void GameCallbackSender::safeCallback<std::tuple<int>&>(std::string const&, std::tuple<int>&) [0x36ef33]
2018-10-17 17-39-04| #7: DelayedCallbackSender::sendDelayedCallbacks() [0x6d80f6]
2018-10-17 17-39-04| #8: ut::Worker<ut::queue<std::shared_ptr<ut::WorkPacket> > >::workSinglePacket() [0x3bcc3a]
2018-10-17 17-39-04| #9: std::thread::_Impl<std::_Bind_simple<ut::Worker<ut::queue<std::shared_ptr<ut::WorkPacket> > > ()> >::_M_run() [0x3bdcf0]
2018-10-17 17-39-04| #10: [ext] ?? [0x7fad01f5bc80]
2018-10-17 17-39-04| #11: [ext] ?? [0x7fad0176e6ba]
2018-10-17 17-39-04| #12: [ext] ?? [0x7fad014a441d]
2018-10-17 17-39-04| ===================================================Exception in Game WorkPool worker thread 0: std::bad_alloc

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...