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

Script canvas logger can now identify graph and entity names #17912

Merged

Conversation

guillaume-haerinck
Copy link
Contributor

@guillaume-haerinck guillaume-haerinck commented May 12, 2024

What does this PR do?

Work on #9192, #2583, #17643, #10795. Script canvas logger can now show graph names and entity names. Code has been mostly restored to the Lumberyard's state.

GraphInfo class has been moved back to its old state so that it can be serialized (only used by the debugger to send remote messages, make no sense to hold a ptr to execution state there)

There are two things which still needs to be done to have all of the functionnalities back:

inaction.mp4

How was this PR tested?

Locally against the newspaper sample project, with multiple graphs

@guillaume-haerinck guillaume-haerinck requested a review from a team as a code owner May 12, 2024 07:58
Copy link
Contributor

@lsemp3d lsemp3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work, thank you for taking it on!

@guillaume-haerinck
Copy link
Contributor Author

Some context for future ref about the focus issue :
In GraphSerialization.cpp, on graph open and graph save done via Deserialize(), all of the node Ids are randomized via MakeGraphComponentEntityIdsUnique(). If I disable this behavior and grab the graph I'm able to have a match between my debugger nodeIds and the runtime graph nodeIds, (and focus works after that).

Fix will be to track these remapped IDs and get them on demand, as it was possible before.

@spham-amzn
Copy link
Contributor

Looks like a legit n AR failure:

[2024-05-12T15:26:47.430Z] /usr/bin/clang++-12 -DAZ_BUILD_CONFIGURATION_TYPE=\"profile\" -DAZ_ENABLE_DEBUG_TOOLS -DAZ_ENABLE_TRACING -DAZ_PROFILE_BUILD -DENABLE_EXTENDED_MATH_SUPPORT=0 -DLINUX -DLINUX64 -DNDEBUG -DSCRIPTCANVAS -DSCRIPTCANVAS_ERRORS_ENABLED -DSC_EXECUTION_TRACE_ENABLED -D_FORTIFY_SOURCE=2 -D_HAS_EXCEPTIONS=0 -D_PROFILE -D__linux__ -DCMAKE_INTDIR=\"profile\" -I/data/workspace/o3de/Gems/ScriptCanvas/Code/. -I/data/workspace/o3de/Gems/ScriptCanvas/Code/Include -I/data/workspace/o3de/Gems/ScriptCanvas/Code/Include/ScriptCanvas -I/data/workspace/o3de/build/linux/External/ScriptCanvas-8caffd05/Code/Azcg/Generated/ScriptCanvas.API -I/data/workspace/o3de/Code/Framework/AzCore/. -I/data/workspace/o3de/Code/Framework/AzCore/Platform/Linux -I/data/workspace/o3de/Code/Framework/AzCore/Platform/Common -I/data/workspace/o3de/Code/Framework/AzFramework/. -I/data/workspace/o3de/Code/Framework/AzFramework/Platform/Linux -I/data/workspace/o3de/Code/Framework/AzNetworking/. -I/data/workspace/o3de/Code/Framework/AzNetworking/Platform/Common -I/data/workspace/o3de/Code/Framework/AzNetworking/Platform/Linux -I/data/workspace/o3de/build/linux/Code/Framework/AzNetworking/Azcg/Generated/AzNetworking -I/data/workspace/o3de/Gems/ScriptEvents/Code/Include -I/data/workspace/o3de/Gems/ExpressionEvaluation/Code/Include -isystem /data/workspace/3rdParty/packages/Lua-5.4.4-rev1-linux/Lua/include -isystem /data/workspace/3rdParty/packages/RapidJSON-1.1.0-rev1-multiplatform/RapidJSON/include -isystem /data/workspace/3rdParty/packages/RapidXML-1.13-rev1-multiplatform/RapidXML/include -isystem /data/workspace/3rdParty/packages/zlib-1.2.11-rev5-linux/zlib/include -isystem /data/workspace/3rdParty/packages/cityhash-1.1-multiplatform/cityhash/src -isystem /data/workspace/3rdParty/packages/lz4-1.9.4-rev2-linux/lz4/include -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Wno-inconsistent-missing-override -Wrange-loop-analysis -Wno-unknown-warning-option -Wno-parentheses -Wno-reorder -Wno-switch -Wno-undefined-var-template -msse4.1  -O2 -g -fstack-protector-all -fstack-check -fPIC -std=c++17 -MD -MT External/ScriptCanvas-8caffd05/Code/CMakeFiles/ScriptCanvas.API.dir/profile/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp.o -MF External/ScriptCanvas-8caffd05/Code/CMakeFiles/ScriptCanvas.API.dir/profile/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp.o.d -o External/ScriptCanvas-8caffd05/Code/CMakeFiles/ScriptCanvas.API.dir/profile/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp.o -c /data/workspace/o3de/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp

