Skip to content
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

ERROR: Condition "peer > 0 && !connected_peers.has(peer)" is true #95015

Closed
makeryangcom opened this issue Aug 1, 2024 · 11 comments
Closed

ERROR: Condition "peer > 0 && !connected_peers.has(peer)" is true #95015

makeryangcom opened this issue Aug 1, 2024 · 11 comments

Comments

@makeryangcom
Copy link

makeryangcom commented Aug 1, 2024

Tested versions

Godot Engine v4.3.rc1.official.[e343dbb]

System information

Centos8 x86_64

Issue description

Can confirm this problem still exists in Godot Engine v4.3.rc1.official.e343dbbcc

1722511842492

...
multiplayer.multiplayer_peer = server_peer
multiplayer.peer_connected.connect(_on_peer_connected)
multiplayer.peer_disconnected.connect(_on_peer_disconnected)
...

func _on_peer_disconnected(client_id: int) -> void:
	print("[server:client:disconnected]", str(client_id))
	if data["players"][str(client_id)]:
		var players_node = get_parent().get_node("Players")
		if players_node.has_node(str(client_id)):
			var player_node = players_node.get_node(str(client_id))
			player_node.queue_free()
			data["players"].erase(str(client_id))
			print("[server:client:disconnected:remove]", str(client_id))
			rpc("on_remove_player", client_id)

Steps to reproduce

This error only occurs when there are multiple players connected to the server; if the last player leaves the game, there are no errors.

Minimal reproduction project (MRP)

not

@makeryangcom
Copy link
Author

Need help!!!

@makeryangcom
Copy link
Author

@Faless

To facilitate your troubleshooting, my players invoke the following functions when they exit the game. Additionally, has this bug existed since 2022 and remained unaddressed? If I have 1,000 or 10,000 players, the log display will be a disaster.

func _on_out_game_pressed() -> void:
	print("[interface:on:out:game]")
	multiplayer.multiplayer_peer = null
	Client.on_close()
	get_tree().quit()

@Chaosus
Copy link
Member

Chaosus commented Aug 2, 2024

Note: If you want to help the developers to fix it faster you should create and attach a MRP.

@AThousandShips
Copy link
Member

AThousandShips commented Aug 2, 2024

Where was this bug originally reported? Can you please link to any issue to see other progress in triaging this? Can you also check with rc2

@makeryangcom
Copy link
Author

@Chaosus Let me see how I can create a smaller MRP; my project is too large.

@AThousandShips his bug occurs on the server side, just as I described.

@AThousandShips
Copy link
Member

What are you replying to? I didn't ask anything about server or client side

You said this was a long standing bug, and I assumed that this meant you had other reports on this, which would be relevant information, or do you mean you've had this bug for a long time yourself?

@makeryangcom
Copy link
Author

@AThousandShips #70505

@AThousandShips
Copy link
Member

Then I'll consolidate in that report, no need for a separate report, that one already has more details, please do not open duplicate reports

@AThousandShips AThousandShips closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2024
@makeryangcom
Copy link
Author

@AThousandShips @Chaosus I have uploaded the minimal MPR. Please check it here: #70505

@makeryangcom
Copy link
Author

@AThousandShips Has there been any progress on this bug? If you won't be focusing on fixing it in the short term, I won't wait any longer!

@AThousandShips
Copy link
Member

AThousandShips commented Aug 6, 2024

We're focusing on releasing 4.3 which means fixing regressions introduced in that work, and please keep the discussion in the other report, or it'll be hard to track things

Edit: solved in:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants