Saving certain files in TextEdit causes kernel panic
This is a continuation of Saving a specific file in TextEdit causes… - Apple Community which I accidentally marked as Solved...
Most of the files in the directory "/Users/timothy/Desktop/Himo\ Läski\ Server/world/datapacks/Tim_Ms_Awesome_Datapack/data" cause kernel panics when I open them and try save with TextEdit. When pressing save the computer insntantly freezes completely and after a few seconds the screen goes black and the fans spin up to maximum for about a second. Then upon start up it shows a message about how the computer had to be restarted because of a problem.
When creating a new file in the directory it seems to not crash.
This is not an issue in Safe Mode.
As a side note I have recently tried to uninstall Avast and VirtualBox.
Etrecheck report: https://pastebin.com/wxYiXiiQ
Kernel Panic log: https://pastebin.com/TUxZ2Mju
Contents of one of the files that causes crashes: https://pastebin.com/Ta53jjvW
The path of this specific file: "/Users/timothy/Desktop/Himo\ Läski\ Server/world/datapacks/Tim_Ms_Awesome_Datapack/data/tim_functions/functions/boss_tick_successful.mcfunction"
These files are part of my datapack for the game MInecraft. I created the directories and files on my Linux server, and then moved to my Mac for the time being.
Another side note: I found a very good solution, when using VisualStudio to edit these files there is no crash, but I'd still like to know why this is happening.