[2024-05-12T15:26:47.430Z] /data/workspace/o3de/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp:204:31: error: unused variable 'subgraphId' [-Werror,-Wunused-variable]

[2024-05-12T15:26:47.430Z]             AZ::Data::AssetId subgraphId = AZ::Data::AssetId::CreateString(assetIdString);

[2024-05-12T15:26:47.430Z]                               ^

@guillaume-haerinck
Copy link
Contributor Author

Looks like a legit n AR failure:

[2024-05-12T15:26:47.430Z] /usr/bin/clang++-12 -DAZ_BUILD_CONFIGURATION_TYPE=\"profile\" -DAZ_ENABLE_DEBUG_TOOLS -DAZ_ENABLE_TRACING -DAZ_PROFILE_BUILD -DENABLE_EXTENDED_MATH_SUPPORT=0 -DLINUX -DLINUX64 -DNDEBUG -DSCRIPTCANVAS -DSCRIPTCANVAS_ERRORS_ENABLED -DSC_EXECUTION_TRACE_ENABLED -D_FORTIFY_SOURCE=2 -D_HAS_EXCEPTIONS=0 -D_PROFILE -D__linux__ -DCMAKE_INTDIR=\"profile\" -I/data/workspace/o3de/Gems/ScriptCanvas/Code/. -I/data/workspace/o3de/Gems/ScriptCanvas/Code/Include -I/data/workspace/o3de/Gems/ScriptCanvas/Code/Include/ScriptCanvas -I/data/workspace/o3de/build/linux/External/ScriptCanvas-8caffd05/Code/Azcg/Generated/ScriptCanvas.API -I/data/workspace/o3de/Code/Framework/AzCore/. -I/data/workspace/o3de/Code/Framework/AzCore/Platform/Linux -I/data/workspace/o3de/Code/Framework/AzCore/Platform/Common -I/data/workspace/o3de/Code/Framework/AzFramework/. -I/data/workspace/o3de/Code/Framework/AzFramework/Platform/Linux -I/data/workspace/o3de/Code/Framework/AzNetworking/. -I/data/workspace/o3de/Code/Framework/AzNetworking/Platform/Common -I/data/workspace/o3de/Code/Framework/AzNetworking/Platform/Linux -I/data/workspace/o3de/build/linux/Code/Framework/AzNetworking/Azcg/Generated/AzNetworking -I/data/workspace/o3de/Gems/ScriptEvents/Code/Include -I/data/workspace/o3de/Gems/ExpressionEvaluation/Code/Include -isystem /data/workspace/3rdParty/packages/Lua-5.4.4-rev1-linux/Lua/include -isystem /data/workspace/3rdParty/packages/RapidJSON-1.1.0-rev1-multiplatform/RapidJSON/include -isystem /data/workspace/3rdParty/packages/RapidXML-1.13-rev1-multiplatform/RapidXML/include -isystem /data/workspace/3rdParty/packages/zlib-1.2.11-rev5-linux/zlib/include -isystem /data/workspace/3rdParty/packages/cityhash-1.1-multiplatform/cityhash/src -isystem /data/workspace/3rdParty/packages/lz4-1.9.4-rev2-linux/lz4/include -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Wno-inconsistent-missing-override -Wrange-loop-analysis -Wno-unknown-warning-option -Wno-parentheses -Wno-reorder -Wno-switch -Wno-undefined-var-template -msse4.1  -O2 -g -fstack-protector-all -fstack-check -fPIC -std=c++17 -MD -MT External/ScriptCanvas-8caffd05/Code/CMakeFiles/ScriptCanvas.API.dir/profile/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp.o -MF External/ScriptCanvas-8caffd05/Code/CMakeFiles/ScriptCanvas.API.dir/profile/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp.o.d -o External/ScriptCanvas-8caffd05/Code/CMakeFiles/ScriptCanvas.API.dir/profile/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp.o -c /data/workspace/o3de/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp

