I recently had two errors crop up on my LibreOffice set-up where I'm running version 22.214.171.124. The first is -
Error loading BASIC of document file:///home/boztu/.config/libreoffice/4/user/basic/Standard/script.xlb/: General Error. General input/output error.
and this is the second one -
Error loading BASIC of document file:///home/boztu/.config/libreoffice/4/user/basic/Standard/dialog.xlb/: General Error. General input/output error.
On first glance these reports are exactly the same, but on closer inspection the first refers to script.xlb whereas the second one is dialog.xlb. These error reports are not show stoppers, but they are a minor annoyance. And this is how to sort it out -
 Close LibreOffice.
 If available in user profile: Rename script.xlb to script.xlb.bak [path: ...\LibreOffice\4\user\basic\Standard\script.xlb].
 Copy script.xlb from the program directory [path: ...\Program_Files\LibreOffice_4.0\presets\basic\Standard\script.xlb] and paste the file in the user profile [path: ...\LibreOffice\3\user\basic\Standard].
 Rerun LibreOffice.
This worked very well for me. :)