The error may occur if IDE tries to open the file of an old format or if the file is indeed corrupted (was checked-in in such a state into VCS). The workaround is to delete the file and Synchronize the data source in IDE (from Database tool window - it can be opened via View | Tool Windows | Database) - it will re-generate the file.
Btw .ids
file only contains introspected database information (about DB objects like tables/indexes etc) and does not contain database connection settings. If you want to share connection settings (password is not shared for security reasons) you should version dataSources.xml
file.