o3de / o3de

Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform 3D engine that enables developers and content creators to build AAA games, cinema-quality 3D worlds, and high-fidelity simulations without any fees or commercial obligations.
https://o3de.org
Other
7.8k stars 2.2k forks source link

DPE Inspector: Add/Remove Component automated test crashes when adding/removing the Directional Light component #15704

Closed jckand closed 1 year ago

jckand commented 1 year ago

Describe the bug A clear and concise description of what the bug is. Try to isolate the issue to help the community to reproduce it easily and increase chances for a fast fix.

Assets required

  1. Download and unzip DPE_AllComponentsAddedRemoved.py to your project files. DPE_AllComponentsAddedRemoved.zip

Steps to reproduce

  1. Launch the Editor with the DPE enabled:
    Editor.exe --ed_enableDPE=true
  2. In the Console, type:
    pyRunFile [path/to/DPE_AllComponentsAddedRemoved.py]

Expected behavior Test completes successfully.

Actual behavior Editor crashes once the test attempts to add/remove the Directional Light component.

>   EditorLib.dll!AZStd::intrusive_multiset<AZ::Internal::HandlerNode<AZ::TickEvents,AZ::TickEvents,AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::HandlerHolder,0>,AZStd::intrusive_multiset_base_hook<AZ::Internal::HandlerNode<AZ::TickEvents,AZ::TickEvents,AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::HandlerHolder,0>>,AZ::Internal::HandlerCompare<AZ::TickEvents,AZ::TickEvents,AZ::TickEvents::BusHandlerOrderCompare>>::const_iterator_impl::PredOrSucc(const AZ::Internal::HandlerNode<AZ::TickEvents,AZ::TickEvents,AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::HandlerHolder,0> * node, int side) Line 250   C++
    [Inline Frame] EditorLib.dll!AZStd::intrusive_multiset<AZ::Internal::HandlerNode<AZ::TickEvents,AZ::TickEvents,AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::HandlerHolder,0>,AZStd::intrusive_multiset_base_hook<AZ::Internal::HandlerNode<AZ::TickEvents,AZ::TickEvents,AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::HandlerHolder,0>>,AZ::Internal::HandlerCompare<AZ::TickEvents,AZ::TickEvents,AZ::TickEvents::BusHandlerOrderCompare>>::iterator_impl::operator++(int) Line 304  C++
    EditorLib.dll!AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::Dispatcher<AZ::EBus<AZ::TickEvents,AZ::TickEvents>>::Broadcast<void (__cdecl AZ::TickEvents::*)(float,AZ::ScriptTimePoint),float const &,AZ::ScriptTimePoint>(void(AZ::TickEvents::*)(float, AZ::ScriptTimePoint) && func, const float & <args_0>, AZ::ScriptTimePoint && <args_1>) Line 1365 C++
    EditorLib.dll!AZ::ComponentApplication::Tick() Line 1511    C++
    EditorLib.dll!CGameEngine::Update() Line 812    C++
    EditorLib.dll!CCryEditApp::IdleProcessing(bool bBackgroundUpdate) Line 2365 C++
    EditorLib.dll!CCryEditApp::OnIdle(long lCount) Line 2262    C++
    EditorLib.dll!Editor::EditorQtApplication::maybeProcessIdle() Line 320  C++
    [External Code] 
    EditorLib.dll!`anonymous namespace'::PyIdleWaitFrames(unsigned int frames) Line 367 C++
    [Inline Frame] EditorLib.dll!AZStd::function_intermediate<void,AZ::BehaviorArgument *,AZStd::span<AZ::BehaviorArgument,-1>>::operator()(AZ::BehaviorArgument * &&) Line 604 C++
    [Inline Frame] EditorLib.dll!AZStd::function<void __cdecl(AZ::BehaviorArgument *,AZStd::span<AZ::BehaviorArgument,-1>)>::operator()(AZ::BehaviorArgument * <args_0>, AZStd::span<AZ::BehaviorArgument,-1>) Line 684 C++
    EditorLib.dll!AZ::Internal::BehaviorMethodImpl::Call(AZStd::span<AZ::BehaviorArgument,-1> arguments, AZ::BehaviorArgument * result) Line 76 C++
    EditorPythonBindings.Editor.dll!AZ::BehaviorMethod::Call(AZ::BehaviorArgument * arguments, unsigned int numArguments, AZ::BehaviorArgument * result) Line 347   C++
    EditorPythonBindings.Editor.dll!EditorPythonBindings::Call::InvokeBehaviorMethodWithResult(AZ::BehaviorMethod * behaviorMethod, pybind11::args pythonInputArgs, AZ::BehaviorObject self, AZ::BehaviorArgument & result) Line 679    C++
    EditorPythonBindings.Editor.dll!EditorPythonBindings::Call::InvokeBehaviorMethod(AZ::BehaviorMethod * behaviorMethod, pybind11::args pythonInputArgs, AZ::BehaviorObject self) Line 696 C++
    EditorPythonBindings.Editor.dll!EditorPythonBindings::Call::StaticMethod(AZ::BehaviorMethod * behaviorMethod, pybind11::args pythonInputArgs) Line 701  C++
    [Inline Frame] EditorPythonBindings.Editor.dll!EditorPythonBindings::PythonReflectionComponent::ExportGlobalsFromBehaviorContext::__l26::<lambda_2>::operator()(pybind11::args) Line 279    C++
    [Inline Frame] EditorPythonBindings.Editor.dll!pybind11::detail::argument_loader<pybind11::args>::call_impl(EditorPythonBindings::PythonReflectionComponent::ExportGlobalsFromBehaviorContext::__l26::<lambda_2> &) Line 1441   C++
    [Inline Frame] EditorPythonBindings.Editor.dll!pybind11::detail::argument_loader<pybind11::args>::call(EditorPythonBindings::PythonReflectionComponent::ExportGlobalsFromBehaviorContext::__l26::<lambda_2> &) Line 1415    C++
    EditorPythonBindings.Editor.dll!`pybind11::cpp_function::initialize<`EditorPythonBindings::PythonReflectionComponent::ExportGlobalsFromBehaviorContext'::`26'::<lambda_2>,void,pybind11::args,pybind11::name,pybind11::scope,pybind11::sibling>'::`2'::<lambda_3>::operator()(pybind11::detail::function_call & call) Line 249  C++
    EditorPythonBindings.Editor.dll!_Closure_wrapper_322fd32a_250::<lambda_invoker_cdecl>(pybind11::detail::function_call & __p1) Line 167  C++
    EditorPythonBindings.Editor.dll!pybind11::cpp_function::dispatcher(_object * self, _object * args_in, _object * kwargs_in) Line 929 C++
    python310.dll!cfunction_call(_object * func, _object * args, _object * kwargs) Line 544 C
    python310.dll!_PyObject_MakeTpCall(_ts * tstate, _object * callable, _object * const * args, __int64 nargs, _object * keywords) Line 215    C
    [Inline Frame] python310.dll!PyObject_Vectorcall(_object *) Line 123    C
    python310.dll!call_function(_ts * tstate, PyTraceInfo * trace_info, _object * * * pp_stack, __int64 oparg, _object * kwnames) Line 5875 C
    python310.dll!_PyEval_EvalFrameDefault(_ts * tstate, _frame * f, int throwflag) Line 4183   C
    [Inline Frame] python310.dll!_PyEval_EvalFrame(_ts *) Line 46   C
    python310.dll!_PyEval_Vector(_ts * tstate, PyFrameConstructor * con, _object * locals, _object * const * args, unsigned __int64 argcount, _object * kwnames) Line 5072  C
    python310.dll!_PyFunction_Vectorcall(_object * func, _object * const * stack, unsigned __int64 nargsf, _object * kwnames) Line 347  C
    python310.dll!_PyObject_VectorcallTstate(_ts * tstate, _object * callable, _object * const * args, unsigned __int64 nargsf, _object * kwnames) Line 115 C
    [Inline Frame] python310.dll!PyObject_Vectorcall(_object *) Line 123    C
    python310.dll!call_function(_ts * tstate, PyTraceInfo * trace_info, _object * * * pp_stack, __int64 oparg, _object * kwnames) Line 5875 C
    python310.dll!_PyEval_EvalFrameDefault(_ts * tstate, _frame * f, int throwflag) Line 4183   C
    [Inline Frame] python310.dll!_PyEval_EvalFrame(_ts *) Line 46   C
    python310.dll!_PyEval_Vector(_ts * tstate, PyFrameConstructor * con, _object * locals, _object * const * args, unsigned __int64 argcount, _object * kwnames) Line 5072  C
    python310.dll!_PyFunction_Vectorcall(_object * func, _object * const * stack, unsigned __int64 nargsf, _object * kwnames) Line 347  C
    python310.dll!_PyObject_VectorcallTstate(_ts * tstate, _object * callable, _object * const * args, unsigned __int64 nargsf, _object * kwnames) Line 115 C
    [Inline Frame] python310.dll!PyObject_Vectorcall(_object *) Line 123    C
    python310.dll!call_function(_ts * tstate, PyTraceInfo * trace_info, _object * * * pp_stack, __int64 oparg, _object * kwnames) Line 5875 C
    python310.dll!_PyEval_EvalFrameDefault(_ts * tstate, _frame * f, int throwflag) Line 4214   C
    [Inline Frame] python310.dll!_PyEval_EvalFrame(_ts *) Line 46   C
    python310.dll!_PyEval_Vector(_ts * tstate, PyFrameConstructor * con, _object * locals, _object * const * args, unsigned __int64 argcount, _object * kwnames) Line 5072  C
    python310.dll!_PyFunction_Vectorcall(_object * func, _object * const * stack, unsigned __int64 nargsf, _object * kwnames) Line 347  C
    python310.dll!_PyObject_VectorcallTstate(_ts * tstate, _object * callable, _object * const * args, unsigned __int64 nargsf, _object * kwnames) Line 115 C
    [Inline Frame] python310.dll!PyObject_Vectorcall(_object *) Line 123    C
    python310.dll!call_function(_ts * tstate, PyTraceInfo * trace_info, _object * * * pp_stack, __int64 oparg, _object * kwnames) Line 5875 C
    python310.dll!_PyEval_EvalFrameDefault(_ts * tstate, _frame * f, int throwflag) Line 4214   C
    [Inline Frame] python310.dll!_PyEval_EvalFrame(_ts *) Line 46   C
    python310.dll!_PyEval_Vector(_ts * tstate, PyFrameConstructor * con, _object * locals, _object * const * args, unsigned __int64 argcount, _object * kwnames) Line 5072  C
    python310.dll!_PyFunction_Vectorcall(_object * func, _object * const * stack, unsigned __int64 nargsf, _object * kwnames) Line 347  C
    python310.dll!_PyObject_VectorcallTstate(_ts * tstate, _object * callable, _object * const * args, unsigned __int64 nargsf, _object * kwnames) Line 115 C
    [Inline Frame] python310.dll!PyObject_Vectorcall(_object *) Line 123    C
    python310.dll!call_function(_ts * tstate, PyTraceInfo * trace_info, _object * * * pp_stack, __int64 oparg, _object * kwnames) Line 5875 C
    python310.dll!_PyEval_EvalFrameDefault(_ts * tstate, _frame * f, int throwflag) Line 4183   C
    [Inline Frame] python310.dll!_PyEval_EvalFrame(_ts *) Line 46   C
    python310.dll!_PyEval_Vector(_ts * tstate, PyFrameConstructor * con, _object * locals, _object * const * args, unsigned __int64 argcount, _object * kwnames) Line 5072  C
    python310.dll!PyEval_EvalCode(_object * co, _object * globals, _object * locals) Line 1135  C
    python310.dll!run_eval_code_obj(_ts * tstate, PyCodeObject * co, _object * globals, _object * locals) Line 1292 C
    python310.dll!run_mod(_mod * mod, _object * filename, _object * globals, _object * locals, PyCompilerFlags * flags, _arena * arena) Line 1313   C
    python310.dll!pyrun_file(_iobuf * fp, _object * filename, int start, _object * globals, _object * locals, int closeit, PyCompilerFlags * flags) Line 1208   C
    python310.dll!_PyRun_SimpleFileObject(_iobuf * fp, _object * filename, int closeit, PyCompilerFlags * flags) Line 456   C
    python310.dll!PyRun_SimpleFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 490    C
    EditorPythonBindings.Editor.dll!EditorPythonBindings::PythonSystemComponent::EvaluateFile(AZStd::basic_string_view<char,AZStd::char_traits<char>> filename, const AZStd::vector<AZStd::basic_string_view<char,AZStd::char_traits<char>>,AZStd::allocator> & args) Line 820  C++
    EditorPythonBindings.Editor.dll!EditorPythonBindings::PythonSystemComponent::ExecuteByFilenameWithArgs(AZStd::basic_string_view<char,AZStd::char_traits<char>> filename, const AZStd::vector<AZStd::basic_string_view<char,AZStd::char_traits<char>>,AZStd::allocator> & args) Line 749 C++
    EditorPythonBindings.Editor.dll!EditorPythonBindings::PythonSystemComponent::ExecuteByFilename(AZStd::basic_string_view<char,AZStd::char_traits<char>> filename) Line 731   C++
    [Inline Frame] EditorLib.dll!AZStd::Internal::INVOKE(bool(AzToolsFramework::EditorPythonRunnerRequests::*)(AZStd::basic_string_view<char,AZStd::char_traits<char>>) &&) Line 177    C++
    [Inline Frame] EditorLib.dll!AZStd::invoke(bool(AzToolsFramework::EditorPythonRunnerRequests::*)(AZStd::basic_string_view<char,AZStd::char_traits<char>>) &&) Line 54   C++
    [Inline Frame] EditorLib.dll!AZ::EBusEventProcessingPolicy::Call(bool(AzToolsFramework::EditorPythonRunnerRequests::*)(AZStd::basic_string_view<char,AZStd::char_traits<char>>) &&) Line 437    C++
    EditorLib.dll!AZ::Internal::EBusContainer<AzToolsFramework::EditorPythonRunnerRequests,AzToolsFramework::EditorPythonRunnerRequests,0,0>::Dispatcher<AZ::EBus<AzToolsFramework::EditorPythonRunnerRequests,AzToolsFramework::EditorPythonRunnerRequests>>::Broadcast<bool (__cdecl AzToolsFramework::EditorPythonRunnerRequests::*)(AZStd::basic_string_view<char,AZStd::char_traits<char>>),char const *>(bool(AzToolsFramework::EditorPythonRunnerRequests::*)(AZStd::basic_string_view<char,AZStd::char_traits<char>>) && func, const char * && <args_0>) Line 1541  C++
    EditorLib.dll!`anonymous namespace'::PyRunFile(const AZStd::fixed_vector<AZStd::basic_string_view<char,AZStd::char_traits<char>>,64> & args) Line 51    C++
    EditorLib.dll!AZ::Console::DispatchCommand(AZStd::basic_string_view<char,AZStd::char_traits<char>> command, const AZStd::fixed_vector<AZStd::basic_string_view<char,AZStd::char_traits<char>>,64> & inputs, AZ::ConsoleSilentMode silentMode, AZ::ConsoleInvokedFrom invokedFrom, AZ::ConsoleFunctorFlags requiredSet, AZ::ConsoleFunctorFlags requiredClear) Line 482  C++
    EditorLib.dll!AZ::Console::PerformCommand(AZStd::basic_string_view<char,AZStd::char_traits<char>> command, const AZStd::fixed_vector<AZStd::basic_string_view<char,AZStd::char_traits<char>>,64> & commandArgs, AZ::ConsoleSilentMode silentMode, AZ::ConsoleInvokedFrom invokedFrom, AZ::ConsoleFunctorFlags requiredSet, AZ::ConsoleFunctorFlags requiredClear) Line 113  C++
    EditorLib.dll!AZ::Console::PerformCommand(const char * command, AZ::ConsoleSilentMode silentMode, AZ::ConsoleInvokedFrom invokedFrom, AZ::ConsoleFunctorFlags requiredSet, AZ::ConsoleFunctorFlags requiredClear) Line 83   C++
    CrySystem.dll!AzConsoleToCryConsoleBinder::OnInvoke(IConsoleCmdArgs * args) Line 575    C++
    CrySystem.dll!CXConsole::ExecuteCommand(CConsoleCommand & cmd, AZStd::basic_string<char,AZStd::char_traits<char>,AZStd::allocator> & str, bool bIgnoreDevMode) Line 2074    C++
    CrySystem.dll!CXConsole::ExecuteStringInternal(const char * command, const bool bFromConsole, const bool bSilentMode) Line 1909 C++
    CrySystem.dll!CXConsole::ExecuteString(const char * command, bool bSilentMode, bool bDeferExecution) Line 1720  C++
    EditorLib.dll!ConsoleLineEdit::keyPressEvent(QKeyEvent * ev) Line 232   C++
    [External Code] 
    EditorLib.dll!ConsoleLineEdit::event(QEvent * ev) Line 204  C++
    [External Code] 
    EditorLib.dll!CryEditMain(int argc, char * * argv) Line 4029    C++
    [Inline Frame] Editor.exe!AZStd::Internal::INVOKE(int(*)(int, char * *) &) Line 208 C++
    [Inline Frame] Editor.exe!AZStd::invoke(int(*)(int, char * *) &) Line 54    C++
    Editor.exe!main(int argc, char * * argv) Line 31    C++
    Editor.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 97   C++
    [External Code] 

