views:

120

answers:

1

I am building a scala web project using scala test, lift, jpa, hibernate, mercurial plugin, etc. I am getting instant crashes, where the ide just bombs, the window shuts down, and it gives no error messages whatsoever when I am doing any amount of copy/pasting of code. This started happening once my project got to about 100 unit tests.

This problem is incredibly annoying, because when the crash happens, 30-60 seconds of activity is not saved. Even IDEA will forget which files were last opened and will forget where the cursor was, which makes it really hard to continue where you left off after the crash. A lot can happen in 60 seconds!

Now, I've given up, because it seems like all sorts of things cause the IntelliJ IDEA to crash over and over. For example, if I were to copy and paste this code, to write a similar test for another collection type, it would crash shortly after:

 it should "cascade save and delete status messages" in {
     val statusMessage = new StatusMessage("message")

     var user = userDao.find(1).get
     user.addToStatusMessages(statusMessage)
     userDao.save(user)

     statusMessage.isPersistent should be (true)

     userDao.delete(user)

     statusMessageDao.find(statusMessage.id) should equal (None)
 }

There is nothing special about this piece of code. It's code that is working just fine. However, IDEA bombs shortly after I paste something like this. For example, I might change StatusMessage to the new class I want to test cascading on... and then have to import that class into the test... and BOOM... it crashed.

On windows 7, the IDEA window literally just minimizes and crashes with no warning. The next time I startup IDEA, it has no memory of what happened.

Now, I've had this problem before. I posted it way back on IDEA's YouTrack. I was told to invalidate my caches. That never fixed it then, and it's not fixing it now.

Please help. This error is fairly random, but it's happening constantly now. I could program for hours and not see it before... and the fact that my work just gets destroyed and I can't remember what I did during the last minute causes me to swear at my monitor at a db level higher than my stereo can go.

+2  A: 

Sounds like the (now infamous) "card-marking optimisation" issue

See here: http://www.jetbrains.net/devnet/docs/DOC-1193

Even though the article specifies linux, I've also heard reports of this on other operating systems. The recommended fix is to ensure you're running the latest JDK, I'd also recommend upgrading to IntelliJ 9.0.2 and Scala plugin if you haven't already.

Kevin Wright
yeah, it was this issue. I had to upgrade the jVM to update 20, as the the one that came with IDEA (update 17) had the bug. :/
egervari