Skip to content

Conversation

@mjkkirschner
Copy link
Member

@mjkkirschner mjkkirschner commented Aug 15, 2022

Purpose

Dynamo crashes when LibG is not loaded and a direct manipulator is created.
https://jira.autodesk.com/browse/DYN-5023

  • check that node output is not null or a function - if so, just return before trying to create any direct manipulators.
  • inside of the direct manipulation extension startup code, just return if IsASMLoaded is false.
  • Note that I do think this IsASMLoaded is accurate in all situations, it seems to really only be set in CLI or sandbox startup - but thats probably sufficient since in-process hosts preload ASM themselves in most cases.

Screen Shot 2022-08-15 at 3 00 59 PM

I will send another PR with a test - want to get this in first.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Release Notes

Fixed crash when node was moved which was going to create direct manipulator.

Reviewers

@mjkkirschner mjkkirschner changed the title wrap libg use in try catch wrap direct manipulator libg use in try catch Aug 15, 2022
Copy link
Contributor

@sm6srw sm6srw left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@aparajit-pratap aparajit-pratap left a comment

Choose a reason for hiding this comment

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

@mjkkirschner can we prevent loading the DM view extension altogether if ASM fails to preload? I think @QilongTang did this for the guided tour, if I'm not wrong.

dont startup or call loaded on dm extension if asm not loaded
@mjkkirschner mjkkirschner changed the title wrap direct manipulator libg use in try catch don't initialize the direct manipulation extension when asm is not loaded Aug 15, 2022
@mjkkirschner
Copy link
Member Author

thanks @aparajit-pratap for correcting my misunderstanding here - I attempted to resolve both suggestions you gave.

@mjkkirschner
Copy link
Member Author

mjkkirschner commented Aug 15, 2022


public void Loaded(ViewLoadedParams viewLoadedParams)
{
if (!viewLoadedParams.StartupParams.IsGeometryLibraryLoaded)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need the IsGeometryLibraryLoaded check in both Startup and Loaded functions?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, I'd like to avoid partially initializing as much as possible.

@mjkkirschner mjkkirschner merged commit 753d4ec into DynamoDS:master Aug 15, 2022
@mjkkirschner mjkkirschner deleted the crashnogeo branch August 15, 2022 21:31
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.

4 participants