Lỗi ko tạo được migration unexpected end of file năm 2024

We have also been having this problem regularly in the last three weeks. It happens in project sharing files as well as plain Vectorworks files. We are a two person firm, and it happens to both of us. There doesn't appear to be an easy fix or workaround. Because the backups can be contaminated somehow, we regularly duplicate the files that we're working in so that we can go back to those when the "unexpected end of file..." error happens. It only happens when we are opening a file, the file doesn't crash during use. Either this issue arises during saving and closing, or it happens during use and VW doesn't identify a problem until reopening the file. I have to say, we've lost a lot of time (and money) dealing with this. It's incredibly frustrating.

@KIT KOLLMEYER SAME!

And I have contacted VWX support MULTIPLE times for many MANY hours of pointless phone conversations and investigations for them to try and figure out the issue (which they should be doing without me on the phone), and it always ends with sorry we can't do anything right now but they always promise the engineering team will prioritize it and they will absolutely keep me updated as they solve the problems. All of this and not a single follow up email. And based on the question archive on here, it seems this has been a serious unresolved problem for years! This is a major issue with their core product and causes it not to function as advertised because it cannot be trusted.

Oh, and on a working file that is for a project sharing project: My working file along with 3 or 4 backups went corrupt with the "unexpected end of file..." error. I finally opened maybe the 5th latest backup working file but because me in the now corrupt working file hadn't saved, committed, and released the work I had done, the new me in this backup file was not allowed to do anything because it was all locked up. An administrative release would just revert all of the work I had done back to square one. So what is the point of a backup file when using a project sharing/working file if the engineering team hasn't accounted for this type of situation?

And why are the backup files even going corrupt in the first place? Engineers - find a way to keep them isolated and have the program recognize when you (the same user) is trying to revert to a backup file!

Also, let us copy and paste viewports into different documents! This would at least buy back so much time when we are having to spend hours re-doing our corrupted work!!! Just make them as windows into world-based space so that the coordinates of the window follow into the new file... so as long as a paste my drawings in place, the viewports will align and so will the annotations!

How can I resolve errors indicating "Unexpected end of file ...", received while using the Data Import Wizard?

Environment:

Data Import Wizard All supported versions

Issue:

Error encountered while using Data Import Wizard

"Unexpected end of file while parsing Name has occurred. Line #, position #."

"Root element is missing."

Resolution:

If this error is encountered when using the Data Import Wizard, this means the DATA_IMPORT_BATCH_LIMIT configuration setting should be reduced. The default setting is 1000. Continue testing with lesser values for this configuration setting until the import can consistently complete without issue. It is expected that the import will take more time as this limit is reduced.

The execution of Custom Process Model (CPM) scripts and rules are always a factor when these errors happen. Avoiding these actions (when possible) during the import will avoid these errors and will also have the added benefit of faster import processing.

These errors happen when the server runs out of its total allotted memory. When CPMs and rules are executed, all the data for records being updated during the import must be loaded in memory in case they are required for the execution. Please note that the number of interfaces, custom fields, languages, and other configuration attributes increase the amount of data that is associated with the records.

By lowering the batch limit, there will be less records processed together, and the total memory being used will be decreased. If you are lowering this configuration to avoid these errors, the setting that works for your site can fluctuate based on the type of record being imported and the individual records being updated.

I have a Truffle project that normally compiles and migrates fine. I have some background backup processes that occasionally read files and lock them up while doing backup. For the purpose of this Issue report, let's assume that can't be changed.

Issue

Here was a recent session, in which I attempted a migration from the start but the process got interrupted, apparently because a file was busy. The handling of this issue was very far from graceful. First, it just stopped the migrations process, and the process could not be restarted because the interruption had led to a corrupted JSON file. Even attempting to re-run 'compile' failed because the JSON file that 'compile' would have replaced was corrupted. Manually deleting the JSON files and re-compiling worked.

First session:

Using network 'development'.
Running migration: 1_initial_migration.js
  Replacing Migrations...
  ... 0x6a0879a5d38bea2827a3e98fab20222b9158306118109b5b22a0cd65d08a666d
  Migrations: 0x2f56a4a390cbecd3716aaf306c160cb1a38b96f6
Saving successful migration to network...
  ... 0x55686446be32b387b4af3651998fe2d46d4f3fbd1d5885cd9d36d9d7d8022b22
Saving artifacts...
Running migration: 2_first_action.js
Saving successful migration to network...
  ... 0x72c22858638d4b0fec4622e41ee1fd6bdd39cbca0f78a3750fc57aeb6fe7559b
Saving artifacts...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: EBUSY: resource busy or locked, open 'C:\Users\me\projectDir\build\contracts\Migrations.json'

An arbitrary time period later (in my example, immediate, but could have been a while later):

SyntaxError: Unexpected end of JSON input
    at JSON.parse ()
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\packages\truffle-compile\profiler.js:80:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:1140:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:473:1
    at iteratorCallback (C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:1064:1)
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:969:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:1137:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\packages\truffle-compile\profiler.js:73:1
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:528:3)
truffle migrate --reset
SyntaxError: Unexpected end of JSON input
    at JSON.parse ()
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\packages\truffle-compile\profiler.js:80:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:1140:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:473:1
    at iteratorCallback (C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:1064:1)
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:969:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:1137:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\packages\truffle-compile\profiler.js:73:1
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:528:3)
truffle compile
SyntaxError: Unexpected end of JSON input
    at JSON.parse ()
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\packages\truffle-compile\profiler.js:80:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:1140:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:473:1
    at iteratorCallback (C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:1064:1)
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:969:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\~\async\dist\async.js:1137:1
    at C:\Users\me\AppData\Local\node\node_modules\truffle\build\webpack:\packages\truffle-compile\profiler.js:73:1
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:528:3)
rm -r build/contracts
truffle compile
Compiling .\contracts\Migrations.sol...
...(This works now)...

Steps to Reproduce

Have a file in the build/contracts directory with invalid JSON (e.g. remove a closing brace at the end of the file), and attempt to run truffle compile or truffle migrate.

Expected Behavior

  1. At the least, an error message that tells me which file is being parsed to give an "unexpected end of JSON input."
  2. Maybe, an error message suggesting that I delete that file or the build/contracts directory and re-compile, to put me on a path towards a solution.
  3. Potentially better, if a command is expected to overwrite/replace a file that's producing a parse error, ignore the error as if the corrupt file just were not there at all (maybe print a warning), and just replace the file (optionally deleting it before overwrite if necessary).

Actual Results

A confusing error message that requires me to recall specifics about something odd happening earlier in order to get a clue about how to proceed and address the issue.