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

The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered. #35

Closed
alexberd opened this issue Apr 29, 2019 · 7 comments

Comments

@alexberd
Copy link

alexberd commented Apr 29, 2019

I receive the above error only when upgrading Revit 2017 Model to Revit 2018 by the use of Revit Batch Processor.

When upgrading the model by native Revit, it works fine!

20:46:13 : 	- Processing file (1 of 1): C:\test\MyProject\Revit_Model.rvt
20:46:13 : 	- 
20:46:13 : 	- WARNING: the file being processed appears to be a Workshared Local file!
20:46:13 : 	- 
20:46:13 : 	- Opening detached instance of central file: C:\test\MyProject\Revit_Model.rvt
20:46:15 : 	- 
20:46:15 : 	- ERROR: Model is corrupt: The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered.
20:46:15 : 	-  (CArchiveException 105)
20:46:15 : 	- 
20:46:15 : 	- Exception: [Exception] The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered.
20:46:15 : 	-  (CArchiveException 105)
20:46:15 : 	- .NET exception: [CorruptModelException] The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered.
20:46:15 : 	-  (CArchiveException 105)
20:46:15 : 	- 
20:46:15 : 	- Further exception information:
20:46:15 : 	- 
20:46:15 : 	- 	OpenAndActivateDetachAndPreserveWorksets$100: 136: [163-163] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_file_util.py'
20:46:15 : 	- 	WithOpenedDetachedDocument$99: 186: [218-218] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:15 : 	- 	revitAction$97: 55: [276-285] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	WithDocumentOpeningErrorReporting$96: 61: [322-322] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	action$95: 37: [315-315] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	WithDialogBoxShowingHandler$94: 103: [88-88] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_dialog_util.py'
20:46:16 : 	- 	action$93: 38: [336-336] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	WithFailuresProcessingHandler$91: 118: [172-172] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_failure_handling.py'
20:46:16 : 	- 	action$90: 49: [338-338] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	WithExceptionLogging$89: 66: [153-153] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	WithAutomatedErrorHandling$88: 66: [340-340] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	WithErrorReportingAndHandling$87: 66: [317-317] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	RunDetachedDocumentAction$86: 114: [287-287] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	RunBatchTaskScript$63: 1550: [241-250] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : 	- 	<lambda$3>$62: 30: [347-347] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : 	- 	WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:16 : 	- 	DoRevitSessionProcessing$46: 316: [346-351] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : 	- 	<lambda$4>$45: 36: [382-388] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : 	- 	WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:16 : 	- 	outputStreamWriterAction$42: 66: [381-392] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : 	- 	UsingStream$39: 61: [84-84] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\stream_io_util.py'
20:46:16 : 	- 	outputStreamAction$40: 73: [395-395] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : 	- 	UsingStream$39: 61: [84-84] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\stream_io_util.py'
20:46:16 : 	- 	Main$26: 205: [398-398] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : 	- 	WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:16 : 	- 	<unnamed>: 451: [410-414] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : 	- 
20:46:16 : 	- Operation aborted.
20:46:16 : 	- 
20:46:16 : 	- ERROR: An error occurred while processing the file!
20:46:16 : 	- 
20:46:16 : 	- Exception: [Exception] The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered.
20:46:16 : 	-  (CArchiveException 105)
20:46:16 : 	- .NET exception: [CorruptModelException] The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered.
20:46:16 : 	-  (CArchiveException 105)
20:46:16 : 	- 
20:46:16 : 	- Further exception information:
20:46:16 : 	- 
20:46:16 : 	- 	OpenAndActivateDetachAndPreserveWorksets$100: 136: [163-163] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_file_util.py'
20:46:16 : 	- 	WithOpenedDetachedDocument$99: 186: [218-218] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	revitAction$97: 55: [276-285] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	WithDocumentOpeningErrorReporting$96: 61: [322-322] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	action$95: 37: [315-315] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : 	- 	WithDialogBoxShowingHandler$94: 103: [88-88] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_dialog_util.py'
20:46:17 : 	- 	action$93: 38: [336-336] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : 	- 	WithFailuresProcessingHandler$91: 118: [172-172] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_failure_handling.py'
20:46:17 : 	- 	action$90: 49: [338-338] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : 	- 	WithExceptionLogging$89: 66: [153-153] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : 	- 	WithAutomatedErrorHandling$88: 66: [340-340] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : 	- 	WithErrorReportingAndHandling$87: 66: [317-317] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : 	- 	RunDetachedDocumentAction$86: 114: [287-287] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : 	- 	RunBatchTaskScript$63: 1550: [241-250] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : 	- 	<lambda$3>$62: 30: [347-347] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : 	- 	WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:17 : 	- 	DoRevitSessionProcessing$46: 316: [346-351] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : 	- 	<lambda$4>$45: 36: [382-388] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : 	- 	WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:17 : 	- 	outputStreamWriterAction$42: 66: [381-392] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : 	- 	UsingStream$39: 61: [84-84] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\stream_io_util.py'
20:46:17 : 	- 	outputStreamAction$40: 73: [395-395] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : 	- 	UsingStream$39: 61: [84-84] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\stream_io_util.py'
20:46:17 : 	- 	Main$26: 205: [398-398] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : 	- 	WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:17 : 	- 	<unnamed>: 451: [410-414] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:26 : 
20:46:26 : Revit process (PID: 11888) has exited!
20:46:26 : 
20:46:26 : Operation completed.
20:46:26 : 
20:46:26 : 
20:46:26 : A plain-text copy of the Log File has been saved to:
20:46:26 : 
20:46:26 : 	C:\Users\user\AppData\Local\BatchRvt\BatchRvt_20190429_204558_294.txt
20:46:26 : 

