Skip to content

Fix issue with versioning log and thread abort #509

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

Merged

Conversation

IsakNaslundBh
Copy link
Contributor

Issues addressed by this PR

Closes #508

Fixes an issue with the versioning log window. Previously was handled on a separate thread that was aborted on document close. Thread.Abort() is not supported in later runtimes, see This link.

This has now been refactored out by instead storing the versioning form in a static varibale, and closing and disposing it at document close and open.

Also changing from ShowDialog to Show and bringing it to top.

Test files

For grasshopper, this can be tested with files in here

Still need to also be tested with Excel as well as Revit.

Changelog

Additional comments

@IsakNaslundBh IsakNaslundBh added the type:bug Error or unexpected behaviour label Mar 20, 2025
@IsakNaslundBh IsakNaslundBh self-assigned this Mar 20, 2025
Copy link
Contributor

@michaelhoehn michaelhoehn left a comment

Choose a reason for hiding this comment

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

I've tested Rhino 8, Rhino 7, and excel with no issues and have verified logs. I'm happy with this solution.

Copy link
Member

@adecler adecler left a comment

Choose a reason for hiding this comment

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

Tested on Excel, Rhino 7 and Rhino 8, all providing expected behavior when opening two scripts in a row.

Here's the test files I used for Excel:
BuroHappold_BHoM_v5.3.beta_Loadcases and Combinations.zip

My only concern is that the versioning report form is frozen in an uncomplete state until the script has finished loading. I understand this is due to the form now loading on the same thread because this was the only option that got both forms showing on top and closing at appropriate time. So happy to get this approved as is for now and raise an issue to improve on the solution soon.

@adecler
Copy link
Member

adecler commented Mar 20, 2025

@BHoMBot check required

Copy link

bhombot-ci bot commented Mar 20, 2025

@adecler to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check copyright-compliance

Copy link

bhombot-ci bot commented Mar 20, 2025

@IsakNaslundBh to confirm, the following actions are now queued:

  • check copyright-compliance

There are 9 requests in the queue ahead of you.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check ready-to-merge

Copy link

bhombot-ci bot commented Mar 20, 2025

@IsakNaslundBh to confirm, the following actions are now queued:

  • check ready-to-merge

There are 27 requests in the queue ahead of you.

@IsakNaslundBh IsakNaslundBh merged commit b63464c into develop Mar 20, 2025
10 checks passed
@IsakNaslundBh IsakNaslundBh deleted the BHoM_UI-#508-FixThreadABortIssueWIthVersioningLogWindow branch March 20, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thread Abort crashes out when running in later .net environments
3 participants