Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 25 16:38
  • Nov 25 06:37
  • Nov 25 05:26
    BloodeyedZhang starred actor-framework/actor-framework
  • Nov 22 07:42
    Neverlord labeled #1367
  • Nov 22 05:49
  • Nov 22 04:48
    chuanyi closed #1367
  • Nov 22 04:48
    chuanyi commented #1367
  • Nov 22 02:03
    chuanyi opened #1367
  • Nov 20 11:52
  • Nov 19 21:35

    Neverlord on neverlord

    Fix edge case on the SPSC buffe… Fix error propagation in fused … Improve coverage of from_resour… (compare)

  • Nov 19 08:43
  • Nov 19 08:09
    Neverlord milestoned #1366
  • Nov 19 08:09
    Neverlord milestoned #1365
  • Nov 19 08:09
    Neverlord milestoned #1364
  • Nov 19 08:07
    Neverlord labeled #1366
  • Nov 19 08:07
    Neverlord opened #1366
  • Nov 18 20:54

    Neverlord on neverlord

    Improve coverage of from_contai… (compare)

  • Nov 18 20:44

    Neverlord on neverlord

    Improve coverage of from_callab… (compare)

  • Nov 18 08:08
    Neverlord labeled #1365
  • Nov 18 08:08
    Neverlord opened #1365