I also checked the journals and found the following lines at the end of the journal file.

'ApplicationException is being thrown on behalf of the function <class ESEntity __cdecl Element::getEntity(class ESSchema *) const>. Dump file: C:\Users\user\AppData\Local\Autodesk\Revit\Autodesk Revit 2018\Journals\journal.0823.0001.dmp: line 1748 of d:\ship\2018_px64\source\revit\revitdb\gensrc\Element.gen.cpp.
' 8:< ::38:: Delta VM: Avail -79 -> 134211231 MB, Used +62 -> 496 MB, Peak +72 -> 506 MB; RAM: Avail -49 -> 50368 MB, Used +80 -> 658 MB, Peak +89 -> 668 MB 
' 8:< GUI Resource Usage GDI: Avail 9817, Used 183, User: Used 231 
' 8:< An ArchiveException 105 is raised at line 112 of Tasks\ExceptionCache.cpp: ExceptionCache::propagateExceptions: cached fatal exceptions 
' 8:< Failed to load elemStream#0 
'  3.221626========= 8:<<<loadLatestVersion 
'  3.221732======== 7:<<loadSelectedEpochs 
' 6:< ::38:: Delta VM: Avail -29 -> 134211203 MB, Used 496 MB; RAM: Avail -2 -> 50367 MB, Used +1 -> 660 MB 
' 6:< GUI Resource Usage GDI: Avail 9818, Used 182, User: Used 231 
' 6:< Before : Destroy Display Manager 
' 6:<   System (MB) [Available /  Total ]  [Revit Memory Usage (MB)   ] 
' 6:< RAM Statistics:    50366 /    65212       660=InUse      668=Peak  
' 6:< VM  Statistics: 134211203 / 134217727       496=InUse      506=Peak  
' 6:< After : Destroy Display Manager 
' 6:<   System (MB) [Available /  Total ]  [Revit Memory Usage (MB)   ] 
' 6:< RAM Statistics:    50366 /    65212       660=InUse      668=Peak  
' 6:< VM  Statistics: 134211203 / 134217727       496=InUse      506=Peak  
'  3.325103======= 6:<<TrustedUtility::readStreams 
'C 29-Apr-2019 20:46:15.461;   5:< Your model is being upgraded 
'C 29-Apr-2019 20:46:15.461;   5:< Autodesk Revit 2017 
'C 29-Apr-2019 20:46:15.461;   5:< Autodesk Revit 2018 
'C 29-Apr-2019 20:46:15.461;   5:< It is a local copy of a workshared project. After the upgrade changes are saved, you will no longer be able to synchronize the local copy with the central model. 
'  3.916738===== 4:<<loadSerialize/ALL_GAPS   0.591635/TurnOff_GAPs 100% 
' 3:< SLOG $f08d4c97 2019-04-29 20:46:15.470 <Open:Local 
' 3:< SLOG $f08d4c97 2019-04-29 20:46:15.481 <Open 
' 3:< SLOG $f08d4c97 2019-04-29 20:46:15.492 <Session 
'  3.953744==== 3:<<LoadFromStorage 
' 3:< ::38:: Delta VM: Avail +20 -> 134211223 MB, Used 496 MB; RAM: Avail +4 -> 50371 MB, Used -5 -> 655 MB 
' 3:< GUI Resource Usage GDI: Avail 9818, Used 182, User: Used 226 
' 3:< DummyStorage destroying DataStorageInterface 0x00000207EF20D6B0 
' 3:< Connecting session [$46b3dba8] to Worksharing Log [C:\Users\user\AppData\Local\Autodesk\Revit\Autodesk Revit 2018\Journals\journal.0823.txt] 
' 3:< Additional IP address/name found for host 0673-WEA: 10.0.33.83  
'  3.958765=== 2:<<FormOrAbandon::openFromModelPath [C:\test\MyProject\Revit_Model.rvt] 
' 2:< API_ERROR {  System.NullReferenceException exception(Object reference not set to an instance of an object.) was thrown from a handler of Autodesk.Revit.Proxy.DB.Events.DocumentOpenedEventArgsProxy event. The API event handler was registered by application CoordinationModelDB (c9463641-1c02-431c-9502-4ad0c91de1ce). Changes made by this handler are going to be discarded. } 
' 2:< API_ERROR {  System.NullReferenceException exception(Object reference not set to an instance of an object.) was thrown from a handler of Autodesk.Revit.Proxy.DB.Events.DocumentOpenedEventArgsProxy event. The API event handler was registered by application Unifi Revit 2018 AddIn (ff41c9d1-c8bc-4728-80ac-fb715dab6443). Changes made by this handler are going to be discarded. } 
'  4.022115== 1:<<[Cloud]standardOpenDocumentFile 
' 0:< API_SUCCESS { Unregistering DialogBoxShowing event by application BatchRvtAddin (b57d22c8-5e1f-407a-86ea-a8615fd8df34). } 
' 0:< API_SUCCESS { Unregistering FailuresProcessing event by application BatchRvtAddin (b57d22c8-5e1f-407a-86ea-a8615fd8df34). } 

I don't really understand the "d:\ship\2018_px64\source\revit\revitdb\gensrc\Element.gen.cpp" part of it.

Would be really grateful if you could provide any help.

Regards.

@DanRumery
Copy link
Collaborator

Hi @alexberd

That is really odd. At first I thought it might be a combination of local file, detaching from it and upgrading, but I just setup a quick test of that scenario and I didn't have any issues.

Is it possible to share that project file (or a stripped down project file that still exhibits the issue?). The element schema exception does look like a problem but it may not be the cause of this issue.

@alexberd
Copy link
Author

alexberd commented May 4, 2019

Many thanks for your message Dan! I will provide a stripped down version of the project file shortly.

@alexberd
Copy link
Author

alexberd commented May 8, 2019

Hi @DanRumery
I uploaded the Revit file at the link below. Could you please check if you can reproduce the issue?
https://1drv.ms/u/s!AiVrIj0VeNiEaaml5AUKbJJ3GeY

@DanRumery
Copy link
Collaborator

DanRumery commented May 9, 2019

@alexberd

Thanks Alex. I was able replicate the issue (when upgrading that file from 2017 to 2018).

I then wrote a simple addin command that uses the Application.OpenDocumentFile() function from the Revit API to open the file in Revit 2018 (i.e. without RBP). Strangely the same error occurs! That is, this appears to be a Revit API issue rather than an issue with RBP alone.

I may post this issue to the Autodesk forums as it seems to be a bug in the Revit API. It doesn't occur if manually opening through the UI as you say.

What's puzzling is why this particular file has this issue (I've never encountered it upgrading other files before...)

@DanRumery
Copy link
Collaborator

@alexberd Ok so I've found a known issue on the Autodesk Revit forums. There is an explanation of the cause and a workaround mentioned there:

https://forums.autodesk.com/t5/revit-api-forum/opendocumentfile-corruptmodelexception/m-p/8333687/highlight/true#M34096

Since this is a Revit API bug there isn't anything I can do for that unfortunately.

@alexberd
Copy link
Author

alexberd commented May 9, 2019

@DanRumery, Many thanks for your time checking this issue!
I tried to follow the issue REVIT-137926, changing the VendorID from "BATCHRVT" to "ADSK" at the %appdata%\Autodesk\Revit\Addins\2018\BatchRvtAddin2018.addin file as recommended. However, this did not resolve the issue. Do I need to recompile the RevitBatchProcessor after changing the VendorID ?

@DanRumery
Copy link
Collaborator

DanRumery commented May 10, 2019

@alexberd I wouldn't think you'd need to recompile as the only place the VendorId exists is in the addin file(s). Is it possible that some other 3rd party addin (with a VendorID other than 'ADSK') that uses Extensible Storage has been used at some point while working on that model file?

I think the fix worked for the user in that forum because the addin that created the Extensible Storage happened to have 'ADSK' as its vendor ID. So you'd have to figure out what addin created it in the first place (which is probably hard to figure out) and use its VendorID when upgrading.

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

No branches or pull requests

2 participants