Freeze when referencing ClassName.this?

Hi,

I'm using IntelliJ 10 CE on OS X 10.6.6, and just today abruptly started seeing a consistent IDE freeze that forced me to kill the IntelliJ process any time I attempt to reference an OuterClass.this instance. This is a fairly normal pattern in my application, and I've been working on it for a few weeks now without seeing anything like this before. For a rough pseudo-example, if I wanted to write something like:

public class MyActivity extends Activity {
     public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);

          setContentView(R.layout.help);

          findViewById(R.id.get_started_button).setOnClickListener(new View.OnClickListener() {
               public void onClick(View v) {
                    HelpActivity.this.startActivity(new Intent(HelpActivity.this, RegistrationActivity.class));
               }
          });
     }
}

the IDE would freeze when I typed "HelpActivity.this", as it was supposed to be looking up autocomplete possibilities on the "HelpAcivity.this" reference. This is happening consistently across all classes in my project (which builds & runs just fine in it's current state), and continues after killing & restarting IntelliJ.

I'm pretty new to IntelliJ and don't fully know my way around yet, but my first thought was that something in the where IntelliJ stores its autocomplete lookups was probably corrupt: Looking in the console output, this seems to be confirmed as I'm seeing threadDump txt files with messages like ""Finalizer" Id=3 WAITING on java.lang.ref.ReferenceQueue$Lock@15fb18d" & ""Reference Handler" Id=2 WAITING on java.lang.ref.Reference$Lock@181b21f".

I tried the "invalidate caches..." command in the file menu, but that didn't help anything. I looked in my project's .idea directory & ~/Library/Application Support/IntelliJIdea10CE to see if there were any files that looked like they might contain this data so I could delete them, but nothing looked likely to me.

So, my question is: is this something anybody else has seen? (Yes, I've searched: I didn't find anything very helpful. Some mentions of similar log files on different problems, but no solutions.) Any suggestions for how to maybe fix it? If this is something I should file as an issue, what files or information (beyond what I've included here) would be helpful to the IntelliJ team in hunting it down?

Thanks for any help anyone can provide!

5 comments
Comment actions Permalink

Hello Will,

This is a bug in the new Java parser implementation in IntelliJ IDEA 10,
which will be fixed in the next IntelliJ IDEA 10.0.2 EAP build.

I'm using IntelliJ 10 CE on OS X 10.6.6, and just today abruptly
started seeing a consistent IDE freeze that forced me to kill the
IntelliJ process any time I attempt to reference an OuterClass.this
instance. This is a fairly normal pattern in my application, and I've
been working on it for a few weeks now without seeing anything like
this before. For a rough pseudo-example, if I wanted to write
something like:

public class MyActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.help);

findViewById(R.id.get_started_button).setOnClickListener(new
View.OnClickListener() {
public void onClick(View v) {
HelpActivity.this.startActivity(new
Intent(HelpActivity.this, RegistrationActivity.class));
}
});
}
}
the IDE would freeze when I typed "HelpActivity.this", as it was
supposed to be looking up autocomplete possibilities on the
"HelpAcivity.this" reference. This is happening consistently across
all classes in my project (which builds & runs just fine in it's
current state), and continues after killing & restarting IntelliJ.

I'm pretty new to IntelliJ and don't fully know my way around yet, but
my first thought was that something in the where IntelliJ stores its
autocomplete lookups was probably corrupt: Looking in the console
output, this seems to be confirmed as I'm seeing threadDump txt files
with messages like ""Finalizer" Id=3 WAITING on
java.lang.ref.ReferenceQueue$Lock@15fb18d" & ""Reference Handler" Id=2
WAITING on java.lang.ref.Reference$Lock@181b21f".

I tried the "invalidate caches..." command in the file menu, but that
didn't help anything. I looked in my project's .idea directory &
~/Library/Application Support/IntelliJIdea10CE to see if there were
any files that looked like they might contain this data so I could
delete them, but nothing looked likely to me.

So, my question is: is this something anybody else has seen? (Yes,
I've searched: I didn't find anything very helpful. Some mentions of
similar log files on different problems, but no solutions.) Any
suggestions for how to maybe fix it? If this is something I should
file as an issue, what files or information (beyond what I've included
here) would be helpful to the IntelliJ team in hunting it down?

Thanks for any help anyone can provide!

---
Original message URL:
http://devnet.jetbrains.net/message/5284534#5284534


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thank you, Dmitry. Good to know this is a known issue, at least. Any suggestions for why I would start triggering this bug consistently now when I wasn't triggering it while writing very similar code before now on the same IDEA build? Is there any workaround until 10.0.2 is released?

0
Comment actions Permalink

Hello Will,

Just got a clarification from the responsible developer: the fix should already
be included in the current EAP. Feel free to give it a try.

Thank you, Dmitry. Good to know this is a known issue, at least. Any
suggestions for why I would start triggering this bug consistently now
when I wasn't triggering it while writing very similar code before now
on the same IDEA build? Is there any workaround until 10.0.2 is
released?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Dmitry, my currently installed version is 10.0.1, build IC-99.32 from Dec 23. All of this appears identical to the latest build I downloaded from http://www.jetbrains.com/idea/download/index.html. I replaced my current app bundle with a newly downloaded one anyway, just to be sure: no change. I appreciate your suggestions, sorry this hasn't fixed it yet. Any suggestion about what to look at next? Thanks.

0
Comment actions Permalink

Hello Will,

The latest EAP is the one at http://confluence.jetbrains.net/display/IDEADEV/IDEAXEAP

Dmitry, my currently installed version is 10.0.1, build IC-99.32 from
Dec 23. All of this appears identical to the latest build I downloaded
from http://www.jetbrains.com/idea/download/index.html. I replaced my
current app bundle with a newly downloaded one anyway, just to be
sure: no change. I appreciate your suggestions, sorry this hasn't
fixed it yet. Any suggestion about what to look at next? Thanks.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.