-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Join a Raknet-Network Game crash the game [BUG] #33
Comments
I can't quite reproduce the issue on my side Does the crash happen when you run 2 instances of ATD on the same machine? (The game can be run from the same location multiple times, just saving doesn't work) |
Hi. |
Seems to be a Linux related issue then. Does RAKNet direct join/host work? |
The only way (for me in linux) to play multiplayer is the direct ip. If it is with 2 instances on the same machine I can even enter localhost as the ip address at the joining instance. By the way: |
The enet implementation is rather flaky - same machine game discovery doesn't really work and sometimes enet doesn't use the correct adapter
Yes, Direct-IP is implemented with RAKNet Could you maybe send me a log ( |
Finally I found time... These are the logs when the game crash on the client side: These are the logs with direct IP when everything works well: In case of a crash I see a "segmentation fault" in the terminal from where I start the game. Thats not in the log file. |
Okay, I just tried it with my WSL ubuntu version. There was a bug in the server code and a potential bug in the NAT to UDP fallback code, but that shouldn't be run when on the same machine. How exactly are you building and what version of SDL are you using? How are you connected to the internet? Can you check with Wine or Windows, to rule out a bug in the Linux version? Are you using the DEBUG or RELEASE build? (Check the main menu, bottom right corner) |
that gave me a Release build (lower right corner in menu)
[ 78%] Building CXX object src/CMakeFiles/AT.dir/Checkup.cpp.o I tried it with: |
Just one more interesting behavior: When I use start one game in Linux and the other in the wine environment, the Linux instance always crash. Wine stay in game. Very interesting is the case when Linux is Host and Wine is Client. In the moment Wine wants to join, the Linux Host crash and Wine stay in game. Here are the logs for that case: |
Yeah, I noticed that the master-server-config branch is not yet ready for linux I always build cmake without the toolchain file ( Could you maybe try to run AT with GDB if the above compile fails? Maybe that could give a trace on where the segfault occured |
I can try to use cmake without the toolchain option, but I guess it will not work. how to use GDB? Do I need to build AT before in a special way? I am completely new to that and need detailed instructions, unfortunately. |
You was right! It works now!!! I run cmake without the toolchain file and it gave me the a warning that the sdl2 librarys were not all found. I removed my i386 dev librarys and installed the normal (64bit) instead. Run the cmake without toolchain file again and it worked. After the make I got a AT executable that had no problems to join a Raknet game. Maybe its time to change the building instructions for Linux (or at least ubuntu 64bit). |
Hm. I tested with a friend not in my local network and we could not join a raknet NAT game. The game did not crash but both players got single games and could not see each other in the choose character menu. It did not matter who hosted or joined. Seems its only working in local networks so far. |
Yes, if the NAT traversal fails to find a route between the clients, it is supposed to switch to a UDP tunnel. There was a bug in the code where sometimes the udp tunnel does not get properly opened, resulting in a semi failed connection where all clients move into a "singleplayer" game, like you experienced. I fixed the compilation issues for linux in the feature/master-server-config branch, could you try that one again, if it isn't too much of a hassle? But just for clarification, what systems are trying to connect together in your scenario? Both on Linux x64? What network conditions are all clients in? Router restarted? |
I could compile it now, but when I start I get directly a segmentation fault. I guess it is a problem with the config file format. In the old version the entries seemed to be in a line. Now its in many lines (what is actually better). about the network test: It was with 2 Linux x64 PC. Both are behind a router with different local IP networks. |
Now a little more detailed what I tested:
|
I fixed that issue. It was a bug in the init of the settings file, causing an invalid state in the game's settings. This resulted in a crash when loading sound files (where the seg fault happened) |
Yes. Works now. |
Just to update the Ubuntu build instructions (the way it works for me so far): Prepare:sudo apt-get install libsdl2*-dev git submodule update --init Build:mkdir build cd build cmake -DJANSSON_BUILD_DOCS=OFF .. make |
Your current version
1.6.2 Linux (ubuntu 22.04) -> Develop Branch
Describe the bug
The good thing first: It is finally possible to create/host a game in the Raknet-Mode
This game is visible for other Players in the Raknet-Join "room", but when they try to join the game crash with a segmentation fault
To Reproduce
Steps to reproduce the behavior:
Expected behavior
a successful connection
The text was updated successfully, but these errors were encountered: