-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ActorPath.ToStringWithAddress is given null address parameter #6966
Comments
@minesworld make sure that you have visual studio to ignore handled exceptions. Not a bug. |
@Arkatufus sorry to ping you on a closed issue, but I am a bit annoyed by this exception and was checking if there's something I can do to avoid it. It happens to me 100% of the times when starting the application. Can you point me out to some comments/explain me why this is not a bug? The exception I'm hitting is from here where What are the issue changing the code to something akin to the following: public static string FromActorRef(IActorRef a, ActorSystem system)
{
try
{
var defaultAddress = system.AsInstanceOf<ExtendedActorSystem>().Provider.DefaultAddress;
if (defaultAddress is null)
{
return a.Path.ToString();
}
return a.Path.ToStringWithAddress(defaultAddress);
}
catch // can fail if the ActorSystem (remoting) is not completely started yet
{
return a.Path.ToString();
}
} |
@ilmax You can read the original attempt to fix this and the reason why we didn't here: #5454 (comment) Your fix might be good, we'll look into it. |
Version Information
1.5.13
Remote 1.5.13
Describe the bug
Configuring a simple remote server as in the ChatServer example crashes the program.
Same issue as described on StackOverflow https://stackoverflow.com/questions/69983136/akka-net-net-framework-akka-remote-config-always-errors-on-start-then-works
To Reproduce
Steps to reproduce the behavior:
Expected behavior
should just run
Actual behavior
throws
System.NullReferenceException
Screenshots
Additional context
Adding a check in
ActorPath.ToStringWithAddress
if the given address is null works (e.g. the server listens), but I have no clue about the side effects and why anull
address
is givenThe text was updated successfully, but these errors were encountered: