riker-rs / riker

Easily build efficient, highly concurrent and resilient applications. An Actor Framework for Rust.
https://riker.rs
MIT License
1.02k stars 69 forks source link

Space in actor name passed to system.actor_of crashes the system #139

Closed mneumann closed 3 years ago

mneumann commented 3 years ago

This works:

for i in 0 .. 10 {
    let node = system.actor_of::<Node>(&format!("node{}", i)).unwrap();
    println!("{:?}", node);
}

But when I use space in the actor name, it crashes:

for i in 0 .. 10 {
    let node = system.actor_of::<Node>(&format!("node {}", i)).unwrap(); // HERE "node {}"
    println!("{:?}", node);
}
ActorSystem[Name: ring, Start Time: 2020-11-21 20:02:34.717345954 UTC, Uptime: 0 seconds]

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Abort (core dumped)

I'd expect it to return an Err instead.

hardliner66 commented 3 years ago

This is the same bug as #120 and is already fixed on master.

Until it's published to crates.io you could use the git repo as a dependency:

[dependencies]
riker = {git = "https://github.com/riker-rs/riker"}

@leenozara Could you publish the current version to crates?

nothingismagick commented 3 years ago

0.4.2 is now available.

mneumann commented 3 years ago

@nothingismagick thanks for fixing it!

nothingismagick commented 3 years ago

It wasn't me. But thanks to this awesome community it got done and merged and released.