[2024-05-12T15:26:47.430Z] /data/workspace/o3de/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp:204:31: error: unused variable 'subgraphId' [-Werror,-Wunused-variable]

[2024-05-12T15:26:47.430Z]             AZ::Data::AssetId subgraphId = AZ::Data::AssetId::CreateString(assetIdString);

[2024-05-12T15:26:47.430Z]                               ^

That's weird the line is commented out, maybe you got the report from the old build

@guillaume-haerinck
Copy link
Contributor Author

Yeah if you check the last report attached, it failed because of a timeout on linux build, but android passed

@byrcolin byrcolin added the sig/content Categorizes an issue or PR as relevant to SIG Content. label May 14, 2024
@guillaume-haerinck guillaume-haerinck changed the base branch from development to stabilization/2409 May 19, 2024 19:35
@guillaume-haerinck
Copy link
Contributor Author

Now targeting stabilization branch

@lsemp3d lsemp3d merged commit 5a896bd into o3de:stabilization/2409 May 25, 2024
3 checks passed
@guillaume-haerinck guillaume-haerinck deleted the scriptcanvas-logger branch May 26, 2024 07:27
nick-l-o3de pushed a commit to nick-l-o3de/o3de that referenced this pull request Sep 9, 2024
)

* Script canvas logger can now identify graph and entity names

Signed-off-by: guillaume-haerinck <[email protected]>

* Init remote tools later to prevent timing issues

Signed-off-by: guillaume-haerinck <[email protected]>

---------

Signed-off-by: guillaume-haerinck <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>
nick-l-o3de added a commit that referenced this pull request Sep 16, 2024
…8300)

Cherry pick unmerged fixes from stabilization/2409 to development

