There are many things that can cause a CTD when entering the shipdealer. Most common ones are mis-named hardpoints or an incorrect number of engines being declared (usually if there are more being declared than there are hardpoints.)
Check your ini file for the entry of the ship and make sure all of the hardpoint names match what has been written in the ini file. The most important ones are the HPTractor_Source, Weapons, Shield, stuff like that. If your ship has more of them declared in the ini file than what is available on the CMP then that is likely your problem. It doesn't matter if the ship has undeclared hardpoints. Also check that you do not have too many lights in the goods.ini.
For the CTD on the loadup screen, try deleting your SP savefiles. Often when you're modding and try to reverse the changes when you have save files present with those changes it will cause a CTD once the ship is no longer being declared in the shiparch/goods ini files.