DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.72k stars 633 forks source link

Problem with Code Block #12343

Closed chuongmep closed 2 years ago

chuongmep commented 2 years ago

Problem with code block when save to new file and open file again, Code Block can create new, but it is not correct.

Dynamo version

2.14.0.3326

Operating system

Windows 10 20H2 19042.1165

What did you do?

qRWRKbS4fq File attach: OpenXm.zip

github-actions[bot] commented 2 years ago

Hello chuongmep, thank you for submitting this issue! We are super excited that you want to help us make Dynamo all that it can be. However, we need some more information in order for the Dynamo team to investigate any further.

Can you please fill in the following to the best of your ability:

Additional information:

QilongTang commented 2 years ago

@chuongmep Can you provide more detailed steps to reproduce the issue? I cant seem to reproduce. I am guessing you cant create more code blocks in the file just saved but not able to reproduce the issue

chuongmep commented 2 years ago

@QilongTang Some step by step with me:

https://user-images.githubusercontent.com/31106432/144212562-dc5b8d6d-2f97-44e1-8ad3-2142d106801c.mp4

Amoursol commented 2 years ago

Hello @chuongmep - I've tried your steps and cannot reproduce. Is there anything else special about your set-up?

https://user-images.githubusercontent.com/12857357/144301719-e5d2f719-8bb3-4959-bd2b-8d86ebb44797.mov

chuongmep commented 2 years ago

Dynamo log started 2021-12-02 01:27:19Z Python template set to default. Requesting version update info... Dynamo -- Build 2.14.0.3326 System.InvalidOperationException: There already exists an AlsoKnownAs mapping for DSCoreNodesUI.Logic.If.

System.InvalidOperationException: There already exists an AlsoKnownAs mapping for If.

Duplicate migration type registered for SunPathDirection The folder 'E:\API\Dynamo\Dynamo\bin\AnyCPU\Debug\Built-In Packages\Packages' does not exist IronPythonExtension (id: D7B449D7-4D54-47EF-B742-30C7BEDFBE92) extension is added Dynamo will use the package manager server at : https://www.dynamopackages.com The folder 'E:\API\Dynamo\Dynamo\bin\AnyCPU\Debug\Built-In Packages\Packages' does not exist DynamoPackageManager (id: FCABC211-D56B-4109-AF18-F434DFE48139) extension is added Backup files timer is started with an interval of 60000 milliseconds Failed to call Ready() in extension: RENDER : Rendering Tier: 2 RENDER : Pixel Shader 3 Supported: True RENDER : Pixel Shader 4 Supported: False RENDER : Software Effect Rendering Supported: True RENDER : Maximum hardware texture size: 16384,16384 Searching for: "string", [Entries:908, Tags:2692] : 15ms -> 20 Searching for: "number slider", [Entries:908, Tags:2692] : 14ms -> 1 Searching for: "integer slider", [Entries:908, Tags:2692] : 14ms -> 1 Searching for: "number", [Entries:908, Tags:2692] : 4ms -> 20 Searching for: "boolean", [Entries:908, Tags:2692] : 3ms -> 20 Searching for: "watch", [Entries:908, Tags:2692] : 2ms -> 3 Searching for: "watch 3d", [Entries:908, Tags:2692] : 8ms -> 1 Searching for: "python script", [Entries:908, Tags:2692] : 13ms -> 2 Documentation Browser (id: 68B45FC0-0BD1-435C-BF28-B97CB03C71C8) view extension is added DynamoManipulationExtension (id: 58B0496A-E3F8-43D9-86D2-94823D1D0F98) view extension is added Properties (id: 28992e1d-abb9-417f-8b1b-05e053bee670) view extension is added LibraryUI - MSWebBrowser (id: 63cd0755-4a36-4670-ae89-b68e772633c4) view extension is added Graph Status (id: 3467481b-d20d-4918-a454-bf19fc5c25d7) view extension is added Notifications (id: ef6cd025-514f-44cd-b6b1-69d9f5cce004) view extension is added Package Dependency ViewExtension (id: A6706BF5-11C2-458F-B7C8-B745A77EF7FD) view extension is added Package Details (id: C71CA1B9-BF9F-425A-A12C-53DF56770406) view extension is added PackageManagerViewExtension (id: 100f5ec3-fde7-4205-80a7-c968b3a5a27b) view extension is added Python Migration (id: 1f8146d0-58b1-4b3c-82b7-34a3fab5ac5d) view extension is added Could not add a duplicate of Workspace References (id: A6706BF5-11C2-458F-B7C8-B745A77EF7FD)