Dominik Charousset
@Neverlord
Yes, you can tell CTest to include outputs (or only include it on errors).
mustafma
@mustafma
Appreciate it Dominik. A follow up issue, including caf test ending up with the following error:'error while parsing argument "--gtest_list_tests": caf::pec::not_an_option' Do you have an idea what could be wrong ?
Dominik Charousset
@Neverlord
Whatever program you have passed --gtest_list_tests doesn't recognize this as argument.
mustafma
@mustafma
If I use it without Caf test, all works fine. How does that can be related ?
Dominik Charousset
@Neverlord
I don't know your setup. From what I can tell, it seems like you are generating a test binary with the CAF scaffold but try passing --gtest_list_tests to it.
mustafma
@mustafma
Using gtest_discover_tests in the cmake file, which implicitly calls ctest with --gtest_list_tests. Using same example as in : https://github.com/actor-framework/actor-framework/blob/master/examples/testing/ping_pong.cpp. Is CAF tests not discoverable this way ? The error related to caf::pec::not_an_option which difficult to track down
Dominik Charousset
@Neverlord
No, CAF does provide that option. However, you can provide a custom main function for the test binary and implement this argument yourself. You can get all available test suite via caf::test::engine::available_suites().
Just parse/map the gtest arguments there if you want some neat integration.
mustafma
@mustafma
Thank you. Will give it a try
Alexander Gagarin
@uentity
Hi @Neverlord! Did you change something related to high priority messages processing recently? I'm using CAF 0.18.5 and noticed an effect that some of high priority messages sent to group 'getting stuck' and then when message of different type comes to group they get processed all at once. I have an actor joined into a group. Actor sends notification messages to it's group and then expecting to receive them back (as result of broadcasting from a group) to do some further processing. Notifications are being sent to a group, but actor do not receive them back.
Interestingly some message types are processed normally, but some 'getting stuck' as described above. Then when 'normally processed' message comes to group, all stuck messages gets delivered as well like in one bunch
If I remove high_priority flag, everything works as expected
Dominik Charousset
@Neverlord
Hm, I'm not sure how priorities and group play together. Do you have a minimal example you could share?
yosefabedelfattah
@yosefabedelfattah
Hi Dominik , I am using CAF test and need to let it recognize my custom atom types as currently i am crashing wit h segmentation fault error , I had this before in main main code and we solved thsi by letting the CAF_MACRO know about my new atom types CAF_MAIN(caf::id_block::custom_atom) , How i do the same in My CAF Test I am using Custom Main in my CAF Test
Dominik Charousset
@Neverlord
Basically by doing the same steps that CAF_MAIN otherwise does for you. Here's our setup for the I/O module tests: https://github.com/actor-framework/actor-framework/blob/master/libcaf_io/test/io-test.cpp.
Hope that works for you as a template.
yosefabedelfattah
@yosefabedelfattah
Thanks Dominik , so basically this is teh line from your code init_global_meta_objects<id_block::io_test>(); that shows the new atom types
Dominik Charousset
@Neverlord
Yes, this is where you add your own types.
yosefabedelfattah
@yosefabedelfattah
yep that worked thanks again
Dominik Charousset
@Neverlord
👍
yosefabedelfattah
@yosefabedelfattah
Hi Domminik , i got another question please, within an actor behavioure function can i send request to another Actor and wait till the other Actor return the result then return from the behavioure function ?
Dominik Charousset
@Neverlord
No, actors are non-blocking.
You could send the request using request()..await() and then set the behavior later by calling become, though.
yosefabedelfattah
@yosefabedelfattah
do you have any idea why i get this error the FirstController Actor works fine it just when calling it from the Test
Dominik Charousset
@Neverlord
Without source code it's anyone's guess. Probably the actor just isn't responding, though. I strongly suggest consulting trace logs for such cases: https://www.cafcademy.com/gems/indenting-trace-logs.
Dominik Charousset
@Neverlord
Usually you'd just link them. As long you don't introduce circular ref counts, the chain should also disappear if you drop the reference to the head. If it doesn't the trace logs are a good source to see what actors don't terminate. ;)
Matt Youill
@matt.youill_gitlab
Hi, question about actor spawning. What's the recommended way to report a failure in an actor spawning functor? Just self->quit() with an error message?
Dominik Charousset
@Neverlord
Yep, pretty much.
JoaoMarinho
@JoaoAMarinho
Hello, i am having an issue with caf. So i have two actors one reading from a can socket and the other receiving a message from the first one. I tried to send the struct can_frame ( i added the class inspector to it), but i am having a segmentation fault, can anyone provide some tips?
Dominik Charousset
@Neverlord
A common issue is not passing your type ID block to CAF_MAIN (or calling init_global_meta_objects if you write a custom main, cf. https://github.com/actor-framework/actor-framework/blob/master/libcaf_core/caf/init_global_meta_objects.hpp#L61).
In any case, I'd run it through a debugger so see where it crashes exactly.
JoaoMarinho
@JoaoAMarinho
Thanks. Also is there a way to create an actor that can access static information of his own when receiving a message, I'm trying to use a event/function based actor although without success.
Dominik Charousset
@Neverlord
I'm not sure what "static information" means. Global static variables? They are accessible anywhere, though. Maybe this article helps: https://www.cafcademy.com/articles/implementing-actors-part-1
JoaoMarinho
@JoaoAMarinho
Information that changes just inside that actor workspace.
JoaoMarinho
@JoaoAMarinho
Hello, i am trying to create an inspector for a class, although not having much success, which are the things neeeded in the inspect function for it to work?
Dominik Charousset
@Neverlord
Have a look at the examples: https://github.com/actor-framework/actor-framework/tree/master/examples/custom_type. Also the manual section on that topic if you haven't already.
JoaoMarinho
@JoaoAMarinho
Thank you. The problem i ran into, is a segmentation fault error ( so i think the solution would be the missing of an inspector), but my class is from another library, and there are no getters so i can't mimic the examples. What do you recommend
Dominik Charousset
@Neverlord
Did you consult your debugger about that assumption? Regarding the inspect, well, I can't recommend something without knowing what you're working with. :)
JoaoMarinho
@JoaoAMarinho
Yes
mustafma
@mustafma
Hi, I have a question related to caf test. I have two actors classes A and B. Inside A's constructor, I'm spawning actor B. Inside the make_behavior of actor A, I'm sending a request to Actor B. From CAF_TEST case, I spawn actor A and do the CAF_CHECK inside the send.receive(..){...}. The problem is that the test is never stopped - timed out after 30sec. Actor B is actually doing nothing besides returning a string in the make_behavior function. If we remove the send from A to B, the test works fine. Do you have an idea what I'm doing wrong here ?
We saw on the roadmap, that the testing framework will be overhauled. Do you have an estimate of when that might happen?
Dominik Charousset
@Neverlord
Hard to tell without seeing code. Deterministic setup? Are you missing a call to run, run_once, expect, ...?
2 replies
Overhaul: no timeline at the moment. Definitely not this year.
Dominik Lohmann
@dominiklohmann
I ran into an issue earlier today when I wanted to check whether two actors were running in the same actor system / process. I first tried a.home_system().node() != b.home_system().node(), but then realized these both return the same node_id. I then tried a.node() != b.node(), which works as expected. Is this a bug, or am I just misunderstanding? I am still on CAF 0.17.6.
Dominik Charousset
@Neverlord
Running multiple actor systems in the same process is unsafe unless they either never interact with each other or communicate over localhost connections.
Matt Youill
@matt.youill_gitlab
Hi again. Another edge case... I'm trying to destroy an actor system and then recreate it for the purpose of changing configuration. Is this supported? I'm running into an issue where I can create a second actor system (with a different number of threads) but it hangs if I then try to destroy this second instance. Seems to hang in the actor system destructor on the logger dtor mutex.
Dominik Charousset
@Neverlord
No, restarting actor systems or multiple actor systems in one process is not supported.
JoaoMarinho
@JoaoAMarinho
Hello, is there any example with the link_to function as i try to use it to force actors to die when one dies, but that does not happen. Thank you.
Dominik Charousset
@Neverlord

This might help: https://www.cafcademy.com/articles/monitoring-and-linking

If "nothing happens": are you just doing regular shutdown? Links only tear down other actors in case of an error.