SynchronizeWithCentral() Exception

SynchronizeWithCentral() Exception

tamas.deri
Advocate Advocate
2,869 Views
33 Replies
Message 1 of 34

SynchronizeWithCentral() Exception

tamas.deri
Advocate
Advocate

Using

doc.SynchronizeWithCentral(transOpts, syncOpts)

 sometimes throws an exception saying 'An internal error has occured.' which is not documented on revitapidocs, only a similar exception that is 'An internal error happened on the central model, please contact the server administrator.' which seems slightly different to me. However, it is still possible to sync the model with the OOTB Sync button on the UI. A more verbose explanation would be very handy, because it's quite difficult to handle this exception with so little knowledge.

0 Likes
2,870 Views
33 Replies
Replies (33)
Message 22 of 34

Messi_Hu
Autodesk
Autodesk

@tamas.deri , sorry for the delay response, thanks for your dmp file, can you upload the journal together because journal record the detail version info so that I would locate which version correlated to the dmp file?

0 Likes
Message 23 of 34

tamas.deri
Advocate
Advocate
0 Likes
Message 24 of 34

Messi_Hu
Autodesk
Autodesk

@tamas.deri , from callstack, I got to know it was caused by 3rd party App - Guardian2022. Please disable it and try again.

0 Likes
Message 25 of 34

tamas.deri
Advocate
Advocate

@Messi_HuI don't have that addin installed, and I can't recall if it ever was. None of my addin folders has any Guardian content, so I don't really understand where this comes from.

0 Likes
Message 26 of 34

Messi_Hu
Autodesk
Autodesk
  • @tamas.deri , sorry, I opened a wrong dmp file in the folder, that is a dmp file which was created previously with the same Revit version as you are using but from another report serveral days ago, I forgot to clean up them, so it misled me.
  • I opened the dmp file you sent me and it shows that it is not associated with the correct file.
  • Seems Revit doesn't acknowledge the current model exactly.
  • Here is the workaround I gave:
    • Activate document again before using API do Sync with Central;
    • Disable other AddIns (especially Autodesk.Bim360.Revit.Issues.Addin.dll) and have a try.

Please try it and let me know the results, thank you.

0 Likes
Message 27 of 34

tamas.deri
Advocate
Advocate

I'm pretty sure that only one document was open: IN-EX_GEN_MasterCentral_tamas.deri.rvt

For the other files I only see a "ModelPath Created" journal entry, which might be by some background process, that prepares the recent files screen, because these models showed up there, and those lines also appear in a journal file where there are no documents open.

0 Likes
Message 28 of 34

Messi_Hu
Autodesk
Autodesk

@tamas.deri , thanks for your info, I knew those model were not opened from journal. But current dmp reported referenced document is under invalid status. Can you help disable the Addons I mentioned above to see if became better?

0 Likes
Message 29 of 34

tamas.deri
Advocate
Advocate

Ok, I see. I'll give it a try without addins and get back to you soon.

0 Likes
Message 30 of 34

tamas.deri
Advocate
Advocate

I've disabled all addins in every possible location, but the issue still persists. I couldn't really understand what you mean by activating the document? I'm not aware of any such methods.

0 Likes
Message 31 of 34

Messi_Hu
Autodesk
Autodesk

Sorry, I did not get progress on it. are you able to reproduce it 100% now when you said you disabled all addins and the issue still persists?

0 Likes
Message 32 of 34

tamas.deri
Advocate
Advocate

Yes, with all addins disabled (except pyRevit, because I use it's event handling for the document syncing event) it happens all the time. I might make a a completely separate ExternalApplication for completely isolated testing, but I have to make time for that.

0 Likes
Message 33 of 34

Messi_Hu
Autodesk
Autodesk

@tamas.deri , I noticed there are some view switching codes in the sample code, please stop switching view in the code and try again.

0 Likes
Message 34 of 34

tamas.deri
Advocate
Advocate

@Messi_Huthe original issue is a bit different, it is not running in an event, but executed manually. That one runs without errors most of the time, but sometimes throws the exception in question. With that code I can't even reproduce the exception intentionally, I can only see it in some users logs, so I don't think it makes sense to look that way.

The other example came up because it throws the same exception in all cases, so it is a more stable way the reproduce the issue (the one that is triggered by the syncing event, cancelling the original event and starting a new sync). Please give me some time to create a bare minimum solution to consistently reproduce the issue, that can help you pinpoint it.

0 Likes