Welcome to Dynamo! 00:00:00.6304201 elapsed for loading Dynamo main window. Browser Loaded Dynamo is up to date. Searching for: "string", [Entries:908, Tags:2692] : 4ms -> 20 Searching for: "number slider", [Entries:908, Tags:2692] : 14ms -> 1 Searching for: "integer slider", [Entries:908, Tags:2692] : 15ms -> 1 Searching for: "number", [Entries:908, Tags:2692] : 3ms -> 20 Searching for: "boolean", [Entries:908, Tags:2692] : 5ms -> 20 Searching for: "watch", [Entries:908, Tags:2692] : 2ms -> 3 Searching for: "watch 3d", [Entries:908, Tags:2692] : 8ms -> 1 Searching for: "python script", [Entries:908, Tags:2692] : 13ms -> 2 Failed to apply NodeViewCustomization for CodeBlockNodeModel System.NullReferenceException: Object reference not set to an instance of an object. at Dynamo.Wpf.Views.CodeHighlightingRuleFactory.CreateClassHighlightRule(EngineController engineController) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditorUtils.cs:line 68 at Dynamo.Wpf.Views.CodeHighlightingRuleFactory.CreateHighlightingRules(TextEditor editor, EngineController controller) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditorUtils.cs:line 143 at Dynamo.UI.Controls.CodeCompletionEditor..ctor(NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeCompletion\CodeCompletionEditor.xaml.cs:line 64 at Dynamo.UI.Controls.CodeBlockEditor..ctor(NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditor.cs:line 65 at Dynamo.Wpf.CodeBlockNodeViewCustomization.CustomizeView(CodeBlockNodeModel model, NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\NodeViewCustomization\NodeViewCustomizations\CodeBlockNodeViewCustomization.cs:line 16 at lambda_method(Closure , NodeModel , NodeView ) at Dynamo.Wpf.NodeViewCustomizationLibrary.TryApplyCustomization(NodeModel model, NodeView view, InternalNodeViewCustomization customization) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\NodeViewCustomization\NodeViewCustomizationLibrary.cs:line 65 Failed to apply NodeViewCustomization for CodeBlockNodeModel System.NullReferenceException: Object reference not set to an instance of an object. at Dynamo.Wpf.Views.CodeHighlightingRuleFactory.CreateClassHighlightRule(EngineController engineController) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditorUtils.cs:line 68 at Dynamo.Wpf.Views.CodeHighlightingRuleFactory.CreateHighlightingRules(TextEditor editor, EngineController controller) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditorUtils.cs:line 143 at Dynamo.UI.Controls.CodeCompletionEditor..ctor(NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeCompletion\CodeCompletionEditor.xaml.cs:line 64 at Dynamo.UI.Controls.CodeBlockEditor..ctor(NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditor.cs:line 65 at Dynamo.Wpf.CodeBlockNodeViewCustomization.CustomizeView(CodeBlockNodeModel model, NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\NodeViewCustomization\NodeViewCustomizations\CodeBlockNodeViewCustomization.cs:line 16 at lambda_method(Closure , NodeModel , NodeView ) at Dynamo.Wpf.NodeViewCustomizationLibrary.TryApplyCustomization(NodeModel model, NodeView view, InternalNodeViewCustomization customization) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\NodeViewCustomization\NodeViewCustomizationLibrary.cs:line 65 Failed to apply NodeViewCustomization for CodeBlockNodeModel System.NullReferenceException: Object reference not set to an instance of an object. at Dynamo.Wpf.Views.CodeHighlightingRuleFactory.CreateClassHighlightRule(EngineController engineController) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditorUtils.cs:line 68 at Dynamo.Wpf.Views.CodeHighlightingRuleFactory.CreateHighlightingRules(TextEditor editor, EngineController controller) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditorUtils.cs:line 143 at Dynamo.UI.Controls.CodeCompletionEditor..ctor(NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeCompletion\CodeCompletionEditor.xaml.cs:line 64 at Dynamo.UI.Controls.CodeBlockEditor..ctor(NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditor.cs:line 65 at Dynamo.Wpf.CodeBlockNodeViewCustomization.CustomizeView(CodeBlockNodeModel model, NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\NodeViewCustomization\NodeViewCustomizations\CodeBlockNodeViewCustomization.cs:line 16 at lambda_method(Closure , NodeModel , NodeView ) at Dynamo.Wpf.NodeViewCustomizationLibrary.TryApplyCustomization(NodeModel model, NodeView view, InternalNodeViewCustomization customization) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\NodeViewCustomization\NodeViewCustomizationLibrary.cs:line 65 Failed to apply NodeViewCustomization for CodeBlockNodeModel System.NullReferenceException: Object reference not set to an instance of an object. at Dynamo.Wpf.Views.CodeHighlightingRuleFactory.CreateClassHighlightRule(EngineController engineController) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditorUtils.cs:line 68 at Dynamo.Wpf.Views.CodeHighlightingRuleFactory.CreateHighlightingRules(TextEditor editor, EngineController controller) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditorUtils.cs:line 143 at Dynamo.UI.Controls.CodeCompletionEditor..ctor(NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeCompletion\CodeCompletionEditor.xaml.cs:line 64 at Dynamo.UI.Controls.CodeBlockEditor..ctor(NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\Views\CodeBlocks\CodeBlockEditor.cs:line 65 at Dynamo.Wpf.CodeBlockNodeViewCustomization.CustomizeView(CodeBlockNodeModel model, NodeView nodeView) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\NodeViewCustomization\NodeViewCustomizations\CodeBlockNodeViewCustomization.cs:line 16 at lambda_method(Closure , NodeModel , NodeView ) at Dynamo.Wpf.NodeViewCustomizationLibrary.TryApplyCustomization(NodeModel model, NodeView view, InternalNodeViewCustomization customization) in E:\API\Dynamo\Dynamo\src\DynamoCoreWpf\NodeViewCustomization\NodeViewCustomizationLibrary.cs:line 65

chuongmep commented 2 years ago

@QilongTang @Amoursol Object reference not set to an instance of an object. Am I missing something when building the source code?

Amoursol commented 2 years ago

@chuongmep - Please try the following:

Then running a 'Clean' and 'Rebuild' on the Dynamo Project. If it fails, keep cleaning and rebuilding until it picks everything up.

chuongmep commented 2 years ago

Many thanks @Amoursol. It took me a few days to figure out the problem, it really has a problem with CefSharp packages, because of a problem with the upgraded version.

Amoursol commented 2 years ago

Ah gotcha! Glad it's sorted out in the end @chuongmep 🙌