I have just started seeing this problem with 4.1.2 on OS X 10.10.5. I had been using 4.1.1 for several weeks on OS X and Windows without encountering this problem.
Here are the steps to duplicate the problem I am seeing.
Create a new class named X1 and compile. Then edit X1 and copy the contents of X1 (the default class template for X1).
Create a new class named X2 and edit X2 and remove all the contents and paste in the source from X1. Then attempt to change the source (that you copied from X1) in the X2 class to have the class name X2. The editor will not let you make this change, and if you try to exit from the editor and the subsequent dialog box, BlueJ usually (but not always) crashes.