Data error (cyclic redundancy check) (SOLVED)

I had this error happen recently when trying to bundle.

[Bundling x86_64-win32]
x86_64-win32
Exception in thread "main" com.dynamo.bob.CompileExceptionError: Data error (cyclic redundancy check)
        at com.dynamo.bob.Project.build(Project.java:447)
        at com.dynamo.bob.Bob.main(Bob.java:557)
Caused by: java.io.IOException: Data error (cyclic redundancy check)
        at java.base/java.io.FileInputStream.readBytes(Native Method)
        at java.base/java.io.FileInputStream.read(FileInputStream.java:279)
        at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:290)
        at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
        at com.dynamo.bob.fs.DefaultResource.getContent(DefaultResource.java:29)
        at com.dynamo.bob.pipeline.ExtenderUtil.writeResourcesToDirectory(ExtenderUtil.java:763)
        at com.dynamo.bob.bundle.Win32Bundler.bundleApplicationForPlatform(Win32Bundler.java:85)
        at com.dynamo.bob.bundle.Win64Bundler.bundleApplication(Win64Bundler.java:21)
        at com.dynamo.bob.Project.bundle(Project.java:588)
        at com.dynamo.bob.Project.doBuild(Project.java:907)
        at com.dynamo.bob.Project.build(Project.java:437)
        ... 1 more

The cause seems to be of a corrupted file in the project (in my case a file which I frequently reverted with git). This file could not be copy/pasted by the system. I had to delete it and copy a good version back into the project. I’m still not sure exactly how the file was corrupted. But it’s a good reminder to always use version control and keep backups. If you get the error above and find this from searching in the future try to copy and paste your project folder somewhere else and see if any files cannot be read by the OS.

2 Likes