You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Saving a specific file in TextEdit causes immediate kernel panic

I have a specific file that I'm trying to edit in textedit (it's a textfile). I can edit it fine but whenever I press save it instantly crashes the system. The computer restarts and it shows this error log:

https://pastebin.com/TUxZ2Mju


Does anyone know what this means? And more importantly, how to fix it?

MacBook Pro

Posted on Aug 8, 2022 4:16 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 10, 2022 7:36 AM

The full path:

/Users/tim/Desktop/Test\ Server\ Läski/world/datapacks/Tim_Ms_Awesome_Datapack/data/tim_functions/functions/boss_tick_successful.mcfunction

I'm not sure if it's the exact file, but none of the files have very different names. Although all of them seem to cause a crash.


I'm not sure if it's the exact file, but none of the files have very different names. Although all of them seem to cause a crash.

Similar questions

14 replies
Question marked as Top-ranking reply

Aug 10, 2022 7:36 AM in response to Barney-15E

The full path:

/Users/tim/Desktop/Test\ Server\ Läski/world/datapacks/Tim_Ms_Awesome_Datapack/data/tim_functions/functions/boss_tick_successful.mcfunction

I'm not sure if it's the exact file, but none of the files have very different names. Although all of them seem to cause a crash.


I'm not sure if it's the exact file, but none of the files have very different names. Although all of them seem to cause a crash.

Aug 8, 2022 1:48 PM in response to Tim355

Try copying the file to an external drive using the Finder. If you copy the file to the same volume, then you are not actually making a new physical copy due to how the new APFS file system works. We need to ensure you are using another copy of the file. Then try to edit the file on the external drive to see if the issue still occurs. If the issue still occurs, then most likely you have an issue with that particular file (font, formatting, corrupt file), or you have some third party software installed which is interfering with the normal operation of macOS.


If you can save the file on the external drive without issue, then it may mean the file system where the original file is stored has a problem. If so, then try running Disk Utility First Aid on the hidden Container. Within Disk Utility you may need to click "View" and select "Show All Devices" before the hidden Container appears on the left pane of Disk Utility. Even if First Aid says everything is "Ok", click "Show Details" and scroll back through the report to see if any unfixed errors are listed. If any unfixed errors are listed, then you can try running First Aid from Internet Recovery Mode, otherwise you will need to erase the whole Container and reinstall macOS & restore from a backup.


You can also try running the Apple Diagnostics to see if any hardware issues are detected.

Aug 11, 2022 11:49 AM in response to Tim355

More testing: I made a file called a.mcfunction, which didn't ever crash.

Also editing files in other similiar directories crashes too:


/Users/timothy/Desktop/Himo\ Läski\ Server/world/datapacks/Tim_Ms_Awesome_Datapack/data/minecraft/tags/functions/tick.json


Also I accidentally clicked a button and now it says Solved, and there's no way to take it back. Nice one apple discussions. Time to make a new discussion since this one is kinda ruined. Sorry to everyone who tried to help for this.


New discussion: Saving certain files in TextEdit causes k… - Apple Community

I'll be more careful to not mark it as solved again.

Aug 8, 2022 4:19 AM in response to Tim355

Generally, Panic are caused but Hardware issue or Third Party Kernel Extensions installed/


Not good a Panic Report reading


Alternative >>


Understand, we are all working Remotely from all around the world. 


Therefore, we do not have the On-Hands experience the User ( you ) has with this computer.


The next best thing for us to having a semi - actual On-Hand experience  with this computer is to follow the steps below


Download the Application Etrecheck directly from the Developer. 


The application is free or paid from added features. 


It will take a Snap Shot -  both the hardware and software.


 The Report will Not Reveal Any Personal Information. 


Post back the Full Report - copy and paste - using the Additional Text Icon ( 3rd Icon to last )


We can have a look at the report for possible issues and may have possible suggestions to resolve the issues.

Aug 10, 2022 9:19 AM in response to Tim355

The characters in the file name are all legal characters, however, the content of the file may contain some character or formatting that is causing a problem especially if the file was originally created with another app. The file you are referencing seems like it may be some type of file associated with some sort of programming. Is this file even meant to be edited? It is even a text file or is it some sort of binary file that should not be edited?


I thought you were only having a problem saving one particular file, not multiple files. Are all the files located within the "Test Server" folder or one of its subfolders? If so, then it most likely points to a file system issue. Is the name of the folder in the Finder "Test Server" or "Test\ Server"? If it is the latter, then remove the backslash from the name as that is a special character that should not be used in a file name. I missed this at first since the "\" is used to allow spaces on the command line.


Just to clarify that these items are all stored locally on this Mac and no part of this path is mounted from a remote network share? Are you using iCloud or any other cloud file syncing service here?


Can you save & modify other text files or .rtf files in the main Desktop or Documents folder?


Aug 11, 2022 6:07 AM in response to HWTech

This file is in my custom datapack for the game Minecraft. It's files I created to add some stuff to the game. Also the full path I got through terminal do it's correct (yes it is "Test Server Läski"). All of these function files were made as txt files and then given the mcfunction file extension so I'd assume the format is correct. The contents of the file id normal text, no special symbol except maybe slashes and backslashes.


I can save elsewhere so my current workaround is copying the text in the file in a new text file, editing it and saving on my desktop with .txt format. Then deleting the original file, moving in the new one and renaming it. So yeah files outside seem to work. Also first aid in disk utility reported everything is OK and no errors found.


I will do some testing when I come home.

Aug 11, 2022 6:21 AM in response to Tim355

Did you personally create all of this content? Or did you download some of it from the internet?


It looks like the content in that file is tripping the system anti-malware protection. It is unusual for this kind of data to be saved during a user-initiated save in an Apple app. That is probably why you are experiencing the panic instead of some other behaviour.

Aug 12, 2022 12:41 PM in response to Tim355

You do have a very large number of 3rd party system modifications, including kernel extensions from various places.


Unfortunately, some of your crash reports say that you have heap corruption, which could be a memory failure or other hardware failure.


I recommend that you erase the hard drive and reinstall the operating system. You have to make sure to NOT restore from backup. If you restore "Applications" or "other files", it could just restore the problematic software. You should be able to restore only your user files and user accounts. Then, manually reinstall only the software that you absolutely need to have.


This is a new computer too. You might want to take it to Apple and have them run hardware diagnostics on it. This should probably be the first thing to do. Make sure to have a backup before taking the computer in for service. If they need to make a repair, they will erase and/or replace the hard drive.

Saving a specific file in TextEdit causes immediate kernel panic

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.