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

Crash report from Dynamo 2.19.3.6394 - UnwrapElement() #15569

Open
Aaron12Powers opened this issue Oct 24, 2024 · 4 comments
Open

Crash report from Dynamo 2.19.3.6394 - UnwrapElement() #15569

Aaron12Powers opened this issue Oct 24, 2024 · 4 comments
Labels

Comments

@Aaron12Powers
Copy link

Aaron12Powers commented Oct 24, 2024

Issue Description

Please fill in the following information to help us reproduce the issue:
Revit/Dynamo Fully crashing (Without crash window or any form of warning) when passing custom class instances into "UnwrapElement()" within a Python Script Node running the CPython3 engine

For years, Ive handled Python Node Inputs by running everything through a "UnwrapElement()" method as a sort of catch all (probably not the best practice admittedly). This never caused issues and I've assumed it functioned as a passthrough if the arguments were not Revit Elements.
This includes, lists, dictionaries, and custom class instances which may contain elements as member properties within them.

The Custom Classes is where I believe things have changed. Whenever I pass in an instance of a custom class dynamo spins for ~10 seconds then completely closes everything associated to the Revit Window.

Dynamo version

Dynamo: 2.19.3.6394

Operating system

OS: Microsoft Windows NT 10.0.19045.0

What did you do?

I passed a custom class instance containing a Revit Element as one of it's properties into the "UnwrapElement()" method

I was able to replicate this very simply with the following code:
`
class TestObj:
def init(self):
self.Name = "Test"

UnwrapElement(TestObj())
`

What did you expect to see?

I expected UnwrapElement to either return the same instance I passed into it with no change, or to throw an argument error from the python node if the argument types have been restricted.

What did you see instead?

Full Revit/Dynamo Crash without error message/window.

What packages or external references (if any) were used?

Python Script Node - CPython3

Stack Trace

No Crash Window was Produced


CLR: 4.0.30319.42000

@avidit avidit added the tracked label Nov 8, 2024 — with Slack
@dynamo-ci-user dynamo-ci-user moved this from Triage to Todo in Dynamo Issues Nov 8, 2024
Copy link
Contributor

avidit commented Nov 8, 2024

tracked internally https://jira.autodesk.com/browse/DYN-7785

@twastvedt
Copy link
Contributor

Hi @Aaron12Powers ! Is unwrapping custom classes something that has worked for you in the past? A different version of Dynamo, or was it in IronPython, same version?

@Aaron12Powers
Copy link
Author

Hey @twastvedt,
I've unwrapped custom classes here and there in the past. I'm not certain that it has ever actually performed the "Unwrap" on the custom class, say if the instance has a list of wrapped elements stored as a member I'm not sure it actually unwraps the elements in that list or anything but it never caused crashing.

These are my results of some limited testing
Code Ran:

class TestObj:
	def init(self):
		self.Name = "Test"

UnwrapElement(TestObj())

Revit 2022 - First year CPython3 was included
Dynamo Core 2.12.1.8246
Dynamo Revit 2.12.1.111.23
IronPython2 - Ran without error
CPython3 - Ran without error

Revit 2024 - Version I typically use day to day
Dynamo Core 2.19.3.6394
Dynamo Revit 2.19.4.13096
IronPython2 - Ran without error
CPython3 - Crashed Revit+Dynamo without error message

@twastvedt
Copy link
Contributor

Thanks for the detail! Yep, I can reproduce that. We'll add it to the list!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

3 participants