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

Min API externals receive zero length args from certain sources if not declared threadsafe #185

Open
rtu-ableton opened this issue Jan 10, 2022 · 1 comment

Comments

@rtu-ableton
Copy link

If an external is created with the Min API, some sources connected to the inlet work (e.g. a message box, UI element) and others don't (e.g. midi messages coming from midiin).

In this example code, a list of length 2 from midiin will trigger the error:

message<> test{
    this, "test", "test input", [this](const atoms& args, int inlet) -> atoms {
      (void)inlet;
     
      if (args.size() < 1)
      {
        cerr << "bad list length, size = " << args.size() << endl;
        return {};
      }

The problem goes away if the message is declared threadsafe via message<threadsafe::yes> but either this should not be necessary, or a meaningful error should be displayed somehow to help the dev.

@robtherich
Copy link
Contributor

hi @rtu-ableton we are trying to understand the report. are you suggesting that all message in min should be threadsafe by default?

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

No branches or pull requests

2 participants