Song Error #4 is "undetermined error" and, unfortunately, this means that it could occur for any number of unknown reasons. Over the years we have found a number of situations which cause this error and in each case it has been resolved in an o.s upgrade. To minimize this error you should make sure that you have the latest o.s. version for your instrument. 
As dongggoi correctly stated, this error lives within the file so, once a song that generates this error has been saved, the error is likely to occur whenever the file is loaded in the future. If you have a song with this problem you can fix it by saving the song to a blank disk as a MIDI file, resetting the instrument and then reloading the MIDI file version of the song. You may have to do some slight re-constuction of the voicing and effect settings but this is asurefire way to "clean" a song which has become infected with errors. 
Chris