You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hints.ai_flags &= ~AI_NUMERICHOST;
// before crashint s = getaddrinfo(p_hostname.utf8().get_data(), nullptr, &hints, &result);
// after crashif (s != 0) {
print_verbose("getaddrinfo failed! Cannot resolve hostname.");
return;
}
I have used print statements to verify that the p_hostname.utf8().get_data() value we are passing in is indeed a valid string. My suspicion is that this is a bug with macOS, but I am not sure. Even if this is a bug in macOS, it may be helpful to have an issue open to track this bug.
Steps to reproduce
Call this method on macOS and it will randomly crash. It only happens a tiny fraction of the time, a few percent or less, so unfortunately it's very hard to reproduce.
Minimal reproduction project
Unfortunately since it's so hard to reproduce, I have not been able to reproduce the crash once with the minimal reproduction project (either using master or The Mirror's fork), but here is an attempt at a minimal reproduction project anyway: IP_resolver_getaddrinfo_crash.zip
Since IPUnix is not exposed you also need to use these engine changes. If you instead use IP directly then it will cache the result so the test will only run on one frame.
The text was updated successfully, but these errors were encountered:
I can test tomorrow on MacOS 13.2.1 (also M1 Pro). A completely random guess but worth a shot: Do you use the Apple iCloud Private Relay? (I believe it gets sort of auto enabled when you login with an icloud account). Might not be it, but who knows.
Godot version
Happens on The Mirror's fork of Godot, it's hard to reproduce so unsure about master but seems likely given there are not a ton of differences.
System information
macOS 13.4.1 on M1 Pro
Issue description
I am getting a crash on macOS when resolving IP addresses from hostnames using the macOS
getaddrinfo
method.The crashing code is here:
I have used print statements to verify that the
p_hostname.utf8().get_data()
value we are passing in is indeed a valid string. My suspicion is that this is a bug with macOS, but I am not sure. Even if this is a bug in macOS, it may be helpful to have an issue open to track this bug.Steps to reproduce
Call this method on macOS and it will randomly crash. It only happens a tiny fraction of the time, a few percent or less, so unfortunately it's very hard to reproduce.
Minimal reproduction project
Unfortunately since it's so hard to reproduce, I have not been able to reproduce the crash once with the minimal reproduction project (either using master or The Mirror's fork), but here is an attempt at a minimal reproduction project anyway: IP_resolver_getaddrinfo_crash.zip
Since
IPUnix
is not exposed you also need to use these engine changes. If you instead useIP
directly then it will cache the result so the test will only run on one frame.The text was updated successfully, but these errors were encountered: