Will it be possible for you to share the jsx file that is causing the crash. You can post it here, but if for some reasons cannot post it here, you can share the script with Adobe at firstname.lastname@example.org
Also mention the OS that you using.
Try putting the script into a "Version 9.0 Scripts" (without the quotes) subfolder.
Finally after a lot of debugging I found the issue.
In Indesign CC 2014, the handling for Hidden documents has been changed how it used to be for Indesign CC 9.2.
Now we can not run command doc.Close() on a hidden document. This is what was causing Indesign to Crash.
Also, app.documents no more contains the count of hidden documents. Only those documents are maintained for which layout is open.
Not sure if such major API changes have been mentioned as a part of API changes doc.
Using the subfolder, as I suggested, should cause ID to interpret the script using the rules for version 9.