This new bug came with the latest Gboard update on 17 December and brought this issue with itself
Try these hacks to prevent the app from crashing often
Growing threads by Android users in Google Forum, Twitter and other social media platforms highlighted that the latest Google's keyboard, Gboard was crashing often and became un-operable. There were also some users who reported that they got completely locked out of their phones.
The Gboard, which is the most preferred Android keyboard for those looking for a minimal UI design with a smooth experience of typing in most of the languages of the world including a number of Indic languages, usually works well. However, this new bug came with the latest update of the app via the Google Play Store on 17 December and brought this issue with itself.
Fortunately, Google has now addressed the issue on their Android Help Forum. "We're aware of a bug in a recent update to Gboard users on Android 7.1 and below that caused the keyboard to crash for some users. A fix for this issue (8.9.14) has been rolled out; for most people, the app will update automatically which will resolve the problem. For some users, it may require a reset of their device for the update to take effect," responded Google employee, who goes by the name Zak P, to complaints of the crash issue posted by several users on Google Support platform.
For those who are able to unlock their phone but are still finding the Gboard crash issue while using it, there is a simple method fix it manually.
Go to Settings on your Android phones, tap on Apps, then on Gbaord and finally select Clear Data and Cache. This will help in fixing the bug, However, it comes with a catch. Clearing the data and cache may also clear all the saved words and Dictionary shortcuts that you had saved on the Keyboard settings. But of course, it is more important for you and for your smartphone to have a smooth-functioning Gboard than a buggy one.
Sadly, if you are one of those users who got locked out of their phones because they were unable to pull up the keyboard to enter a password to unlock, the only solutions available right now are to either connect your phone to a physical keyboard and use the keys or perform a factory reset. The factory reset will clear all the data from your phone is not properly backed up.
One another option that you may try out, although it is not a guaranteed hack, is to remotely install a keyboard from the Play Store app on a computer. After reboot, the device may ask you to choose keyboards.
Google, according to the response on the help form has already rolled out a fix for the issue, but it would be better to stick to an older version of the app for the time being till it gets clear the that the bug has been securely fixed.