8000 Server segfault after client leaves (opengl3) · Issue #40 · sammyfreg/netImgui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Server segfault after client leaves (opengl3) #40
Closed
@hinxx

Description

@hinxx

After compiling and running the server and client (#39 ) under Linux the server dies if the client leaves.
Code was compiled on Linux Mint 20 using system glfw and opengl3 libraries.

Here is the backtrace from gdb:

Thread 4 "netimgui_server" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff2819700 (LWP 373138)]
0x00007ffff74e5b69 in ?? () from /lib/x86_64-linux-gnu/libGLdispatch.so.0
(gdb) bt
#0  0x00007ffff74e5b69 in ?? () from /lib/x86_64-linux-gnu/libGLdispatch.so.0
#1  0x00005555556991b9 in NetImguiServer::App::HAL_DestroyRenderTarget (pOutRT=@0x555555c30bb8: 0x0, pOutTexture=@0x555555c30bc0: 0x4) at GlfwGL3/NetImguiServer_HAL_GL3.cpp:92
#2  0x00005555556747b2 in NetImguiServer::RemoteClient::Client::Reset (this=0x555555c30bb8) at NetImguiServer_RemoteClient.cpp:137
#3  0x0000555555670dd9 in NetImguiServer::Network::Communications_ClientExchangeLoop (pClientSocket=0x7fffec0014b0, pClient=0x555555c30bb8) at NetImguiServer_Network.cpp:198
#4  0x0000555555673d56 in std::__invoke_impl<void, void (*)(NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*), NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*> (
    __f=@0x7fffec0014e8: 0x555555670c96 <NetImguiServer::Network::Communications_ClientExchangeLoop(NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*)>)
    at /usr/include/c++/9/bits/invoke.h:60
#5  0x0000555555673c03 in std::__invoke<void (*)(NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*), NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*> (
    __fn=@0x7fffec0014e8: 0x555555670c96 <NetImguiServer::Network::Communications_ClientExchangeLoop(NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*)>)
    at /usr/include/c++/9/bits/invoke.h:95
#6  0x0000555555673a91 in std::thread::_Invoker<std::tuple<void (*)(NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*), NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*> >::_M_invoke<0ul, 1ul, 2ul> (this=0x7fffec0014d8) at /usr/include/c++/9/thread:244
#7  0x00005555556739e7 in std::thread::_Invoker<std::tuple<void (*)(NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*), NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*> >::operator() (this=0x7fffec0014d8) at /usr/include/c++/9/thread:251
#8  0x0000555555673976 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*), NetImgui::Internal::Network::SocketInfo*, NetImguiServer::RemoteClient::Client*> > >::_M_run (this=0x7fffec0014d0) at /usr/include/c++/9/thread:195
#9  0x00007ffff7e2fde4 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x00007ffff7bd4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#11 0x00007ffff7af7133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

(gdb) f 1
#1  0x00005555556991b9 in NetImguiServer::App::HAL_DestroyRenderTarget (pOutRT=@0x555555c30bb8: 0x0, pOutTexture=@0x555555c30bc0: 0x4) at GlfwGL3/NetImguiServer_HAL_GL3.cpp:92

92			glDeleteFramebuffers(1, &pRT);
(gdb) p pRT

$1 = 1
(gdb) p *pRT
Cannot access memory at address 0x1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0