Skip to content

Add missing initialization on document load in Graph Editor#2795

Merged
jstone-lucasfilm merged 1 commit intoAcademySoftwareFoundation:mainfrom
kwokcb:file_load_crash
Mar 2, 2026
Merged

Add missing initialization on document load in Graph Editor#2795
jstone-lucasfilm merged 1 commit intoAcademySoftwareFoundation:mainfrom
kwokcb:file_load_crash

Conversation

@kwokcb
Copy link
Contributor

@kwokcb kwokcb commented Mar 2, 2026

Fixes

Fixes: #2794.
There are references to the previous MaterialX documents on file load

Change

  • Clear _currUiNode : Would hold onto to last selection if any. This seems the root cause of the property editor crash.
  • Clear _currRenderNode : Should also be cleared to prevent trying to render last node. This seems to also fix having extra renders when load and select nodegraph.

_currUiNode may hold onto to last selection.
_currRenderNode should also be cleared to prevent trying to render last node. (should also remove extra render when load and select nodegraph).
@kwokcb
Copy link
Contributor Author

kwokcb commented Mar 2, 2026

@jstone-lucasfilm . Maybe this is due to recent refactoring ? Anyways this should make it safe in general now as no data members should hold on to previous MTLX data.

Copy link
Member

@jstone-lucasfilm jstone-lucasfilm left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix, @kwokcb, and this looks good to me.

Going forward, we should likely refactor the new/load/reload helper methods in the Graph Editor to use clearGraph consistently, but your proposal is a good step for now.

@jstone-lucasfilm jstone-lucasfilm changed the title GraphEditor : Add missing initializations on document load Add missing initialization on document load in Graph Editor Mar 2, 2026
@jstone-lucasfilm jstone-lucasfilm merged commit 6ee8ffa into AcademySoftwareFoundation:main Mar 2, 2026
33 checks passed
@kwokcb kwokcb deleted the file_load_crash branch March 2, 2026 18:25
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

Successfully merging this pull request may close these issues.

GraphEditor : Crashes on document open after nodegraph change

2 participants