* Script canvas logger can now identify graph and entity names (#17912)
* Script canvas logger can now identify graph and entity names
* Init remote tools later to prevent timing issues

Signed-off-by: guillaume-haerinck <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Fix density map on Vulkan Android (#18022)

Signed-off-by: Akio Gaule <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Change default disk type to gp3 (#17966)

Signed-off-by: Mike Chang <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Fix unparent prefab entities (#18073)

* Fixes issue where invalid parenting can be done via inspector

Fixes Issue #16541
Fixes Issue #18052

Makes it so that you MUST use the entity outliner to modify
parenting of entities.  This prevents a whole series of issues
related to parenting that already has a ton of code written
in the outliner to prevent various side effects and issues.

Signed-off-by: Nicholas Lawson <[email protected]>

* Further fixes for the ScriptCanvas debugging facilities (#18145)
* Keep scriptcanvas and compiled files entity UIDs in sync and fix node focus on trace click
* Add notes for future fix
* Remove useless check

Signed-off-by: guillaume-haerinck <[email protected]>

Signed-off-by: Nicholas Lawson <[email protected]>

* Fix locale-dependent data files (#18171)

* Fix for locale-dependent data files being read/written
Fixes a variety of issues related to having a locale set on the machine
that uses the comma as the decimal separator.

Fix for locale-dependent data files being read/written
Fixes a variety of issues related to having a locale set on the machine that uses the comma as the decimal separator.

Two main approaches

    For AssetBuilder, always set, globally in the entire application and thus all builders, the "C" locale, which is the culture invariant locale
    For all other applications, create a PALified scoped thread-local locale setter that can be scoped around the parts where files are read or numbers are converted, then add it around all those sensitive places.
        ObjectStream read and write
        Json didn't need handling, as rapidjson already uses a culture invariant number formatter
        Script Canvas read and write (including LUA generation)
        LUA execution (lua will actually fail to work right if its not in the invariant locale)
        Console variable execution (since it comes from a cfg file and that can be considered portable and invariant)
        Added a new test for objectstream that verifies that the invariant locale is working backwards and forwards.
        Added a JSON test that verifies the same.

result: Fixes issue #11139 and also issue #10987 and also issue #11680 and any similar that are to do with loading and saving.

Testing

Reproduced the issues in the above one before fixing it, they work fine after this fix.

Signed-off-by: Nicholas Lawson <[email protected]>

* Export Button Fixes (#18220)

* export button fixes pass 1

Signed-off-by: T.J. Kotha <[email protected]>

* Update scripts/o3de/o3de/export_project.py

Co-authored-by: Gene Walters <[email protected]>
Signed-off-by: T.J. Kotha <[email protected]>

---------

Signed-off-by: T.J. Kotha <[email protected]>
Co-authored-by: Gene Walters <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* fixing export button to not affect build indicator, and to show exported files in the end (#18233)

* fixing post launcher button to not affect build indicator, and to show exported files in the end

Signed-off-by: T.J. Kotha <[email protected]>

* addressing feedback round 1

Signed-off-by: T.J. Kotha <[email protected]>

* addressing feedback round 2

Signed-off-by: T.J. Kotha <[email protected]>

---------

Signed-off-by: T.J. Kotha <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Allow to disable mouse capture in Editor (#18209)

Signed-off-by: Michał Pełka <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Prevent crash when articulation is created without Physics Scene (#18215)

Signed-off-by: Michał Pełka <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Add monolithic assets that were missing from the Linux installer (#18251)

Signed-off-by: Steve Pham <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Adjusment to error message with incompatible components activation (#18253)

Signed-off-by: Michał Pełka <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Adjust DiffuseProbeGrid to prevent multiple SRG compilations (#18254)

Signed-off-by: Michał Pełka <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Fix asset browser freeze and crash when repeatedly searching. (#18249)

* Fix asset browser freeze and crash when repeatedly searching.

Fixes issue #18051

This was caused by a number of asynchronous things happening
when searches were being performed.  The main problem was actually
a series of out of order operations where, for example, the search
criteria changed before the view was ready to switch between search
and non-search.

This also has a side effect of reducing the flicker when thumbnails
are updating, and speeds up the search process significantly.

It also fixes an unreported bug where repeatedly searching then clearing
the search would result in the table view not updating and being blank.

Signed-off-by: Nicholas Lawson <[email protected]>

* Update Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.cpp

Co-authored-by: Steve Pham <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Fixes one of the automated tests

Signed-off-by: Nicholas Lawson <[email protected]>

---------

Signed-off-by: Nicholas Lawson <[email protected]>
Co-authored-by: Steve Pham <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

---------

Signed-off-by: guillaume-haerinck <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>
Signed-off-by: Akio Gaule <[email protected]>
Signed-off-by: Mike Chang <[email protected]>
Signed-off-by: T.J. Kotha <[email protected]>
Signed-off-by: Michał Pełka <[email protected]>
Signed-off-by: Steve Pham <[email protected]>
Co-authored-by: Guillaume Haerinck <[email protected]>
Co-authored-by: Akio Gaule <[email protected]>
Co-authored-by: Mike Chang <[email protected]>
Co-authored-by: T.J. Kotha <[email protected]>
Co-authored-by: Gene Walters <[email protected]>
Co-authored-by: mp <[email protected]>
Co-authored-by: Steve Pham <[email protected]>
nick-l-o3de pushed a commit to nick-l-o3de/o3de that referenced this pull request Sep 30, 2024
)

* Script canvas logger can now identify graph and entity names

Signed-off-by: guillaume-haerinck <[email protected]>

* Init remote tools later to prevent timing issues

Signed-off-by: guillaume-haerinck <[email protected]>

---------

Signed-off-by: guillaume-haerinck <[email protected]>
nick-l-o3de pushed a commit to nick-l-o3de/o3de that referenced this pull request Sep 30, 2024
)

* Script canvas logger can now identify graph and entity names

Signed-off-by: guillaume-haerinck <[email protected]>

* Init remote tools later to prevent timing issues

Signed-off-by: guillaume-haerinck <[email protected]>

---------

Signed-off-by: guillaume-haerinck <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>
nick-l-o3de pushed a commit to nick-l-o3de/o3de that referenced this pull request Oct 15, 2024
)

* Script canvas logger can now identify graph and entity names

Signed-off-by: guillaume-haerinck <[email protected]>

* Init remote tools later to prevent timing issues

Signed-off-by: guillaume-haerinck <[email protected]>

---------

Signed-off-by: guillaume-haerinck <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>
nick-l-o3de added a commit that referenced this pull request Oct 18, 2024
* Script canvas logger can now identify graph and entity names (#17912)

* Script canvas logger can now identify graph and entity names

Signed-off-by: guillaume-haerinck <[email protected]>

* Init remote tools later to prevent timing issues

Signed-off-by: guillaume-haerinck <[email protected]>

---------

Signed-off-by: guillaume-haerinck <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Further fixes for the ScriptCanvas debugging facilities (#18145)

* Keep scriptcanvas and compiled files entity UIDs in sync and fix node focus on trace click

Signed-off-by: guillaume-haerinck <[email protected]>

* Add notes for future fix

Signed-off-by: guillaume-haerinck <[email protected]>

* Remove useless check

Signed-off-by: guillaume-haerinck <[email protected]>

---------

Signed-off-by: guillaume-haerinck <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

* Fixes a crash if you enable Script canvas developer Gem (#18328)

Fix issue #17572

Signed-off-by: Nicholas Lawson <[email protected]>

* Fixes a crash when you try to remove elements from unordered set. (#18352)

Fixes issue #18348

The function that it depended on was simply not implemented.
While it is not ideal for it to walk the memory linearly when
removing an element from a set, it's still worth implementing for
cases where the set is being used in a way that relies on indices,
which is the case for the UI.

Signed-off-by: Nicholas Lawson <[email protected]>

* Fix crash after leaving picking mode (#18366)

fixes issue #18365

The hook to register and unregister actions happens once during startup,
and is not meant to have any connection to the lifetime of the objects.

The crash was happening because the EditorTransformComponentSelection
object was being destroyed and recreated every time you enter pick mode,
but its action registration captured its 'this' pointer.

usually, such action registration would be placed inside some kind of long
lived singleton "manager" object, aka a system component, but in this case,
it was put in an ephemeral object.  note that this is still a singleton
object, there is only ever one of it, and it is essentially the "manager",
its just special in that sometimes, it does not exist.

to fix this with as little "splash damage" as possible, I kept most
of the code exactly as-is, without modifying any other classes,
but I made the action registration happen in a static function with
no "this" pointer, which means the compiler could find every illegal
instance.

I added a simple AZ::Environment based singleton pattern in there to get
the current instance when available.  This is also an attempt to keep
the "Blast radius" of this change as small as possible, as this is a
well-used pattern and bypasses any chance of there being weird
dll-related issues.

Signed-off-by: Nicholas Lawson <[email protected]>

* Revert "Fix hyper-sensitve camera rotation remote clients (#18354)" (#18368)

Signed-off-by: Nicholas Lawson <[email protected]>

* Update O3DE Splash Screen background (#18372)

Signed-off-by: Steve Pham <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>

---------

Signed-off-by: guillaume-haerinck <[email protected]>
Signed-off-by: Nicholas Lawson <[email protected]>
Signed-off-by: Steve Pham <[email protected]>
Co-authored-by: Guillaume Haerinck <[email protected]>
Co-authored-by: Steve Pham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/content Categorizes an issue or PR as relevant to SIG Content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants