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

Could not determine track hint #83421

Open
Rubonnek opened this issue Oct 16, 2023 · 4 comments
Open

Could not determine track hint #83421

Rubonnek opened this issue Oct 16, 2023 · 4 comments

Comments

@Rubonnek
Copy link
Member

Rubonnek commented Oct 16, 2023

Godot version

master branch at commit a574c02

System information

Arch Linux

Issue description

When switching animations in an AnimationPlayer, there's a chance the following error message will show:

ERROR: Parameter "obj" is null.
   at: get_property_list (core/variant/variant_setget.cpp:1248)

Steps to reproduce

Reproducing this issue seems to be somewhat inconsistent, but here are the steps:

  1. Choose the AnimationPlayer node in the main scene within the MRP.
  2. Select several of the first few animations. Make sure each selection is different.
  3. Select the animation named shards_fade_in, and the error message should show. If not keep selecting different animations and eventually it will show.

Minimal reproduction project

AnimationSelectionBug.zip

Additional Notes

In Godot v3 this particular issue does not happen: AnimationSelection_Godot3.zip

@Rubonnek Rubonnek added this to the 4.2 milestone Oct 16, 2023
@jsjtxietian
Copy link
Contributor

Call stack
Variant::get_property_list(List<PropertyInfo,DefaultAllocator> * p_list) Line 1248	C++
AnimationTrackEditor::_find_hint_for_track(int p_idx, NodePath & r_base_path, Variant * r_current_val) Line 4110	C++
AnimationTrackEditor::_update_tracks() Line 4397	C++
AnimationTrackEditor::set_animation(const Ref<Animation> & p_anim, bool p_read_only) Line 3319	C++
AnimationPlayerEditor::_current_animation_changed(const String & p_name) Line 1312	C++
call_with_variant_args_helper<AnimationPlayerEditor,String const &,0>(AnimationPlayerEditor * p_instance, void(AnimationPlayerEditor::*)(const String &) p_method, const Variant * * p_args, Callable::CallError & r_error, IndexSequence<0> __formal) Line 303	C++
call_with_variant_args<AnimationPlayerEditor,String const &>(AnimationPlayerEditor * p_instance, void(AnimationPlayerEditor::*)(const String &) p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 418	C++
CallableCustomMethodPointer<AnimationPlayerEditor,String const &>::call(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 105	C++
Callable::callp(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 58	C++
Object::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 1127	C++
Node::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 3608	C++
Object::emit_signal<StringName>(const StringName & p_name, StringName <p_args_0>) Line 920	C++
AnimationPlayer::set_assigned_animation(const String & p_animation) Line 490	C++
AnimationPlayerEditor::_animation_selected(int p_which) Line 319	C++
call_with_variant_args_helper<AnimationPlayerEditor,int,0>(AnimationPlayerEditor * p_instance, void(AnimationPlayerEditor::*)(int) p_method, const Variant * * p_args, Callable::CallError & r_error, IndexSequence<0> __formal) Line 308	C++
call_with_variant_args<AnimationPlayerEditor,int>(AnimationPlayerEditor * p_instance, void(AnimationPlayerEditor::*)(int) p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 418	C++
CallableCustomMethodPointer<AnimationPlayerEditor,int>::call(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 105	C++
Callable::callp(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 58	C++
Object::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 1127	C++
Node::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 3608	C++
Object::emit_signal<int>(const StringName & p_name, int <p_args_0>) Line 920	C++
OptionButton::_select(int p_which, bool p_emit) Line 435	C++
OptionButton::_selected(int p_which) Line 228	C++
call_with_variant_args_helper<OptionButton,int,0>(OptionButton * p_instance, void(OptionButton::*)(int) p_method, const Variant * * p_args, Callable::CallError & r_error, IndexSequence<0> __formal) Line 308	C++
call_with_variant_args<OptionButton,int>(OptionButton * p_instance, void(OptionButton::*)(int) p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 418	C++
CallableCustomMethodPointer<OptionButton,int>::call(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 105	C++
Callable::callp(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 58	C++
Object::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 1127	C++
Node::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 3608	C++
Object::emit_signal<int>(const StringName & p_name, int <p_args_0>) Line 920	C++
PopupMenu::activate_item(int p_idx) Line 2305	C++
PopupMenu::gui_input(const Ref<InputEvent> & p_event) Line 557	C++
call_with_variant_args_helper<PopupMenu,Ref<InputEvent> const &,0>(PopupMenu * p_instance, void(PopupMenu::*)(const Ref<InputEvent> &) p_method, const Variant * * p_args, Callable::CallError & r_error, IndexSequence<0> __formal) Line 303	C++
call_with_variant_args<PopupMenu,Ref<InputEvent> const &>(PopupMenu * p_instance, void(PopupMenu::*)(const Ref<InputEvent> &) p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 418	C++
CallableCustomMethodPointer<PopupMenu,Ref<InputEvent> const &>::call(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 105	C++
Callable::callp(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 58	C++
Object::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 1127	C++
Node::emit_signalp(const StringName & p_name, const Variant * * p_args, int p_argcount) Line 3608	C++
Object::emit_signal<Ref<InputEvent>>(const StringName & p_name, Ref<InputEvent> <p_args_0>) Line 920	C++
Window::_window_input(const Ref<InputEvent> & p_ev) Line 1550	C++
call_with_variant_args_helper<Window,Ref<InputEvent> const &,0>(Window * p_instance, void(Window::*)(const Ref<InputEvent> &) p_method, const Variant * * p_args, Callable::CallError & r_error, IndexSequence<0> __formal) Line 303	C++
call_with_variant_args<Window,Ref<InputEvent> const &>(Window * p_instance, void(Window::*)(const Ref<InputEvent> &) p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 418	C++
CallableCustomMethodPointer<Window,Ref<InputEvent> const &>::call(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 105	C++
Callable::callp(const Variant * * p_arguments, int p_argcount, Variant & r_return_value, Callable::CallError & r_call_error) Line 58	C++
Callable::call<Ref<InputEvent>>(Ref<InputEvent> <p_args_0>) Line 847	C++
DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> & p_event) Line 2694	C++
DisplayServerWindows::_dispatch_input_events(const Ref<InputEvent> & p_event) Line 2664	C++
Input::_parse_input_event_impl(const Ref<InputEvent> & p_event, bool p_is_emulated) Line 751	C++
Input::flush_buffered_events() Line 1013	C++
DisplayServerWindows::process_events() Line 2379	C++
OS_Windows::run() Line 1474	C++
widechar_main(int argc, wchar_t * * argv) Line 182	C++
_main() Line 204	C++
main(int argc, char * * argv) Line 218	C++
WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 232	C++
[External Code]	

@SaracenOne SaracenOne self-assigned this Oct 28, 2023
@SaracenOne
Copy link
Member

Looked into this. Basically, I think the issue lies in how the AnimationPlayer determines the 'hint' for a particular track, basically what type of track it is and how it should be rendered in the timeline. The reason the error comes up is the fact that between certain tracks, the material property is set and unset. So when you go from a track which set the material to null, then go to a track where its set and also has shader parameters set, it doesn't know how to determine the track type since it material parameter is still null.

I'm not sure the best way to fix this, but at the very least, I can probably put a more descriptive error at least.

@Rubonnek
Copy link
Member Author

Thanks for adding a more descriptive message. I've kicked the milestone to 4.x now since it doesn't seem to be high priority anymore.

I've tried to reproduce this issue in a 3.x build and an equivalent project and it does not happen. Aside from how the hints are processed, it seems there could be a regression in the editor code.

@GigglingGalaxy
Copy link

I can confirm this in 4.2 on a MacBook Pro M1. It's happening on alpha channel and preventing the other track WorldEnvironment from animating glow_strength. I am wondering if it has to do with Sprite being alpha 0? I tried .01 and didn't get the error straight away, but still WE glow_strength didn't change.

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

No branches or pull requests

4 participants