It is possible to obtain a backup from OnSong even if you cannot open OnSong. Only use this as a last effort to extract your library if you cannot restore OnSong any other way. This procedure is performed by informing OnSong that you want to start with a clean library. As a safety measure, OnSong jettisons the current library as a backup file to iTunes File Sharing. You can then use iTunes or Finder to retrieve this backup and restore your library after installing OnSong again.
Purge Library
To do this, open the Settings app from your device's home screen by tapping on the Settings icon. Next, tap on the OnSong option on the left under the list of applications to open OnSong Settings. Scroll down to the Advanced section on the right. Turn on the Purge Database switch. Return the home screen by pressing the home button or swiping up on devices without a home button and reopen OnSong. OnSong should launch with a clean library and display the Welcome to OnSong song.
macOS Catalina and newer
Connect your device to a computer via the standard sync/charge cable and open a Finder window. Click on the device in the sidebar under Locations where drives appear when connected to your Mac. This will load information about your device. Tap on the Files tab and then locate the OnSong app and expand to view your backup file. Click and drag this file to your computer, or right-click and save it to Desktop. Once the file is saved and confirmed to be on your computer, it is safely off of your device.
Windows and macOS Mojave or older
Connect your device to a computer via the standard sync/charge cable and open the iTunes application. Click on the device that appears in the user interface and choose File Sharing from the options presented in the sidebar. Click on OnSong to view files saved to that app's file-sharing location. Your backup file should appear in the list on the right. Select this file and click on the "Save to..." button at the bottom to choose a location on your computer where you would like to save the file such as the Desktop. Once the file is saved and confirmed to be on your computer, it is safely off of your device.
Reinstall OnSong
Now you can reinstall OnSong. To reinstall, tap and hold on the OnSong icon on your home screen until the icons begin to jiggle. Then tap on the "x" icon in the upper left corner to delete the app. This will delete the app and your entire OnSong library if you proceed. When finished, download the OnSong app from the App Store. Keep in mind that if you've paid for the OnSong app on your Apple ID already, the app will be free to download again although it may show a price until the App Store authenticates you.
Once installed, open OnSong. Connect your device to the computer again and repeat the above steps to access File Sharing either through iTunes or the Finder. Drag and drop to add the backup file that you saved to the OnSong app. Once the backup file has been added, go to OnSong on your device. Now select Songs, All Songs, and tap on the + button. Choose to Import from iTunes File Sharing. In there will appear your backup file. Tap on it to select and restore your library. After a few moments, your library should be back up and running.