Found in Branch development

Commit ID from o3de/o3de Repository 34fb934012c2d874019ba257c436815d6f1c80f2

jckand commented 1 year ago

It appears this can be more easily reproduced by doing the following:

  1. Create a new level in the Editor (with DPE Inspector enabled)
  2. Expand the Default Level Environment entity hierarchy.
  3. Select the "Camera" entity.
  4. Select the "Sun" entity.
>   EditorLib.dll!AZStd::intrusive_multiset<AZ::Internal::HandlerNode<AZ::TickEvents,AZ::TickEvents,AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::HandlerHolder,0>,AZStd::intrusive_multiset_base_hook<AZ::Internal::HandlerNode<AZ::TickEvents,AZ::TickEvents,AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::HandlerHolder,0>>,AZ::Internal::HandlerCompare<AZ::TickEvents,AZ::TickEvents,AZ::TickEvents::BusHandlerOrderCompare>>::const_iterator_impl::PredOrSucc(const AZ::Internal::HandlerNode<AZ::TickEvents,AZ::TickEvents,AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::HandlerHolder,0> * node, int side) Line 250   C++
    [Inline Frame] EditorLib.dll!AZStd::intrusive_multiset<AZ::Internal::HandlerNode<AZ::TickEvents,AZ::TickEvents,AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::HandlerHolder,0>,AZStd::intrusive_multiset_base_hook<AZ::Internal::HandlerNode<AZ::TickEvents,AZ::TickEvents,AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::HandlerHolder,0>>,AZ::Internal::HandlerCompare<AZ::TickEvents,AZ::TickEvents,AZ::TickEvents::BusHandlerOrderCompare>>::iterator_impl::operator++(int) Line 304  C++
    EditorLib.dll!AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::Dispatcher<AZ::EBus<AZ::TickEvents,AZ::TickEvents>>::Broadcast<void (__cdecl AZ::TickEvents::*)(float,AZ::ScriptTimePoint),float const &,AZ::ScriptTimePoint>(void(AZ::TickEvents::*)(float, AZ::ScriptTimePoint) && func, const float & <args_0>, AZ::ScriptTimePoint && <args_1>) Line 1365 C++
    EditorLib.dll!AZ::ComponentApplication::Tick() Line 1511    C++
    EditorLib.dll!CGameEngine::Update() Line 812    C++
    EditorLib.dll!CCryEditApp::IdleProcessing(bool bBackgroundUpdate) Line 2365 C++
    EditorLib.dll!CCryEditApp::OnIdle(long lCount) Line 2262    C++
    EditorLib.dll!Editor::EditorQtApplication::maybeProcessIdle() Line 320  C++
    [External Code] 
    EditorLib.dll!CryEditMain(int argc, char * * argv) Line 4029    C++
    [Inline Frame] Editor.exe!AZStd::Internal::INVOKE(int(*)(int, char * *) &) Line 208 C++
    [Inline Frame] Editor.exe!AZStd::invoke(int(*)(int, char * *) &) Line 54    C++
    Editor.exe!main(int argc, char * * argv) Line 31    C++
    Editor.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 97   C++
    [External Code] 
alexmontAmazon commented 1 year ago

fixed some time ago.