I'm using Arch Linux, i3wm and emacs 27.1, and I'm having an issue where emacs hangs when opening certain files, but I can't seem to find a pattern as to which files cause the hang.
When emacs hangs, I can't interact with it in any way. C-g does nothing, I have to kill it using xkill. htop shows that emacs -Q is running at 99% CPU usage.
So far in my testing, it hangs when I open my picom.conf file and my i3 config file, both of which are in a .dotfiles directory and symlinked to my .config directory. Other files in my .dotfiles directory open with no issue. I tried copying picom.conf to my home directory, still causes the freeze. I tried renaming the copy of picom.conf to just textfile thinking maybe it was having issues with the .conf suffix, but still freezes.
When I run emacs in the terminal, the freeze doesn't happen, the window opens just fine.
So far, any file that causes the freeze does so 100% of the time that I try to open it, any file that doesn't cause the freeze doesn't do so 100% of the time that I try to open it.
What are my next steps in troubleshooting this issue?
EDIT: I've narrowed the issue down a little bit thanks to some help from a reddit user. It looks like the crash is happening in files with special (unicode?) characters. My picom.conf file has a japanese character, and my i3 configuration file has font awesome icons embedded. Vim opens these fine, terminal emacs opens them fine, but GUI emacs crashes. Removing the offending characters makes it so that I can open the files in GUI emacs without crashing, but unfortunately, those characters serve an important purpose in my i3 config.
I don't think this is intended behavior, but I can't seem to find examples of my exact issue.