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

calling to get a system from an off thread #90

Open
jwinarske opened this issue Jan 28, 2025 · 2 comments
Open

calling to get a system from an off thread #90

jwinarske opened this issue Jan 28, 2025 · 2 comments
Assignees

Comments

@jwinarske
Copy link
Contributor

[08:14:16.359206] [I] From FilamentViewPlugin::on_touch You're calling to get a system from an off thread, undefined experience! Use a message to do your work or grab the ecsystemmanager strand and do your work.
[08:14:16.359219] [I] From vOnTouch You're calling to get a system from an off thread, undefined experience! Use a message to do your work or grab the ecsystemmanager strand and do your work.
[08:14:16.359220] [I] From CameraManager::aGetRayInformationFromOnTouchPosition You're calling to get a system from an off thread, undefined experience! Use a message to do your work or grab the ecsystemmanager strand and do your work.
[08:14:16.359240] [I] From CameraManager::setDefaultCamera You're calling to get a system from an off thread, undefined experience! Use a message to do your work or grab the ecsystemmanager strand and do your work.

What is the remaining work to resolve this?

@tcadanklefsen
Copy link
Collaborator

This one can be seen as an issue or not. This simply means a message wasn't routed through the ECS system to be handled; as its being directly called and handled - ideally you shouldnt do that, but its just an information not a warning or error. It's undefined as it might work, might not, might explode, might cause daisies spawn; or might just be fine.

@tcadanklefsen
Copy link
Collaborator

Ones that involve cameras/viewports were not finished with messaging; as the architecture around windowing at a global level isn't believed to be enough information. As such, its only using [0] now, where ideally these functions are told which viewport something happened on.

For example platform_views_handler.cc has this snippet


if (const auto id = touch.getId();
        listeners_.find(id) != listeners_.end()) {
      auto [fst, snd] = listeners_[id];
      if (const auto callbacks = fst; callbacks->on_touch) {
        callbacks->on_touch(touch.getAction(), touch.getPointerCount(),
                            touch.getRawPointerCoords().size(),
                            touch.getRawPointerCoords().data(), snd);
      }
    }

which calls our function, but [0] of a viewport is assumed. If its able to send an identifier over; this can then route to the correct viewport within filament as a message.

@kerberjg kerberjg assigned kerberjg and unassigned tcadanklefsen Feb 12, 2025
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

3 participants