Revit crashed when committing a transaction

Revit crashed when committing a transaction

1605104293
Participant Participant
388 Views
3 Replies
Message 1 of 4

Revit crashed when committing a transaction

1605104293
Participant
Participant

I tried to connect pipes just created in Revit. Revit have a large chance of crashing directly at the action of committing the transaction.  As in pic Line 438, there were neither warnings nor any exception can be caught during the process (The log stopped at the commit action as shown in Pic2). How could this happen and could it be avoided? any limitations in Revit Transaction Commitment?

1605104293_1-1667266376891.png

1605104293_3-1667266518961.png

 

 

 

 

0 Likes
389 Views
3 Replies
Replies (3)
Message 2 of 4

jeremy_tammik
Alumni
Alumni

The Revit API provides access to the same functionality as the end user interface. Therefore, you can test your intended Revit model creation steps manually in the end user interface first to verify that the behaviour you implement is supported by Revit and produces the desired result. Once that is verified, no such crash should happen when reproducing the same programmatically. If it does, please submit a complete minimal reproducible case to demonstrate the problem and enable the development team to verify, analyse and rectify it:

  

Here is The Building Coder blog description of a complete minimal reproducible case:

  

https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

  

Unfortunately, Typepad is still not working, and hence neither is The Building Coder blog. 

  

Here is the equivalent link in The Building Coder GitHub tbc repository:

  

http://jeremytammik.github.io/tbc/a/#1b

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 4

1605104293
Participant
Participant

Thanks Jeremy, I am afraid I can not repeat this process in the Revit end user interface, for the following reasons: 

1. the crash may happen at any commit action in the loop if it does happen, but may not occur in every command execution.

2. this addin as too many operations involved during executing, which i could not possibly repeat it manually.

 

This is an interesting bug, I will be watching for a solution / suggestion while keep analysing and debugging.

I will consider providing a case if it allows.

0 Likes
Message 4 of 4

jeremy_tammik
Alumni
Alumni

Aha. Thank you for the explanation and background information. Well, remember that Revit is an end-user product. If you stuff it with a couple of thousand or more transactions it will probably crash sooner or later. When running a large batch of automated actions, you must implement logging to keep track of where you are, batching to restart occasionally before crashing, and recovery to pick up again where you left off:

   

The Building Coder article on 

Batch Processing and Monitoring Progress:

    

https://thebuildingcoder.typepad.com/blog/2022/06/parameters-snippets-batch-mode-and-self-signing.ht...

  

The same on GitHub, now that Typepad is down:

  

http://jeremytammik.github.io/tbc/a/1954_batch_snip_selfsign.html#5

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes