Viewing the diff of a text file that also contains a NULL byte can fail.
- Create a text file and commit it
- Add a NULL byte after 8200 bytes somewhere in the file and commit
- Push to Bitbucket
- View the diff of the commit
The diff is displayed correctly
About 50% of the time, the diff of the file is not shown and a spinner is displayed indefinitely.
The below message is logged in the atlassian-bitbucket.log file (with debug logging enabled):
The above message does not necessarily always indicate a problem and can occur during normal operation, such as when a diff is truncated intentionally. It is just a symptom of this bug.
Currently there is no known workaround for this behavior. A workaround will be added here when available.